1# $DragonFly: src/usr.bin/file/Makefile,v 1.9 2007/08/27 16:50:53 pavalos Exp $ 2 3CONTRIBDIR= ${.CURDIR}/../../contrib/file 4.PATH: ${CONTRIBDIR}/src 5 6LIBMAGICDIR= ${.CURDIR}/../../lib/libmagic 7CS= 1 8FS= 5 9VER!= grep -w VERSION ${LIBMAGICDIR}/config.h | awk -F\" '{print $$2}' 10MAGIC= /usr/share/misc/magic 11 12PROG= file 13MAN= file.1 magic.5 14WARNS?= 0 15 16CFLAGS+= -DHAVE_CONFIG_H -DMAGIC=\"${MAGIC}\" 17CFLAGS+= -I${LIBMAGICDIR} 18 19LDADD+= -lmagic -lz 20DPADD+= ${LIBMAGIC} ${LIBZ} 21 22file.1: ${CONTRIBDIR}/doc/file.man 23 sed -e s@__CSECTION__@${CS}@g \ 24 -e s@__FSECTION__@${FS}@g \ 25 -e s@__VERSION__@${VER}@g \ 26 -e s@__MAGIC__@${MAGIC}@g ${.ALLSRC} > ${.TARGET} 27 28magic.5: ${CONTRIBDIR}/doc/magic.man 29 sed -e s@__CSECTION__@${CS}@g \ 30 -e s@__FSECTION__@${FS}@g \ 31 -e s@__VERSION__@${VER}@g \ 32 -e s@__MAGIC__@${MAGIC}@g ${.ALLSRC} > ${.TARGET} 33 34CLEANFILES+= file.1 magic.5 35.include <bsd.prog.mk> 36