NetBSD/usr.bin/file/Makefile

53 lines
1.1 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.45 2003/05/26 13:42:33 pooka Exp $
.include <bsd.own.mk>
2003-03-26 03:05:02 +03:00
DIST= ${NETBSDSRCDIR}/dist/file
.PATH: ${DIST}/src ${DIST}/doc
WFORMAT= 1
MFILESDIR= /usr/share/misc
2003-03-26 03:05:02 +03:00
MFILES= magic magic.mgc ${DIST}/magic/magic.mime magic.mime.mgc
2000-05-15 02:53:37 +04:00
MAGIC= ${MFILESDIR}/magic
MKMAGIC?= ${.OBJDIR}/file
2003-03-26 03:05:02 +03:00
.if ${MKSHARE} != "no"
FILESDIR= ${MFILESDIR}
FILES= ${MFILES}
.endif
1993-03-21 12:45:37 +03:00
PROG= file
2003-03-26 03:05:02 +03:00
SRCS= file.c
CPPFLAGS+= -DMAGIC='"${MAGIC}"' -DHAVE_CONFIG_H -DQUICK -DBUILTIN_ELF \
-DELFCORE
CPPFLAGS+= -I${.CURDIR}/../../lib/libmagic -I${DIST}
LDADD+= -lmagic -lz
1994-12-22 15:29:38 +03:00
MAN= file.1 magic.5
1993-03-21 12:45:37 +03:00
CLEANFILES+= magic magic.mgc magic.mime magic.mime.mgc
2001-05-30 00:22:05 +04:00
.if ${MKSHARE} != "no"
2001-10-10 20:56:27 +04:00
realall: file magic magic.mgc magic.mime.mgc
2001-05-30 00:22:05 +04:00
.endif
2003-03-26 03:05:02 +03:00
MAGDIRF:sh= echo ${DIST}/magic/magdir/[0-9a-z]*
MAGFILES= ${DIST}/magic/Header \
${DIST}/magic/Localstuff \
${DIST}/magic/magdir/netbsd \
${MAGDIRF}
1997-03-25 00:57:01 +03:00
.if ${MKSHARE} != "no"
2003-03-26 03:05:02 +03:00
magic: ${MAGFILES}
2003-04-05 16:30:51 +04:00
${CAT} ${MAGFILES} > ${.TARGET}
2001-10-10 20:56:27 +04:00
2003-03-26 03:05:02 +03:00
magic.mgc: magic
${MKMAGIC} -C -m magic
2001-10-10 20:56:27 +04:00
2003-03-26 03:05:02 +03:00
magic.mime.mgc:
cp ${DIST}/magic/magic.mime ${.OBJDIR}
${MKMAGIC} -C -m magic.mime
.else
magic:
.endif
1993-03-21 12:45:37 +03:00
.include <bsd.prog.mk>