summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Ahern <william@server.local>2013-02-28 14:18:09 -0800
committerWilliam Ahern <william@server.local>2013-02-28 14:18:09 -0800
commit01ba6abe75aa2afb77b2462adf5e54895955c3b2 (patch)
treee858138522f702adac6acf4e7e5c168a67d1b07f
parentcb2880129545b7af565d59bc0a3bae4fc17e2384 (diff)
downloadluaossl-01ba6abe75aa2afb77b2462adf5e54895955c3b2.tar.gz
luaossl-01ba6abe75aa2afb77b2462adf5e54895955c3b2.tar.bz2
luaossl-01ba6abe75aa2afb77b2462adf5e54895955c3b2.zip
-n
use our new helper utility in Makefile
-rw-r--r--Makefile21
1 files changed, 15 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 368dc12..f1bb26d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,12 @@
1prefix = /usr/local/lua52 1prefix = /usr/local
2bindir = $(prefix)/bin 2bindir = $(prefix)/bin
3libdir = $(prefix)/lib 3libdir = $(prefix)/lib
4datadir = $(prefix)/share 4datadir = $(prefix)/share
5includedir = $(prefix)/include 5includedir = $(prefix)/include
6luainclude = $(includedir)/lua/5.2 6luainclude =
7luapath = $(datadir)/lua/5.2 7luapath =
8luacpath = $(libdir)/lua/5.2 8luacpath =
9 9LUAC =
10LUAC = $(bindir)/luac
11 10
12# backwards compatibile install paths 11# backwards compatibile install paths
13ifneq ($(origin lua52include), undefined) 12ifneq ($(origin lua52include), undefined)
@@ -23,10 +22,19 @@ luacpath = $(lua52cpath)
23endif 22endif
24 23
25 24
25# call helper to derive our Lua paths
26ENV = CC CPPFLAGS prefix bindir libdir datadir includedir \
27 luainclude luapath luacpath LUAC
28$(shell env $(foreach V, $(ENV), $(V)="$(call $(V))") ../mk/lua.path make > .config)
29include .config
30
31
26VENDOR.OS = $(shell ../mk/vendor.os) 32VENDOR.OS = $(shell ../mk/vendor.os)
27VENDOR.CC = $(shell env CC="${CC}" ../mk/vendor.cc) 33VENDOR.CC = $(shell env CC="${CC}" ../mk/vendor.cc)
28 34
35ifneq ($(luainclude),)
29CPPFLAGS = -I$(luainclude) 36CPPFLAGS = -I$(luainclude)
37endif
30 38
31ifeq ($(VENDOR.CC), sunpro) 39ifeq ($(VENDOR.CC), sunpro)
32DFLAGS = -g 40DFLAGS = -g
@@ -121,6 +129,7 @@ $(DESTDIR)$(luapath)/openssl/hmac.lua: openssl.hmac.lua
121 129
122clean: 130clean:
123 rm -f *.so *.o 131 rm -f *.so *.o
132 rm -f .config
124 133
125clean~: clean 134clean~: clean
126 rm -f *~ 135 rm -f *~