test/amd64: build and install modules
[dragonfly.git] / sys / boot / ficl / Makefile
blob68226a6fac1e0d74e5f67eff7b65f84f42f9a9ac
1 # $FreeBSD: src/sys/boot/ficl/Makefile,v 1.35 2003/06/30 19:08:49 ru Exp $
2 # $DragonFly: src/sys/boot/ficl/Makefile,v 1.10 2008/03/30 18:11:58 swildner Exp $
4 .if exists(../${MACHINE_PLATFORM}/Makefile.inc)
5 .include "../${MACHINE_PLATFORM}/Makefile.inc"
6 .endif
8 .PATH: ${.CURDIR}/${MACHINE_ARCH}
9 BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
10 prefix.c search.c stack.c tools.c vm.c words.c
12 SRCS= ${BASE_SRCS} sysdep.c softcore.c
14 CLEANFILES= softcore.c testmain testmain.o
15 CFLAGS+= -ffreestanding
16 .if HAVE_PNP
17 CFLAGS+= -DHAVE_PNP
18 .endif
19 .ifmake testmain
20 CFLAGS+= -DTESTMAIN -D_TESTMAIN
21 SRCS+= testmain.c
22 PROG= testmain
23 OBJS+= rel_open.o
25 rel_open.o: ../common/rel_open.c
27 .include <bsd.prog.mk>
28 .else
29 OBJS+= stack_protector.o
30 LIB= ficl
31 INTERNALLIB= yes
33 stack_protector.o: ../../libkern/stack_protector.c
35 .include <bsd.lib.mk>
36 .endif
38 # Standard softwords
39 .PATH: ${.CURDIR}/softwords
40 SOFTWORDS= softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \
41 ifbrack.fr
42 # Optional OO extension softwords
43 #SOFTWORDS+= oo.fr classes.fr
45 .if defined(REALLY_AMD64)
46 CFLAGS+= -m32 -I.
47 .endif
49 CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR}/../common
51 softcore.c: ${SOFTWORDS} softcore.awk
52 (cd ${.CURDIR}/softwords; cat ${SOFTWORDS} \
53 | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET}
55 .if defined(REALLY_AMD64)
56 ${SRCS:M*.c:R:S/$/.o/g}: machine
58 beforedepend ${OBJS}: machine
60 machine:
61 ${LN} -sf ${.CURDIR}/../../i386/include machine
63 CLEANFILES+= machine
64 .endif