-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakeFile
More file actions
45 lines (35 loc) · 729 Bytes
/
MakeFile
File metadata and controls
45 lines (35 loc) · 729 Bytes
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
#
LIBNAME =time
LIBSUFFIX =.dll
# common prefix
INCDIR =C:\dev\dev-cpp\include
LUAPREFIX =C:\dev\Luajit
# LuaJIT2
LUAINC =$(LUAPREFIX)\src
LUALIB =$(LUAPREFIX)\src
LLIB = lua51
# basic setup
CC =gcc
WARN =-Wall
INCS =-I$(INCDIR) -I$(LUAINC)
LIBS =-L$(LUALIB) -lm -l$(LLIB)
OPTS =-O9
DLL =-c
SHARE =-shared
CFLAGS =$(DLL) $(OPTS) -I$(LUAINC)
CFLAGS_DLL =$(SHARE) $(OPTS) $(LIBS) $(INCS)
# Strip the binary for our prod build
STRIP =strip
# UPX pack to minimise size for our prod build
UPX =upx
UPXFLAG =-9
#
$(LIBNAME)$(LIBSUFFIX): $(LIBNAME).o
$(CC) -o $@ $^ $(CFLAGS_DLL)
$(LIBNAME).o: $(LIBNAME).c
$(CC) -o $@ $^ $(CFLAGS)
release: $(LIBNAME)$(LIBSUFFIX)
$(STRIP) $<
$(UPX) $(UPXFLAG) $<
clean:
rm *.o *.dll