]>
Commit | Line | Data |
---|---|---|
86e4d161 | 1 | # |
0eaf0584 SS |
2 | # Depending on your operating system, you might want to influence |
3 | # the conditional inclusion of some helper functions: | |
4 | # | |
5 | # Define HAVE_* (in caps) if your system already provides: | |
6 | # reallocf | |
7 | # strlcpy | |
8 | # getprogname | |
f8352d61 SS |
9 | # |
10 | ||
11 | CC?= gcc | |
12 | CFLAGS?= -O -pipe | |
13 | LDADD?= -lssl -lcrypto -lresolv | |
14 | ||
15 | INSTALL?= install -p | |
16 | PREFIX?= /usr/local | |
17 | SBIN?= ${PREFIX}/sbin | |
18 | CONFDIR?= ${PREFIX}/etc | |
19 | MAN?= ${PREFIX}/share/man | |
20 | ||
21 | YACC?= yacc | |
22 | LEX?= lex | |
23 | ||
24 | OBJS= aliases_parse.o aliases_scan.o base64.o conf.o crypto.o | |
25 | OBJS+= dma.o dns.o local.o mail.o net.o spool.o util.o | |
26 | OBJS+= dfcompat.o | |
27 | ||
28 | all: dma | |
29 | ||
30 | clean: | |
31 | -rm -f .depend dma *.[do] | |
32 | -rm -f aliases_parse.[ch] aliases_scan.c | |
33 | ||
34 | install: all | |
35 | ${INSTALL} -d ${DESTDIR}${SBIN} ${DESTDIR}${CONFDIR} | |
36 | ${INSTALL} -d ${DESTDIR}${MAN}/man8 | |
37 | ${INSTALL} -m 0755 dma ${DESTDIR}${SBIN} | |
38 | ${INSTALL} -m 0644 dma.8 ${DESTDIR}${MAN}/man8/ | |
86e4d161 | 39 | |
f8352d61 SS |
40 | aliases_parse.c: aliases_parse.y |
41 | ${YACC} -d -o aliases_parse.c aliases_parse.y | |
86e4d161 | 42 | |
f8352d61 SS |
43 | aliases_scan.c: aliases_scan.l |
44 | ${LEX} -t aliases_scan.l > aliases_scan.c | |
86e4d161 | 45 | |
f8352d61 | 46 | .SUFFIXES: .c .o |
86e4d161 | 47 | |
f8352d61 SS |
48 | .c.o: |
49 | ${CC} ${CFLAGS} ${CPPFLAGS} -include dfcompat.h -o $@ -c $< | |
86e4d161 | 50 | |
f8352d61 SS |
51 | dma: ${OBJS} |
52 | ${CC} ${LDADD} -o $@ ${OBJS} |