blob: d8a8f8c3f9fa1c876c52c28c73e3be64353d5ed8 (
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
|
--- 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
|