blob: 5734de9f55d8d0d74bd486cb3be1b5c79507dca3 (
plain)
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
|
--- lpeg-0.12/makefile
+++ lpeg-0.12/makefile
@@ -1,7 +1,7 @@
LIBNAME = lpeg
LUADIR = /usr/include/lua5.1/
-COPT = -O2
+#COPT = -O2
# COPT = -DLPEG_DEBUG -g
CWARNS = -Wall -Wextra -pedantic \
@@ -22,21 +22,21 @@
# -Wunreachable-code \
-CFLAGS = $(CWARNS) $(COPT) -ansi -I$(LUADIR) -fPIC
+CFLAGS += $(CWARNS) $(COPT) -ansi -I$(LUADIR) -fPIC
CC = gcc
FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o
# For Linux
linux:
- make lpeg.so "DLLFLAGS = -shared -fPIC"
+ $(MAKE) lpeg.so "DLLFLAGS = -shared -fPIC"
# For Mac OS
macosx:
- make lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup"
+ $(MAKE) lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup"
lpeg.so: $(FILES)
- env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so
+ env $(CC) $(CFLAGS) $(DLLFLAGS) $(LDFLAGS) $(FILES) -o lpeg.so
$(FILES): makefile
|