2001-10-10 20:56:27 +04:00
|
|
|
# $NetBSD: Makefile,v 1.35 2001/10/10 16:56:27 christos Exp $
|
1999-02-13 05:54:17 +03:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
1993-08-02 21:48:44 +04:00
|
|
|
|
2000-10-11 18:46:00 +04:00
|
|
|
WFORMAT= 1
|
1998-09-27 21:22:03 +04:00
|
|
|
MFILESDIR= /usr/share/misc
|
2001-10-10 20:56:27 +04:00
|
|
|
MFILES= magic magic.mgc magic.mime magic.mime.mgc
|
2000-05-15 02:53:37 +04:00
|
|
|
MAGIC= ${MFILESDIR}/magic
|
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
|
|
|
|
SRCS= file.c apprentice.c fsmagic.c softmagic.c ascmagic.c is_tar.c \
|
2000-09-22 20:34:59 +04:00
|
|
|
print.c compress.c readelf.c
|
2001-05-09 17:58:25 +04:00
|
|
|
CPPFLAGS+= -DMAGIC='"${MAGIC}"' -DHAVE_CONFIG_H -I${.CURDIR}
|
2001-03-27 04:48:59 +04:00
|
|
|
CPPFLAGS+= -DQUICK -DBUILTIN_ELF -DELFCORE
|
1994-12-22 15:29:38 +03:00
|
|
|
MAN= file.1 magic.5
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2001-10-10 20:56:27 +04:00
|
|
|
CLEANFILES+= mkmagic magic magic.mgc 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
|
|
|
|
2001-05-09 17:58:25 +04:00
|
|
|
MAGDIRF:sh= echo ${.CURDIR}/magdir/[0-9a-z]*
|
|
|
|
MAGFILES= ${.CURDIR}/Header \
|
|
|
|
${.CURDIR}/Localstuff \
|
|
|
|
${.CURDIR}/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"
|
2001-05-09 18:05:52 +04:00
|
|
|
magic: ${MAGFILES}
|
2001-05-09 17:58:25 +04:00
|
|
|
cat ${MAGFILES} > ${.TARGET}
|
2001-10-10 20:56:27 +04:00
|
|
|
|
2001-05-09 18:05:52 +04:00
|
|
|
magic.mgc: mkmagic magic
|
|
|
|
${.OBJDIR}/mkmagic magic
|
2001-10-10 20:56:27 +04:00
|
|
|
|
|
|
|
magic.mime.mgc: mkmagic magic.mime
|
|
|
|
.if ${.CURDIR} != ${.OBJDIR}
|
|
|
|
@cp -p ${.CURDIR}/magic.mime ${.OBJDIR}
|
|
|
|
.endif
|
|
|
|
${.OBJDIR}/mkmagic magic.mime
|
|
|
|
.if ${.CURDIR} != ${.OBJDIR}
|
|
|
|
@rm -f ${.OBJDIR}/magic.mime
|
|
|
|
.endif
|
1998-09-27 21:22:03 +04:00
|
|
|
.else
|
|
|
|
magic:
|
|
|
|
.endif
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2001-05-09 18:05:52 +04:00
|
|
|
mkmagic: apprentice.c print.c
|
|
|
|
${HOST_LINK.c} -o mkmagic -DHAVE_CONFIG_H -DQUICK -DCOMPILE_ONLY \
|
|
|
|
-I${.CURDIR} ${.CURDIR}/apprentice.c ${.CURDIR}/print.c
|
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
.include <bsd.prog.mk>
|