summarylogtreecommitdiffstats
path: root/Makefile
blob: deb548c3bcb79717e555e3c33e5dd65fb4a49847 (plain)
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
filter_dkimsign_obj += filter-dkimsign/main.o
filter_dkimsign_obj += filter-dkimsign/mheader.o
libopensmtpd_obj += libopensmtpd/iobuf.o
libopensmtpd_obj += libopensmtpd/ioev.o
libopensmtpd_obj += libopensmtpd/opensmtpd.o
openbsd_compat_obj += libopensmtpd/openbsd-compat/recallocarray.o
openbsd_compat_obj += libopensmtpd/openbsd-compat/strlcat.o
openbsd_compat_obj += libopensmtpd/openbsd-compat/strlcpy.o
openbsd_compat_obj += libopensmtpd/openbsd-compat/strtonum.o

libraries += -lssl -lcrypto -levent

CPPFLAGS += -Ilibopensmtpd
CPPFLAGS += -Ilibopensmtpd/openbsd-compat

CPPFLAGS += -D_DEFAULT_SOURCE
CPPFLAGS += -DNEED_OPENBSD_COMPAT=1
CPPFLAGS += -DNEED_RECALLOCARRAY=1
CPPFLAGS += -DNEED_STRLCAT=1
CPPFLAGS += -DNEED_STRLCPY=1
CPPFLAGS += -DNEED_STRTONUM=1
CPPFLAGS += -DNO_PLEDGE=1

.PHONY: clean

filter-dkimsign/filter-dkimsign: $(filter_dkimsign_obj) $(libopensmtpd_obj) $(openbsd_compat_obj)
	$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" $^ $(libraries)

clean:
	rm -rf filter-dkimsign/filter-dkimsign $(filter_dkimsign_obj) $(libopensmtpd_obj) $(openbsd_compat_obj)