1 CONTRIBDIR
= ${.CURDIR
}/..
/..
/contrib
/file
/src
2 MAGICDIR
= ${CONTRIBDIR}/..
/magic
5 MAGIC
= ${FILESDIR}/magic
13 SRCS
= apprentice.c ascmagic.c cdf.c cdf_time.c \
14 compress.c encoding.c fsmagic.c funcs.c \
15 is_tar.c magic.c
print.c readcdf.c readelf.c softmagic.c
18 # only when __EMX__ (prog env for DOS and OS/2)
21 CFLAGS
+= -DHAVE_CONFIG_H
-DMAGIC
=\"${MAGIC}\"
22 CFLAGS
+= -I
${.CURDIR
} -I
${CONTRIBDIR}
26 MLINKS
+= libmagic
.3 magic_open
.3
27 MLINKS
+= libmagic
.3 magic_close
.3
28 MLINKS
+= libmagic
.3 magic_error
.3
29 MLINKS
+= libmagic
.3 magic_errno
.3
30 MLINKS
+= libmagic
.3 magic_descriptor
.3
31 MLINKS
+= libmagic
.3 magic_file
.3
32 MLINKS
+= libmagic
.3 magic_buffer
.3
33 MLINKS
+= libmagic
.3 magic_setflags
.3
34 MLINKS
+= libmagic
.3 magic_check
.3
35 MLINKS
+= libmagic
.3 magic_compile
.3
36 MLINKS
+= libmagic
.3 magic_list
.3
37 MLINKS
+= libmagic
.3 magic_load
.3
38 MLINKS
+= libmagic
.3 magic_load_buffers
.3
39 MLINKS
+= libmagic
.3 magic_setparam
.3
40 MLINKS
+= libmagic
.3 magic_getparam
.3
41 MLINKS
+= libmagic
.3 magic_version
.3
43 CLEANFILES
+= magic magic.mgc libmagic
.3
45 FILES
= magic magic.mgc
46 FILESDIR
= ${SHAREDIR}/misc
48 MAGFILES
= ${MAGICDIR}/Header
${MAGICDIR}/Localstuff\
49 ${MAGICDIR}/Magdir
/[a-z
]*
51 libmagic
.3: ${CONTRIBDIR}/..
/doc
/libmagic.man
52 sed
-e s@__CSECTION__@
1@g \
53 -e s@__FSECTION__@
5@g \
54 -e s@__MAGIC__@
${MAGIC}@g
${.ALLSRC
} > ${.TARGET
}
57 cat
${.ALLSRC
} > ${.TARGET
}
59 magic.mgc
: mkmagic.nx magic
62 CLEANFILES
+= mkmagic.nx
63 build-tools
: mkmagic.nx
65 NXCFLAGS
+= -w
-DCOMPILE_ONLY
66 mkmagic.nx
: apprentice.c encoding.c cdf_time.c funcs.c magic.c
print.c
67 ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${.ALLSRC
} ${NXLDLIBS} -o
${.TARGET
}