Cleanup USB stick image generation.
[dragonfly.git] / usr.bin / file / Makefile
blob8b1e5565475ec2539e92a5a75a36a609e77a419d
1 # $DragonFly: src/usr.bin/file/Makefile,v 1.9 2007/08/27 16:50:53 pavalos Exp $
3 CONTRIBDIR= ${.CURDIR}/../../contrib/file-4
4 .PATH: ${CONTRIBDIR}/src
6 LIBMAGICDIR= ${.CURDIR}/../../lib/libmagic
7 CS= 1
8 FS= 5
9 VER!= grep -w VERSION ${LIBMAGICDIR}/config.h | awk -F\" '{print $$2}'
10 MAGIC= /usr/share/misc/magic
12 PROG= file
13 MAN= file.1 magic.5
14 WARNS?= 0
16 CFLAGS+= -DHAVE_CONFIG_H -DMAGIC=\"${MAGIC}\"
17 CFLAGS+= -I${LIBMAGICDIR}
19 LDADD+= -lmagic -lz
20 DPADD+= ${LIBMAGIC} ${LIBZ}
22 file.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}
28 magic.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}
34 CLEANFILES+= file.1 magic.5
35 .include <bsd.prog.mk>