dma: add a plain Makefile for other systems
authorSimon Schubert <corecode@dragonflybsd.org>
Sat, 3 Oct 2009 19:38:06 +0000 (21:38 +0200)
committerSimon Schubert <corecode@dragonflybsd.org>
Sat, 3 Oct 2009 20:45:30 +0000 (22:45 +0200)
Submitted-by: Michel Salim <salimma@fedoraproject.org>
libexec/dma/Makefile.plain [new file with mode: 0644]

diff --git a/libexec/dma/Makefile.plain b/libexec/dma/Makefile.plain
new file mode 100644 (file)
index 0000000..89db7aa
--- /dev/null
@@ -0,0 +1,48 @@
+#
+# If you want to compile dma for Linux, you probably have to do:
+# make -f Makefile.plain CPPFLAGS="-DNEED_REALLOCF -DNEED_STRLCPY \
+#      -DNEED_GETPROGNAME"
+#
+
+CC?=           gcc
+CFLAGS?=       -O -pipe
+LDADD?=                -lssl -lcrypto -lresolv
+
+INSTALL?=      install -p
+PREFIX?=       /usr/local
+SBIN?=         ${PREFIX}/sbin
+CONFDIR?=      ${PREFIX}/etc
+MAN?=          ${PREFIX}/share/man
+
+YACC?=         yacc
+LEX?=          lex
+
+OBJS=  aliases_parse.o aliases_scan.o base64.o conf.o crypto.o
+OBJS+= dma.o dns.o local.o mail.o net.o spool.o util.o
+OBJS+= dfcompat.o
+
+all: dma
+
+clean:
+       -rm -f .depend dma *.[do]
+       -rm -f aliases_parse.[ch] aliases_scan.c
+install: all
+       ${INSTALL} -d ${DESTDIR}${SBIN} ${DESTDIR}${CONFDIR}
+       ${INSTALL} -d ${DESTDIR}${MAN}/man8
+       ${INSTALL} -m 0755 dma ${DESTDIR}${SBIN}
+       ${INSTALL} -m 0644 dma.8 ${DESTDIR}${MAN}/man8/
+
+aliases_parse.c: aliases_parse.y
+       ${YACC} -d -o aliases_parse.c aliases_parse.y
+
+aliases_scan.c: aliases_scan.l
+       ${LEX} -t aliases_scan.l > aliases_scan.c
+
+.SUFFIXES: .c .o
+
+.c.o:
+       ${CC} ${CFLAGS} ${CPPFLAGS} -include dfcompat.h -o $@ -c $<
+
+dma: ${OBJS}
+       ${CC} ${LDADD} -o $@ ${OBJS}