Makefile revision 20323
1# Makefile for file(1) cmd.
2# Copyright (c) Ian F. Darwin 86/09/01 - see LEGAL.NOTICE.
3# @(#)$Id: Makefile,v 1.5 1996/08/17 22:27:08 wosch Exp $
4#
5# This software is not subject to any license of the American Telephone
6# and Telegraph Company or of the Regents of the University of California.
7#
8# Permission is granted to anyone to use this software for any purpose on
9# any computer system, and to alter it and redistribute it freely, subject
10# to the following restrictions:
11#
12# 1. The author is not responsible for the consequences of use of this
13#    software, no matter how awful, even if they arise from flaws in it.
14#
15# 2. The origin of this software must not be misrepresented, either by
16#    explicit claim or by omission.  Since few users ever read sources,
17#    credits must appear in the documentation.
18#
19# 3. Altered versions must be plainly marked as such, and must not be
20#    misrepresented as being the original software.  Since few users
21#    ever read sources, credits must appear in the documentation.
22#
23# 4. This notice may not be removed or altered.
24#
25# Hacked and dismembered for bmake (Geoff Rehmet).
26MAGIC=		/usr/share/misc/magic
27MAGICOWN=	bin
28MAGICGRP=	bin
29MAGICMODE=	444
30
31
32CFLAGS+=	-DMAGIC='"$(MAGIC)"'
33
34PROG=		file
35SRCS=		file.c apprentice.c fsmagic.c softmagic.c ascmagic.c \
36		compress.c is_tar.c  print.c international.c
37
38MAN1=		file.1
39MAN5=		magic.5
40
41CLEANFILES+=	magic
42
43MAGFILES=	$(.CURDIR)/Magdir/Header\
44		$(.CURDIR)/Magdir/Localstuff\
45		$(.CURDIR)/Magdir/[a-z]*
46
47
48all:	file magic
49
50magic:	$(MAGFILES)
51	cat $(MAGFILES) > $(.TARGET)
52
53# called from /usr/src/etc/Makefile 
54beforeinstall:
55	${INSTALL} -c -o $(MAGICOWN) -g $(MAGICGRP) -m $(MAGICMODE) magic \
56	$(DESTDIR)$(MAGIC)
57
58.include <bsd.prog.mk>
59
60