aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorSergio Medeiros <sqmedeiros@gmail.com>2014-10-29 18:13:38 -0300
committerSergio Medeiros <sqmedeiros@gmail.com>2014-10-29 18:13:38 -0300
commit8d30a0ff8a8584e225c03d878a9add439ea193a3 (patch)
treecdc03907837ebec1aed26be7290a5a40d00f3e2c /makefile
parent3af55803f0a261dd9b2ccf85a7532288c4a270ae (diff)
downloadlpeglabel-8d30a0ff8a8584e225c03d878a9add439ea193a3.tar.gz
lpeglabel-8d30a0ff8a8584e225c03d878a9add439ea193a3.tar.bz2
lpeglabel-8d30a0ff8a8584e225c03d878a9add439ea193a3.zip
Creating the git repository with the current implementation.
Diffstat (limited to 'makefile')
-rw-r--r--makefile55
1 files changed, 55 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..4f41062
--- /dev/null
+++ b/makefile
@@ -0,0 +1,55 @@
1LIBNAME = lpeglabel
2LUADIR = /usr/include/lua5.1/
3
4#COPT = -O2
5COPT = -DLPEG_DEBUG -g
6
7CWARNS = -Wall -Wextra -pedantic \
8 -Waggregate-return \
9 -Wcast-align \
10 -Wcast-qual \
11 -Wdisabled-optimization \
12 -Wpointer-arith \
13 -Wshadow \
14 -Wsign-compare \
15 -Wundef \
16 -Wwrite-strings \
17 -Wbad-function-cast \
18 -Wdeclaration-after-statement \
19 -Wmissing-prototypes \
20 -Wnested-externs \
21 -Wstrict-prototypes \
22# -Wunreachable-code \
23
24
25CFLAGS = $(CWARNS) $(COPT) -ansi -I$(LUADIR) -fPIC
26CC = gcc
27
28FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o
29
30# For Linux
31linux:
32 make lpeglabel.so "DLLFLAGS = -shared -fPIC"
33
34# For Mac OS
35macosx:
36 make lpeglabel.so "DLLFLAGS = -bundle -undefined dynamic_lookup"
37
38lpeglabel.so: $(FILES)
39 env $(CC) $(DLLFLAGS) $(FILES) -o lpeglabel.so
40
41$(FILES): makefile
42
43test: test.lua re.lua lpeglabel.so
44 ./test.lua
45
46clean:
47 rm -f $(FILES) lpeglabel.so
48
49
50lpcap.o: lpcap.c lpcap.h lptypes.h
51lpcode.o: lpcode.c lptypes.h lpcode.h lptree.h lpvm.h lpcap.h
52lpprint.o: lpprint.c lptypes.h lpprint.h lptree.h lpvm.h lpcap.h
53lptree.o: lptree.c lptypes.h lpcap.h lpcode.h lptree.h lpvm.h lpprint.h
54lpvm.o: lpvm.c lpcap.h lptypes.h lpvm.h lpprint.h lptree.h
55