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