diff options
Diffstat (limited to 'repo/system/lua-lpeg/build-static-lib.patch')
-rw-r--r-- | repo/system/lua-lpeg/build-static-lib.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/repo/system/lua-lpeg/build-static-lib.patch b/repo/system/lua-lpeg/build-static-lib.patch new file mode 100644 index 0000000..d8a8f8c --- /dev/null +++ b/repo/system/lua-lpeg/build-static-lib.patch @@ -0,0 +1,29 @@ +--- a/makefile ++++ b/makefile +@@ -24,12 +24,15 @@ + + CFLAGS = $(CWARNS) $(COPT) -std=c99 -I$(LUADIR) -fPIC + CC = gcc ++AR = ar ++RANLIB = ranlib + + FILES = lpvm.o lpcap.o lptree.o lpcode.o lpprint.o + + # For Linux + linux: + $(MAKE) lpeg.so "DLLFLAGS = -shared -fPIC" ++ $(MAKE) lpeg.a + + # For Mac OS + macosx: +@@ -37,6 +40,10 @@ + + lpeg.so: $(FILES) + env $(CC) $(DLLFLAGS) $(FILES) -o lpeg.so ++ ++lpeg.a: $(FILES) ++ env $(AR) rc lpeg.a $(FILES) ++ env $(RANLIB) lpeg.a + + $(FILES): makefile + |