ALTQ support.
[dragonfly.git] / sys / boot / ficl / Makefile
CommitLineData
5ee58eed 1# $FreeBSD: src/sys/boot/ficl/Makefile,v 1.35 2003/06/30 19:08:49 ru Exp $
777b905f 2# $DragonFly: src/sys/boot/ficl/Makefile,v 1.4 2004/03/05 21:38:44 joerg Exp $
984263bc 3#
5ee58eed
MD
4.if ${MACHINE_ARCH} == "amd64"
5.MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true
6.endif
7
8.PATH: ${.CURDIR}/${MACHINE_ARCH}
9BASE_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
11
12SRCS= ${BASE_SRCS} sysdep.c softcore.c
777b905f
JS
13OBJS+= stack_protector.o
14
15stack_protector.o: ../../libkern/stack_protector.c
16
5ee58eed
MD
17CLEANFILES= softcore.c testmain testmain.o
18CFLAGS+= -ffreestanding
984263bc 19.if ${MACHINE_ARCH} == "alpha"
5ee58eed 20CFLAGS+= -mno-fp-regs
984263bc
MD
21.endif
22.if ${MACHINE_ARCH} == "i386"
5ee58eed
MD
23CFLAGS+= -mpreferred-stack-boundary=2
24.endif
25.if ${MACHINE} == "pc98"
26CFLAGS+= -DPC98
27.endif
28.if HAVE_PNP
29CFLAGS+= -DHAVE_PNP
984263bc
MD
30.endif
31.ifmake testmain
5ee58eed
MD
32CFLAGS+= -DTESTMAIN -D_TESTMAIN
33SRCS+= testmain.c
34PROG= testmain
984263bc
MD
35.include <bsd.prog.mk>
36.else
5ee58eed
MD
37LIB= ficl
38INTERNALLIB= yes
984263bc
MD
39.include <bsd.lib.mk>
40.endif
41
42# Standard softwords
5ee58eed 43.PATH: ${.CURDIR}/softwords
984263bc
MD
44SOFTWORDS= softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \
45 ifbrack.fr
46# Optional OO extension softwords
47#SOFTWORDS+= oo.fr classes.fr
48
5ee58eed
MD
49.if defined(REALLY_AMD64)
50CFLAGS+= -m32 -I.
51.endif
52
53CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR}/../common
984263bc 54
5ee58eed 55softcore.c: ${SOFTWORDS} softcore.awk
984263bc
MD
56 (cd ${.CURDIR}/softwords; cat ${SOFTWORDS} \
57 | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET}
58
5ee58eed
MD
59.if defined(REALLY_AMD64)
60${SRCS:M*.c:R:S/$/.o/g}: machine
61
62beforedepend ${OBJS}: machine
984263bc 63
5ee58eed
MD
64machine:
65 ln -sf ${.CURDIR}/../../i386/include machine
66
67CLEANFILES+= machine
68.endif