Software /
code /
prosody
Comparison
util-src/Makefile @ 798:2a92b58144a9
Use $CC, $LD in Makefile. Add --c-compiler, --linker flags to ./configure script. Add --lflags to ./configure script. Thanks to Lorenzo for the initial patch!
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 14 Feb 2009 15:38:37 +0000 |
parent | 765:148365c1b53c |
child | 987:d55ec60331e7 |
comparison
equal
deleted
inserted
replaced
797:6ea01e05b004 | 798:2a92b58144a9 |
---|---|
4 LUA_SUFFIX?=5.1 | 4 LUA_SUFFIX?=5.1 |
5 LUA_INCDIR?=/usr/include/lua$(LUA_SUFFIX) | 5 LUA_INCDIR?=/usr/include/lua$(LUA_SUFFIX) |
6 LUA_LIB?=lua$(LUA_SUFFIX) | 6 LUA_LIB?=lua$(LUA_SUFFIX) |
7 IDN_LIB?=idn | 7 IDN_LIB?=idn |
8 OPENSSL_LIB?=crypto | 8 OPENSSL_LIB?=crypto |
9 | 9 CC?=gcc |
10 LD?=gcc | |
10 | 11 |
11 | 12 |
12 all: encodings.so hashes.so pposix.so | 13 all: encodings.so hashes.so pposix.so |
13 | 14 |
14 install: encodings.so hashes.so pposix.so | 15 install: encodings.so hashes.so pposix.so |
19 rm -f *.o | 20 rm -f *.o |
20 rm -f *.so | 21 rm -f *.so |
21 rm -f ../util/*.so | 22 rm -f ../util/*.so |
22 | 23 |
23 encodings.o: encodings.c | 24 encodings.o: encodings.c |
24 gcc $(CFLAGS) -I$(LUA_INCDIR) -c -o encodings.o encodings.c | 25 $(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o encodings.o encodings.c |
25 encodings.so: encodings.o | 26 encodings.so: encodings.o |
26 export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc $(LFLAGS) -o encodings.so encodings.o -L/usr/local/lib -llua$(LUA_SUFFIX) -lidn | 27 export MACOSX_DEPLOYMENT_TARGET="10.3"; $(LD) $(LFLAGS) -o encodings.so encodings.o -L$(LUA_LIBDIR) -llua$(LUA_SUFFIX) -lidn |
27 | 28 |
28 | 29 |
29 hashes.o: hashes.c | 30 hashes.o: hashes.c |
30 gcc $(CFLAGS) -I$(LUA_INCDIR) -c -o hashes.o hashes.c | 31 $(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o hashes.o hashes.c |
31 hashes.so: hashes.o | 32 hashes.so: hashes.o |
32 export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc $(LFLAGS) -o hashes.so hashes.o -L/usr/local/lib -llua$(LUA_SUFFIX) -lcrypto | 33 export MACOSX_DEPLOYMENT_TARGET="10.3"; $(LD) $(LFLAGS) -o hashes.so hashes.o -L$(LUA_LIBDIR) -llua$(LUA_SUFFIX) -lcrypto |
33 | 34 |
34 pposix.o: pposix.c | 35 pposix.o: pposix.c |
35 gcc $(CFLAGS) -I$(LUA_INCDIR) -c -o pposix.o pposix.c | 36 $(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o pposix.o pposix.c |
36 pposix.so: pposix.o | 37 pposix.so: pposix.o |
37 export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc $(LFLAGS) -o pposix.so pposix.o -L/usr/local/lib -llua$(LUA_SUFFIX) | 38 export MACOSX_DEPLOYMENT_TARGET="10.3"; $(LD) $(LFLAGS) -o pposix.so pposix.o -L$(LUA_LIBDIR) -llua$(LUA_SUFFIX) |
38 | 39 |