File: Makefile.mingw

package info (click to toggle)
lua-bitop 1.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 164 kB
  • ctags: 71
  • sloc: ansic: 128; makefile: 28; sh: 9
file content (46 lines) | stat: -rw-r--r-- 1,033 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Makefile for Lua BitOp -- a bit operations library for Lua 5.1.
# This is a modified Makefile for MinGW. C:\MinGW\bin must be in your PATH.
# Compile: mingw32-make -f Makefile.mingw
# Install: mingw32-make -f Makefile.mingw install

# Lua executable name. Used for testing.
LUA= lua

# Include path where lua.h, luaconf.h and lauxlib.h reside:
INCLUDES= "-I.."

# Path of lua51.dll:
LUADLLPATH= "..\lua51.dll"

# Path where C modules for Lua should be installed:
LUACMODPATH= ".."

CC= gcc
SOCC= $(CC) -shared $(LUADLLPATH)
CFLAGS= -Wall -O2 -fomit-frame-pointer $(INCLUDES)
RM= del
STRIP= strip --strip-unneeded
INSTALL= copy

MODNAME= bit
MODSO= $(MODNAME).dll

all: $(MODSO)

$(MODSO): $(MODNAME).o
	$(SOCC) -o $@ $<
	$(STRIP) $@

install: $(MODSO)
	$(INSTALL) $< $(LUACMODPATH)

test: $(MODSO)
	@$(LUA) bittest.lua && echo "basic test OK"
	@$(LUA) nsievebits.lua && echo "nsievebits test OK"
	@$(LUA) md5test.lua && echo "MD5 test OK"

clean:
	$(RM) *.o *.so *.obj *.lib *.exp *.dll *.manifest

.PHONY: all install test clean