Makefile revision 134148
1# $FreeBSD: head/sys/boot/ficl/Makefile 134148 2004-08-22 06:24:59Z marcel $
2#
3.PATH: ${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/}
4BASE_SRCS=	dict.c ficl.c fileaccess.c float.c loader.c math64.c \
5		prefix.c search.c stack.c tools.c vm.c words.c
6
7SRCS=		${BASE_SRCS} sysdep.c softcore.c
8CLEANFILES=	softcore.c testmain testmain.o
9CFLAGS+=	-ffreestanding
10.if ${MACHINE_ARCH} == "alpha"
11CFLAGS+=	-mno-fp-regs -Os
12.endif
13.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
14CFLAGS+=	-mpreferred-stack-boundary=2
15.endif
16.if ${MACHINE_ARCH} == "powerpc"
17CFLAGS+=	-msoft-float
18.endif
19.if ${MACHINE} == "pc98"
20CFLAGS+=	-DPC98
21.endif
22.if HAVE_PNP
23CFLAGS+=	-DHAVE_PNP
24.endif
25.ifmake testmain
26CFLAGS+=	-DTESTMAIN -D_TESTMAIN
27SRCS+=		testmain.c
28PROG=		testmain
29.include <bsd.prog.mk>
30.else
31LIB=		ficl
32INTERNALLIB=	yes
33.include <bsd.lib.mk>
34.endif
35
36# Standard softwords
37.PATH: ${.CURDIR}/softwords
38SOFTWORDS=	softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \
39		ifbrack.fr
40# Optional OO extension softwords
41#SOFTWORDS+=	oo.fr classes.fr
42
43.if ${MACHINE_ARCH} == "amd64"
44CFLAGS+=	-m32 -I.
45.endif
46
47CFLAGS+=	-I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH:S/amd64/i386/} \
48		-I${.CURDIR}/../common
49
50softcore.c: ${SOFTWORDS} softcore.awk
51	(cd ${.CURDIR}/softwords; cat ${SOFTWORDS} \
52	    | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET}
53
54.if ${MACHINE_ARCH} == "amd64"
55${SRCS:M*.c:R:S/$/.o/g}: machine
56
57beforedepend ${OBJS}: machine
58
59machine:
60	ln -sf ${.CURDIR}/../../i386/include machine
61
62CLEANFILES+=	machine
63.endif
64