lpeg-1.0.2-makefile.patch 671 B

1234567891011121314151617181920212223242526272829303132
  1. Respect user CFLAGS and LDFLAGS.
  2. --- lpeg-1.0.2/makefile
  3. +++ lpeg-1.0.2/makefile
  4. @@ -1,7 +1,7 @@
  5. LIBNAME = lpeg
  6. LUADIR = ../lua/
  7. -COPT = -O2 -DNDEBUG
  8. +COPT = -DNDEBUG
  9. # COPT = -g
  10. CWARNS = -Wall -Wextra -pedantic \
  11. @@ -22,7 +22,7 @@
  12. # -Wunreachable-code \
  13. -CFLAGS = $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC
  14. +CFLAGS += $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC
  15. CC = gcc
  16. FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o
  17. @@ -36,7 +36,7 @@
  18. $(MAKE) lpeg.so "DLLFLAGS = -bundle -undefined dynamic_lookup"
  19. lpeg.so: $(FILES)
  20. - env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so
  21. + env $(CC) $(DLLFLAGS) $(LDFLAGS) $(FILES) -o lpeg.so
  22. $(FILES): makefile