Comparison

util-src/Makefile @ 6888:39c5c49616ab

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Sun, 27 Sep 2015 00:37:18 +0200
parent 6886:27f5a76e3fa5
child 7117:2b4432cc9c29
comparison
equal deleted inserted replaced
6871:e4b5885b7712 6888:39c5c49616ab
1 1
2 include ../config.unix 2 include ../config.unix
3 3
4 LUA_SUFFIX?=5.1 4 CFLAGS+=-ggdb -I$(LUA_INCDIR)
5 LUA_INCDIR?=/usr/include/lua$(LUA_SUFFIX) 5
6 LUA_LIB?=lua$(LUA_SUFFIX) 6 INSTALL_DATA=install -m644
7 IDN_LIB?=idn 7 TARGET?=../util/
8 OPENSSL_LIB?=crypto 8
9 CC?=gcc 9 ALL=encodings.so hashes.so net.so pposix.so signal.so table.so
10 CXX?=g++
11 LD?=gcc
12 CFLAGS+=-ggdb
13 10
14 .PHONY: all install clean 11 .PHONY: all install clean
15 .SUFFIXES: .c .o .so 12 .SUFFIXES: .c .o .so
16 13
17 all: encodings.so hashes.so net.so pposix.so signal.so table.so 14 all: $(ALL)
18 15
19 install: encodings.so hashes.so net.so pposix.so signal.so table.so 16 install: $(ALL)
20 install *.so ../util/ 17 $(INSTALL_DATA) $^ $(TARGET)
21 18
22 clean: 19 clean:
23 rm -f *.o 20 rm -f $(ALL)
24 rm -f *.so
25 rm -f ../util/*.so
26 21
27 encodings.so: encodings.o 22 encodings.so: LDLIBS+=$(IDNA_LIBS)
28 MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET;
29 $(CC) -o $@ $< $(LDFLAGS) $(IDNA_LIBS)
30 23
31 hashes.so: hashes.o 24 hashes.so: LDLIBS+=$(OPENSSL_LIBS)
32 MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET;
33 $(CC) -o $@ $< $(LDFLAGS) -l$(OPENSSL_LIB)
34 25
35 .c.o: 26 %.so: %.o
36 $(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o $@ $< 27 $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
37
38 .o.so:
39 MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET;
40 $(LD) -o $@ $< $(LDFLAGS)
41