2003-10-21 14:01:19 +04:00
|
|
|
# $NetBSD: Makefile,v 1.49 2003/10/21 10:01:22 lukem Exp $
|
1999-02-13 05:54:17 +03:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
1993-08-02 21:48:44 +04:00
|
|
|
|
2003-03-26 03:05:02 +03:00
|
|
|
DIST= ${NETBSDSRCDIR}/dist/file
|
|
|
|
.PATH: ${DIST}/src ${DIST}/doc
|
|
|
|
|
2000-10-11 18:46:00 +04:00
|
|
|
WFORMAT= 1
|
1998-09-27 21:22:03 +04:00
|
|
|
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
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_MKMAGIC?= ${.OBJDIR}/file
|
2003-03-26 03:05:02 +03:00
|
|
|
|
1999-02-13 05:54:17 +03:00
|
|
|
.if ${MKSHARE} != "no"
|
1998-09-27 21:22:03 +04:00
|
|
|
FILESDIR= ${MFILESDIR}
|
|
|
|
FILES= ${MFILES}
|
|
|
|
.endif
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1993-06-10 04:37:55 +04: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}
|
2003-04-12 06:15:22 +04:00
|
|
|
LDADD+= -lmagic -lz
|
2003-09-17 04:41:17 +04:00
|
|
|
DPADD+= ${LIBMAGIC} ${LIBZ}
|
1994-12-22 15:29:38 +03:00
|
|
|
MAN= file.1 magic.5
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2003-05-26 17:42:33 +04: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
|
1993-06-10 04:37:55 +04:00
|
|
|
|
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 \
|
1997-05-18 01:15:35 +04:00
|
|
|
${MAGDIRF}
|
1997-03-25 00:57:01 +03:00
|
|
|
|
1999-02-13 05:54:17 +03:00
|
|
|
.if ${MKSHARE} != "no"
|
2003-03-26 03:05:02 +03:00
|
|
|
magic: ${MAGFILES}
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_CAT} ${MAGFILES} > ${.TARGET}
|
2001-10-10 20:56:27 +04:00
|
|
|
|
2003-03-26 03:05:02 +03:00
|
|
|
magic.mgc: magic
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-10-19 08:30:30 +04:00
|
|
|
${TOOL_MKMAGIC} -C -m magic
|
2001-10-10 20:56:27 +04:00
|
|
|
|
2003-03-26 03:05:02 +03:00
|
|
|
magic.mime.mgc:
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2003-05-26 17:42:33 +04:00
|
|
|
cp ${DIST}/magic/magic.mime ${.OBJDIR}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_MKMAGIC} -C -m magic.mime
|
1998-09-27 21:22:03 +04:00
|
|
|
.else
|
|
|
|
magic:
|
|
|
|
.endif
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|