-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (20 loc) · 942 Bytes
/
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
CFLAGS = -g -I. -Wall -Wpedantic
PROGS = getdns_dnstap_repeater getdns_dnstap_opts
LIBS = -lgetdns -lprotobuf-c
GETDNS_DNSTAP_REPEATER_OBJS = getdns_dnstap_repeater.o getdns-dnstap-fstrm.o dnstap.pb-c.o
GETDNS_DNSTAP_OPTS_OBJS = getdns_dnstap_opts.o getdns-dnstap-fstrm.o dnstap.pb-c.o
all: $(PROGS)
.SUFFIXES: .c .o .h .proto
.c.o:
$(CC) $(CFLAGS) -c $<
getdns_dnstap_repeater: $(GETDNS_DNSTAP_REPEATER_OBJS)
$(CC) $(LDFLAGS) -o $@ $(GETDNS_DNSTAP_REPEATER_OBJS) $(LIBS)
getdns_dnstap_opts: $(GETDNS_DNSTAP_OPTS_OBJS)
$(CC) $(LDFLAGS) -o $@ $(GETDNS_DNSTAP_OPTS_OBJS) $(LIBS)
dnstap.pb-c.o: dnstap.pb/dnstap.pb-c.c dnstap.pb/dnstap.pb-c.h
$(CC) $(CFLAGS) -c dnstap.pb/dnstap.pb-c.c
dnstap.pb/dnstap.pb-c.c dnstap.pb/dnstap.pb-c.h: dnstap.pb/dnstap.proto
protoc-c --c_out=. dnstap.pb/dnstap.proto
clean:
rm -f $(PROGS) $(GETDNS_DNSTAP_REPEATER_OBJS) dnstap.pb/dnstap.pb-c.[ch]
getdns_dnstap_repeater.o: dnstap.pb/dnstap.pb-c.h