You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-lua/lpeg/files/lpeg-0.12.1-makefile.patch

38 lines
820 B

--- lpeg-0.12.1/makefile
+++ lpeg-0.12.1/makefile
@@ -1,7 +1,7 @@
LIBNAME = lpeg
LUADIR = ../lua/
-COPT = -O2
+#COPT = -O2
# COPT = -DLPEG_DEBUG -g
CWARNS = -Wall -Wextra -pedantic \
@@ -22,21 +22,21 @@
# -Wunreachable-code \
-CFLAGS = $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC
+CFLAGS += $(CWARNS) $(COPT) -std=c99 -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) $(DLLFLAGS) $(LDFLAGS) $(FILES) -o lpeg.so
$(FILES): makefile