bmf-milter

bmf filter milter daemon
git clone git://r-36.net/bmf-milter
Log | Files | Refs | README | LICENSE

Makefile (1226B)


      1 # bmf-milter - milter daemon for bmf
      2 # See LICENSE file for copyright and license details.
      3 .POSIX:
      4 
      5 NAME = bmf-milter
      6 VERSION = 0.5
      7 
      8 PREFIX = /usr/local
      9 BINDIR = ${PREFIX}/sbin
     10 MANDIR = ${PREFIX}/share/man/man8
     11 
     12 BMFMILTER_CFLAGS = -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -I. -I/usr/include ${CFLAGS}
     13 BMFMILTER_LDFLAGS = -L/usr/lib -L. -lmilter ${LDFLAGS}
     14 
     15 SRC = bmf-milter.c
     16 OBJ = ${SRC:.c=.o}
     17 
     18 all: ${NAME}
     19 
     20 .c.o:
     21 	${CC} ${BMFMILTER_CFLAGS} -c $<
     22 
     23 ${OBJ}:
     24 
     25 ${NAME}: ${OBJ}
     26 	${CC} -o $@ ${OBJ} ${BMFMILTER_LDFLAGS}
     27 
     28 clean:
     29 	rm -f ${NAME} ${OBJ} ${NAME}-${VERSION}.tar.gz
     30 
     31 install: all
     32 	mkdir -p "${DESTDIR}${BINDIR}"
     33 	cp -f ${NAME} "${DESTDIR}${BINDIR}"
     34 	chmod 755 "${DESTDIR}${BINDIR}/${NAME}"
     35 	mkdir -p "${DESTDIR}${MANDIR}"
     36 	cp -f ${NAME}.8 "${DESTDIR}${MANDIR}"
     37 	chmod 644 "${DESTDIR}${MANDIR}/${NAME}.8"
     38 
     39 uninstall:
     40 	rm -f "${DESTDIR}${BINDIR}/${NAME}"
     41 	rm -f "${DESTDIR}${MANDIR}/${NAME}.8"
     42 
     43 dist: clean
     44 	mkdir -p ${NAME}-${VERSION}
     45 	cp -R README LICENSE Makefile ${NAME}.8 \
     46 	       	*.c *.h ${NAME}-${VERSION}
     47 	tar -cf ${NAME}-${VERSION}.tar ${NAME}-${VERSION}
     48 	gzip ${NAME}-${VERSION}.tar
     49 	mv ${NAME}-${VERSION}.tar.gz ${NAME}-${VERSION}.tgz
     50 	rm -rf "${NAME}-${VERSION}"
     51 
     52 .PHONY: all clean dist install uninstall