1999-02-16 15:32:52 +03:00
|
|
|
# $NetBSD: Makefile,v 1.21 1999/02/16 12:32:52 he Exp $
|
1999-02-13 05:54:17 +03:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
1993-08-02 21:48:44 +04:00
|
|
|
|
1998-09-27 21:22:03 +04:00
|
|
|
MFILESDIR= /usr/share/misc
|
|
|
|
MFILES= magic
|
1999-02-16 15:32:52 +03:00
|
|
|
MAGIC= ${MFILESDIR}/${MFILES}
|
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 \
|
1997-01-28 03:49:36 +03:00
|
|
|
print.c compress.c readelf.c internat.c
|
1998-09-20 19:36:46 +04:00
|
|
|
CPPFLAGS+= -DMAGIC='"$(MAGIC)"' -DHAVE_SYS_WAIT_H -DHAVE_ST_RDEV
|
|
|
|
CPPFLAGS+= -DBUILTIN_ELF -DELFCORE
|
1994-12-22 15:29:38 +03:00
|
|
|
MAN= file.1 magic.5
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1993-06-10 04:37:55 +04:00
|
|
|
CLEANFILES+= magic
|
|
|
|
all: file magic
|
|
|
|
|
1997-05-18 01:15:35 +04:00
|
|
|
MAGDIRF:sh= echo $(.CURDIR)/magdir/[0-9a-z]*
|
1998-09-20 19:27:15 +04:00
|
|
|
MAGFILES= $(.CURDIR)/Header \
|
|
|
|
$(.CURDIR)/Localstuff \
|
1997-04-03 11:17:24 +04:00
|
|
|
$(.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"
|
1993-06-10 04:37:55 +04:00
|
|
|
magic: $(MAGFILES)
|
|
|
|
cat $(MAGFILES) > $(.TARGET)
|
1998-09-27 21:22:03 +04:00
|
|
|
.else
|
|
|
|
magic:
|
|
|
|
.endif
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|