From 468c9871b58856dda00149a9dc45ecfb7283d67f Mon Sep 17 00:00:00 2001 From: William Ahern Date: Sat, 29 Sep 2012 22:44:00 -0700 Subject: -n start OpenSSL extension --- Makefile | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a7f829b --- /dev/null +++ b/Makefile @@ -0,0 +1,45 @@ +prefix = /usr/local/lua52 +libdir = $(prefix)/lib +datadir = $(prefix)/share +includedir = $(prefix)/include +lua52include = $(includedir)/lua/5.2 +lua52path = $(datadir)/lua/5.2 +lua52cpath = $(libdir)/lua/5.2 + +LUAC = $(prefix)/bin/luac + +VENDOR.OS = $(shell ../mk/vendor.os) +VENDOR.CC = $(shell env CC="${CC}" ../mk/vendor.cc) + + +CPPFLAGS = -I$(DESTDIR)$(lua52include) +DFLAGS = -Wall -Wextra -Wno-deprecated-declarations -Wno-unused +CFLAGS = -fPIC $(DFLAGS) +LDFLAGS = -lssl -lcrypto + +ifeq ($(VENDOR.OS), Darwin) +SOFLAGS = -bundle -undefined dynamic_lookup +else +SOFLAGS = -shared +endif + + + + + +all: openssl.so + +openssl.so: openssl.o + $(CC) -o $@ $^ $(SOFLAGS) $(LDFLAGS) + +openssl.o: openssl.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + + +.PHONY: clean clean~ + +clean: + rm -f *.so *.o + +clean~: clean + rm -f *~ -- cgit v1.2.3-59-g8ed1b