summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWilliam Ahern <william@server.local>2012-09-29 22:44:00 -0700
committerWilliam Ahern <william@server.local>2012-09-29 22:44:00 -0700
commit468c9871b58856dda00149a9dc45ecfb7283d67f (patch)
tree20bace130aeedfa232c9eb648873b05cddab1796 /Makefile
downloadluaossl-468c9871b58856dda00149a9dc45ecfb7283d67f.tar.gz
luaossl-468c9871b58856dda00149a9dc45ecfb7283d67f.tar.bz2
luaossl-468c9871b58856dda00149a9dc45ecfb7283d67f.zip
-n
start OpenSSL extension
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a7f829b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,45 @@
1prefix = /usr/local/lua52
2libdir = $(prefix)/lib
3datadir = $(prefix)/share
4includedir = $(prefix)/include
5lua52include = $(includedir)/lua/5.2
6lua52path = $(datadir)/lua/5.2
7lua52cpath = $(libdir)/lua/5.2
8
9LUAC = $(prefix)/bin/luac
10
11VENDOR.OS = $(shell ../mk/vendor.os)
12VENDOR.CC = $(shell env CC="${CC}" ../mk/vendor.cc)
13
14
15CPPFLAGS = -I$(DESTDIR)$(lua52include)
16DFLAGS = -Wall -Wextra -Wno-deprecated-declarations -Wno-unused
17CFLAGS = -fPIC $(DFLAGS)
18LDFLAGS = -lssl -lcrypto
19
20ifeq ($(VENDOR.OS), Darwin)
21SOFLAGS = -bundle -undefined dynamic_lookup
22else
23SOFLAGS = -shared
24endif
25
26
27
28
29
30all: openssl.so
31
32openssl.so: openssl.o
33 $(CC) -o $@ $^ $(SOFLAGS) $(LDFLAGS)
34
35openssl.o: openssl.c
36 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
37
38
39.PHONY: clean clean~
40
41clean:
42 rm -f *.so *.o
43
44clean~: clean
45 rm -f *~