Makefile revision 117081
1# $FreeBSD: head/sys/boot/ficl/Makefile 117081 2003-06-30 19:08:49Z ru $
2#
3.if ${MACHINE_ARCH} == "amd64"
4.MAKEFLAGS:  MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true
5.endif
6
7.PATH: ${.CURDIR}/${MACHINE_ARCH}
8BASE_SRCS=	dict.c ficl.c fileaccess.c float.c loader.c math64.c \
9		prefix.c search.c stack.c tools.c vm.c words.c
10
11SRCS=		${BASE_SRCS} sysdep.c softcore.c
12CLEANFILES=	softcore.c testmain testmain.o
13CFLAGS+=	-ffreestanding
14.if ${MACHINE_ARCH} == "alpha"
15CFLAGS+=	-mno-fp-regs
16.endif
17.if ${MACHINE_ARCH} == "i386"
18CFLAGS+=	-mpreferred-stack-boundary=2
19.endif
20.if ${MACHINE} == "pc98"
21CFLAGS+=	-DPC98
22.endif
23.if HAVE_PNP
24CFLAGS+=	-DHAVE_PNP
25.endif
26.ifmake testmain
27CFLAGS+=	-DTESTMAIN -D_TESTMAIN
28SRCS+=		testmain.c
29PROG=		testmain
30.include <bsd.prog.mk>
31.else
32LIB=		ficl
33INTERNALLIB=	yes
34.include <bsd.lib.mk>
35.endif
36
37# Standard softwords
38.PATH: ${.CURDIR}/softwords
39SOFTWORDS=	softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \
40		ifbrack.fr
41# Optional OO extension softwords
42#SOFTWORDS+=	oo.fr classes.fr
43
44.if defined(REALLY_AMD64)
45CFLAGS+=	-m32 -I.
46.endif
47
48CFLAGS+=	-I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH} -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 defined(REALLY_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