forked from shuque/danetls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (34 loc) · 1.22 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
SBINDIR = $(PREFIX)/sbin
LIBDIR = $(PREFIX)/lib
INCLUDEDIR = $(PREFIX)/include
INSTALL = ./install-sh
INSTALL_PROG = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
PROG = danetls danetls-getdns
#PROG = danetls danetls-getdns chainclient chainserver
INCLUDE = -I. -I/usr/local/openssl/include -I/usr/local/include
CFLAGS = -g -Wall -Wextra $(INCLUDE)
LDFLAGS = -L/usr/local/openssl/lib -L/usr/local/lib -Wl,-rpath -Wl,/usr/local/openssl/lib -Wl,-rpath -Wl,/usr/local/lib
LIBS_LDNS = -lssl -lcrypto -lldns
LIBS_GETDNS = -lssl -lcrypto -lldns -lgetdns_ext_event -lgetdns -levent_core -lunbound -lidn
CC = cc
# For Mac OS X
#LDFLAGS = -L/usr/local/lib
all: $(PROG)
danetls: danetls.o query-ldns.o utils.o starttls.o
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS_LDNS)
danetls-getdns: danetls-getdns.o query-getdns.o utils.o starttls.o
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS_GETDNS)
chainclient: chainclient.o query-ldns.o utils.o starttls.o
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS_LDNS)
chainserver: chainserver.o query-ldns.o utils.o
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS_LDNS)
install: $(PROG)
$(INSTALL_PROG) $(PROG) $(BINDIR)
.PHONY: clean count
clean:
rm -rf *.o $(PROG)
count:
wc -c *.[ch]