--- Makefile.tmpl.orig Sun Nov 27 21:52:05 2005 +++ Makefile.tmpl Sat Dec 17 09:14:03 2005 @@ -26,17 +26,17 @@ INCLUDEDIR = -I. -I${SMDIR}/include INCLUDEDIR += -CFLAGS = -Wall -pthread +CFLAGS += -Wall -pthread #CFLAGS += -ggdb -g3 CFLAGS += OFLAGS = -LDFLAGS = +LDFLAGS += -LIBS = -lmilter +LIBS += -lmilter LIBS += -lsmutil -lresolv -ldb LIBS += -lsmutil -lresolv -lsocket -lnsl -lxnet -lpthread LIBS += -LIBDIRS = -L${SMDIR}/libmilter +LIBDIRS += -L${SMDIR}/libmilter LIBDIRS = -L${SMDIR}/libmilter LIBDIRS = -L${SMOBJDIR}/libmilter -L${SMOBJDIR}/libsmutil -L/usr/lib LIBDIRS = -L${SMOBJDIR}/libmilter -L${SMOBJDIR}/libsmutil -L/usr/lib @@ -62,7 +62,7 @@ clean: rm -f *.o *core spamilter dnsblchk dnsblupd mxlookup iflookup -install: spamilter install-dnsblchk install-dnsblupd install-mxlookup +install: spamilter install-dnsblchk install-dnsblupd install-mxlookup install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} spamilter ${BINDIR} install-dnsblchk: dnsblchk @@ -84,23 +84,23 @@ cd ..; tar --exclude CVS -cfvz spamilter.tgz spamilter/* spamilter: Makefile ${SRCS} spamilter.o ${OBJS} ${INCLUDES} - ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} ${LIBDIRS} ${LIBS} + ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} ${LDFLAGS} ${LIBDIRS} ${LIBS} dnsblchk: Makefile ${SRCS} dnsblchk.o ${OBJS} ${INCLUDES} dnsblchk.c - ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o ${LIBDIRS} ${LIBS} + ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o ${LDFLAGS} ${LIBDIRS} ${LIBS} # dnsblupd is for use with the companion shell script blupd as an Exec action dnsblupd: Makefile dnsblupd.c dnsupdate.c dns.c dnsblupd.o dnsupdate.o dns.o dnsupdate.h dns.h config.h - ${CC} ${CFLAGS} -o dnsblupd dnsblupd.o dnsupdate.o dns.o ${LIBDIRS} ${LIBS} + ${CC} ${CFLAGS} -o dnsblupd dnsblupd.o dnsupdate.o dns.o ${LDFLAGS} ${LIBDIRS} ${LIBS} ipfwmtad: Makefile ipfwmtad.c ipfw_direct.c inet.c misc.c uam.o ipfwmtad.o ipfw_direct.o inet.o misc.o uam.o key.o inet.h misc.h uam.h key.h config.h ${CC} ${CFLAGS} -o ipfwmtad ipfwmtad.o ipfw_direct.o inet.o misc.o uam.o key.o -lcrypto -lcrypt mxlookup: Makefile mxlookup.c mx.c mxlookup.o mx.o mx.h - ${CC} ${CFLAGS} -o mxlookup mxlookup.o mx.o ${LIBDIRS} ${LIBS} + ${CC} ${CFLAGS} -o mxlookup mxlookup.o mx.o ${LDFLAGS} ${LIBDIRS} ${LIBS} iflookup: Makefile iflookup.c ifi.c iflookup.o ifi.o ifi.h - ${CC} ${CFLAGS} -o iflookup iflookup.o ifi.o ${LIBDIRS} ${LIBS} + ${CC} ${CFLAGS} -o iflookup iflookup.o ifi.o ${LDFLAGS} ${LIBDIRS} ${LIBS} .c.o: Makefile ${INCLUDES} ${CC} ${CFLAGS} ${OFLAGS} ${INCLUDEDIR} -c $*.c