From 5992af860900214bbb7427fc3ce2ae90d539cc5a Mon Sep 17 00:00:00 2001 From: William Ahern Date: Wed, 27 Feb 2013 10:36:37 -0800 Subject: -n remove '52' from lua path variables --- Makefile | 83 ++++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index 28a9b88..c26fd2d 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,9 @@ 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 +luainclude = $(includedir)/lua/5.2 +luapath = $(datadir)/lua/5.2 +luacpath = $(libdir)/lua/5.2 LUAC = $(prefix)/bin/luac @@ -12,7 +12,7 @@ VENDOR.OS = $(shell ../mk/vendor.os) VENDOR.CC = $(shell env CC="${CC}" ../mk/vendor.cc) -CPPFLAGS = -I$(lua52include) +CPPFLAGS = -I$(luainclude) ifeq ($(VENDOR.CC), sunpro) DFLAGS = -g @@ -32,9 +32,6 @@ SOFLAGS = -shared endif - - - all: openssl.so openssl.so: openssl.o @@ -44,72 +41,92 @@ openssl.o: openssl.c compat52.h $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< -install: $(DESTDIR)$(lua52cpath)/_openssl.so \ - $(DESTDIR)$(lua52path)/openssl/bignum.lua \ - $(DESTDIR)$(lua52path)/openssl/pubkey.lua \ - $(DESTDIR)$(lua52path)/openssl/x509.lua \ - $(DESTDIR)$(lua52path)/openssl/x509/name.lua \ - $(DESTDIR)$(lua52path)/openssl/x509/altname.lua \ - $(DESTDIR)$(lua52path)/openssl/x509/chain.lua \ - $(DESTDIR)$(lua52path)/openssl/x509/store.lua \ - $(DESTDIR)$(lua52path)/openssl/ssl/context.lua \ - $(DESTDIR)$(lua52path)/openssl/ssl.lua \ - $(DESTDIR)$(lua52path)/openssl/digest.lua \ - $(DESTDIR)$(lua52path)/openssl/hmac.lua - -$(DESTDIR)$(lua52cpath)/_openssl.so: openssl.so +install: $(DESTDIR)$(luacpath)/_openssl.so \ + $(DESTDIR)$(luapath)/openssl/bignum.lua \ + $(DESTDIR)$(luapath)/openssl/pubkey.lua \ + $(DESTDIR)$(luapath)/openssl/x509.lua \ + $(DESTDIR)$(luapath)/openssl/x509/name.lua \ + $(DESTDIR)$(luapath)/openssl/x509/altname.lua \ + $(DESTDIR)$(luapath)/openssl/x509/chain.lua \ + $(DESTDIR)$(luapath)/openssl/x509/store.lua \ + $(DESTDIR)$(luapath)/openssl/ssl/context.lua \ + $(DESTDIR)$(luapath)/openssl/ssl.lua \ + $(DESTDIR)$(luapath)/openssl/digest.lua \ + $(DESTDIR)$(luapath)/openssl/hmac.lua + +$(DESTDIR)$(luacpath)/_openssl.so: openssl.so mkdir -p $(@D) cp -p $< $@ -$(DESTDIR)$(lua52path)/openssl/bignum.lua: openssl.bignum.lua +$(DESTDIR)$(luapath)/openssl/bignum.lua: openssl.bignum.lua mkdir -p $(@D) cp -p $< $@ -$(DESTDIR)$(lua52path)/openssl/pubkey.lua: openssl.pubkey.lua +$(DESTDIR)$(luapath)/openssl/pubkey.lua: openssl.pubkey.lua mkdir -p $(@D) cp -p $< $@ -$(DESTDIR)$(lua52path)/openssl/x509.lua: openssl.x509.lua +$(DESTDIR)$(luapath)/openssl/x509.lua: openssl.x509.lua mkdir -p $(@D) cp -p $< $@ -$(DESTDIR)$(lua52path)/openssl/x509/name.lua: openssl.x509.name.lua +$(DESTDIR)$(luapath)/openssl/x509/name.lua: openssl.x509.name.lua mkdir -p $(@D) cp -p $< $@ -$(DESTDIR)$(lua52path)/openssl/x509/altname.lua: openssl.x509.altname.lua +$(DESTDIR)$(luapath)/openssl/x509/altname.lua: openssl.x509.altname.lua mkdir -p $(@D) cp -p $< $@ -$(DESTDIR)$(lua52path)/openssl/x509/chain.lua: openssl.x509.chain.lua +$(DESTDIR)$(luapath)/openssl/x509/chain.lua: openssl.x509.chain.lua mkdir -p $(@D) cp -p $< $@ -$(DESTDIR)$(lua52path)/openssl/x509/store.lua: openssl.x509.store.lua +$(DESTDIR)$(luapath)/openssl/x509/store.lua: openssl.x509.store.lua mkdir -p $(@D) cp -p $< $@ -$(DESTDIR)$(lua52path)/openssl/ssl/context.lua: openssl.ssl.context.lua +$(DESTDIR)$(luapath)/openssl/ssl/context.lua: openssl.ssl.context.lua mkdir -p $(@D) cp -p $< $@ -$(DESTDIR)$(lua52path)/openssl/ssl.lua: openssl.ssl.lua +$(DESTDIR)$(luapath)/openssl/ssl.lua: openssl.ssl.lua mkdir -p $(@D) cp -p $< $@ -$(DESTDIR)$(lua52path)/openssl/digest.lua: openssl.digest.lua +$(DESTDIR)$(luapath)/openssl/digest.lua: openssl.digest.lua mkdir -p $(@D) cp -p $< $@ -$(DESTDIR)$(lua52path)/openssl/hmac.lua: openssl.hmac.lua +$(DESTDIR)$(luapath)/openssl/hmac.lua: openssl.hmac.lua mkdir -p $(@D) cp -p $< $@ -.PHONY: clean clean~ +.PHONY: clean clean~ help clean: rm -f *.so *.o clean~: clean rm -f *~ + +help: + @echo "Available targets:" + @echo "" + @echo " all - build all binary targets" + @echo "openssl.so - build openssl.so module" + @echo " install - install openssl modules" + @echo " clean - rm binary targets, object files, debugging symbols, etc" + @echo " clean~ - clean + rm *~" + @echo " help - echo this help message" + @echo "" + @echo "Some important Make variables:" + @echo "" + @echo " prefix - path to install root" + @echo 'luainclude - path to Lua headers ($$(prefix)/include/lua/5.2)' + @echo ' luapath - install path for Lua modules ($$(prefix)/share/lua/5.2)' + @echo ' luacpath - install path for Lua C modules ($$(prefix)/lib/lua/5.2)' + @echo ' LUAC - path to luac utility ($$(prefix)/bin/luac)' + @echo "" + @echo "Report bugs to " -- cgit v1.2.3-59-g8ed1b