1# $FreeBSD: head/usr.bin/file/Makefile 84688 2001-10-08 22:57:03Z obrien $
2# Makefile for file(1) cmd.
3# Copyright (c) Ian F. Darwin 86/09/01 - see LEGAL.NOTICE.
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
--- 14 unchanged lines hidden (view full) ---
24
25PROG= file
26MAN= file.1 magic.5
27SRCS= file.c apprentice.c fsmagic.c softmagic.c ascmagic.c \
28 compress.c is_tar.c readelf.c print.c
29# compress.c is_tar.c readelf.c internat.c print.c
30
31MAGICPATH= /usr/share/misc
32MAGICMODE= 444
33
34CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DBUILTIN_ELF -DELFCORE -DHAVE_CONFIG_H
35CFLAGS+= -I${.CURDIR} -I${SRCDIR}
36
37CLEANFILES+= magic magic.mgc magic.mime.mgc magic.mime.PITA
38
39MAGFILES= ${SRCDIR}/Header\
40 ${SRCDIR}/Localstuff\
41 ${SRCDIR}/Magdir/[a-z]*
42
43all: ${PROG} magic.mgc magic.mime.mgc
44
45magic: ${MAGFILES}
46 cat ${.ALLSRC} > ${.TARGET}
--- 7 unchanged lines hidden (view full) ---
54 mv magic.mime.PITA.mgc magic.mime.mgc
55
56CLEANFILES+= mkmagic
57build-tools: mkmagic
58mkmagic: apprentice.c print.c
59 ${CC} -DHAVE_CONFIG_H -DCOMPILE_ONLY \
60 -I${.CURDIR} -I${SRCDIR} -o ${.TARGET} ${.ALLSRC}
61
62beforeinstall:
63 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${MAGICMODE} \
64 magic magic.mgc ${SRCDIR}/magic.mime magic.mime.mgc \
65 ${DESTDIR}${MAGICPATH}
66
67.include <bsd.prog.mk>
2# Makefile for file(1) cmd.
3# Copyright (c) Ian F. Darwin 86/09/01 - see LEGAL.NOTICE.
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
--- 14 unchanged lines hidden (view full) ---
24
25PROG= file
26MAN= file.1 magic.5
27SRCS= file.c apprentice.c fsmagic.c softmagic.c ascmagic.c \
28 compress.c is_tar.c readelf.c print.c
29# compress.c is_tar.c readelf.c internat.c print.c
30
31MAGICPATH= /usr/share/misc
32MAGICMODE= 444
33
34CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DBUILTIN_ELF -DELFCORE -DHAVE_CONFIG_H
35CFLAGS+= -I${.CURDIR} -I${SRCDIR}
36
37CLEANFILES+= magic magic.mgc magic.mime.mgc magic.mime.PITA
38
39MAGFILES= ${SRCDIR}/Header\
40 ${SRCDIR}/Localstuff\
41 ${SRCDIR}/Magdir/[a-z]*
42
43all: ${PROG} magic.mgc magic.mime.mgc
44
45magic: ${MAGFILES}
46 cat ${.ALLSRC} > ${.TARGET}
--- 7 unchanged lines hidden (view full) ---
54 mv magic.mime.PITA.mgc magic.mime.mgc
55
56CLEANFILES+= mkmagic
57build-tools: mkmagic
58mkmagic: apprentice.c print.c
59 ${CC} -DHAVE_CONFIG_H -DCOMPILE_ONLY \
60 -I${.CURDIR} -I${SRCDIR} -o ${.TARGET} ${.ALLSRC}
61
62beforeinstall:
63 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${MAGICMODE} \
64 magic magic.mgc ${SRCDIR}/magic.mime magic.mime.mgc \
65 ${DESTDIR}${MAGICPATH}
66
67.include <bsd.prog.mk>