]> git.ipfire.org Git - people/ms/dma.git/blob - Makefile
flip the polarity of the compatibility macros to HAVE_*
[people/ms/dma.git] / Makefile
1 #
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
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/
39
40 aliases_parse.c: aliases_parse.y
41 ${YACC} -d -o aliases_parse.c aliases_parse.y
42
43 aliases_scan.c: aliases_scan.l
44 ${LEX} -t aliases_scan.l > aliases_scan.c
45
46 .SUFFIXES: .c .o
47
48 .c.o:
49 ${CC} ${CFLAGS} ${CPPFLAGS} -include dfcompat.h -o $@ -c $<
50
51 dma: ${OBJS}
52 ${CC} ${LDADD} -o $@ ${OBJS}