File: Makefile

package info (click to toggle)
curvedns 0.87-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,964 kB
  • sloc: asm: 19,669; ansic: 11,907; cpp: 1,066; sh: 954; makefile: 57
file content (67 lines) | stat: -rw-r--r-- 1,902 bytes parent folder | download | duplicates (2)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# CurveDNS Debian Makefile (link against libsodium)

EXTRALIB=-lev -lsodium

TARGETS=curvedns-keygen curvedns

.PHONY: targets clean distclean install

targets: $(TARGETS)

clean:
	rm -f *.a *.o $(TARGETS)

install:
	@echo Sorry, no automated install. Copy the following binaries to your preferred destination path:
	@echo "  $(TARGETS)"

distclean: clean

debug.o: debug.c debug.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -c debug.c

cache_hashtable.o: cache_hashtable.c cache_hashtable.h debug.o
	$(CC) $(CPPFLAGS) $(CFLAGS) -c cache_hashtable.c

# ready for possible critbit addition
cache.a: cache_hashtable.o
	$(AR) cr cache.a cache_hashtable.o
	ranlib cache.a

dns.o: dns.c dns.h debug.o event.a
	$(CC) $(CPPFLAGS) $(CFLAGS) -c dns.c

dnscurve.o: dnscurve.c dnscurve.h debug.o event.a
	$(CC) $(CPPFLAGS) $(CFLAGS) -c dnscurve.c

curvedns.o: curvedns.c curvedns.h debug.o ip.o misc.o
	$(CC) $(CPPFLAGS) $(CFLAGS) -c curvedns.c

ip.o: ip.c ip.h debug.o
	$(CC) $(CPPFLAGS) $(CFLAGS) -c ip.c

event_tcp.o: event_tcp.c event.h debug.o ip.o cache.a
	$(CC) $(CPPFLAGS) $(CFLAGS) -c event_tcp.c

event_udp.o: event_udp.c event.h debug.o ip.o cache.a
	$(CC) $(CPPFLAGS) $(CFLAGS) -c event_udp.c

event_main.o: event_main.c event.h debug.o ip.o cache.a
	$(CC) $(CPPFLAGS) $(CFLAGS) -c event_main.c

event.a: event_main.o event_udp.o event_tcp.o
	$(AR) cr event.a event_main.o event_udp.o event_tcp.o
	ranlib event.a

misc.o: misc.c misc.h ip.o debug.o
	$(CC) $(CPPFLAGS) $(CFLAGS) -c misc.c

curvedns-keygen.o: curvedns-keygen.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -c curvedns-keygen.c

# The targets:
curvedns: debug.o ip.o misc.o cache.a event.a dnscurve.o dns.o curvedns.o
	$(CC) $(LDFLAGS) debug.o ip.o misc.o dnscurve.o dns.o cache.a event.a curvedns.o $(EXTRALIB) -o curvedns

curvedns-keygen: curvedns-keygen.o debug.o ip.o misc.o
	$(CC) $(LDFLAGS) curvedns-keygen.o debug.o ip.o misc.o $(EXTRALIB) -o curvedns-keygen