1 # $DragonFly: src/lib/libmagic/Makefile,v 1.19 2007/05/28 18:42:39 pavalos Exp $
3 CONTRIBDIR
= ${.CURDIR
}/..
/..
/contrib
/file-4
/src
4 MAGICDIR
= ${CONTRIBDIR}/..
/magic
7 MAGIC
= /usr
/share
/misc
/magic
12 SRCS
= apprentice.c apptype.c ascmagic.c compress.c fsmagic.c funcs.c\
13 is_tar.c magic.c
print.c readelf.c softmagic.c
16 LIBMAGIC_CDEFS
= -DHAVE_CONFIG_H
-DMAGIC
=\"${MAGIC}\"
17 CFLAGS
+= ${LIBMAGIC_CDEFS}
18 CFLAGS
+= -I
${.CURDIR
} -I
${CONTRIBDIR}
22 MLINKS
+= libmagic
.3 magic_open
.3
23 MLINKS
+= libmagic
.3 magic_close
.3
24 MLINKS
+= libmagic
.3 magic_error
.3
25 MLINKS
+= libmagic
.3 magic_errno
.3
26 MLINKS
+= libmagic
.3 magic_file
.3
27 MLINKS
+= libmagic
.3 magic_buffer
.3
28 MLINKS
+= libmagic
.3 magic_setflags
.3
29 MLINKS
+= libmagic
.3 magic_check
.3
30 MLINKS
+= libmagic
.3 magic_compile
.3
31 MLINKS
+= libmagic
.3 magic_load
.3
33 CLEANFILES
+= magic magic.mgc magic.mime.mgc magic.mime.lnk libmagic
.3
35 FILES
= magic magic.mgc
${MAGICDIR}/magic.mime magic.mime.mgc
36 FILESDIR
= /usr
/share
/misc
38 MAGFILES
= ${MAGICDIR}/Header
${MAGICDIR}/Localstuff\
39 ${MAGICDIR}/Magdir
/[a-z
]*
41 libmagic
.3: ${CONTRIBDIR}/..
/doc
/libmagic.man
42 sed
-e s@__CSECTION__@
1@g \
43 -e s@__FSECTION__@
5@g \
44 -e s@__MAGIC__@
${MAGIC}@g
${.ALLSRC
} > ${.TARGET
}
46 all: ${LIB} magic.mgc magic.mime.mgc
49 cat
${.ALLSRC
} > ${.TARGET
}
51 magic.mgc
: mkmagic.nx magic
54 magic.mime.mgc
: mkmagic.nx
${MAGICDIR}/magic.mime
55 .
/mkmagic.nx
${MAGICDIR}/magic.mime
57 CLEANFILES
+= mkmagic.nx
58 build-tools
: mkmagic.nx
60 NXCFLAGS
= ${LIBMAGIC_CDEFS} -DCOMPILE_ONLY
-I
${.OBJDIR
} -I-
-I
${.CURDIR
} -I
${CONTRIBDIR}
61 NXCFLAGS
+= -DBOOTSTRAPPING
62 mkmagic.nx
: file.h apprentice.c funcs.c magic.c
print.c
63 ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${.ALLSRC
} ${NXLDLIBS} -o
${.TARGET
}