]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - sys/boot/userboot/ficl/Makefile
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / sys / boot / userboot / ficl / Makefile
1 # $FreeBSD$
2 #
3 .include <bsd.own.mk>
4 MK_SSP=         no
5
6 .PATH: ${.CURDIR}/../../ficl
7 .PATH: ${.CURDIR}/../../ficl/${MACHINE_CPUARCH}
8 BASE_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
11 SRCS=           ${BASE_SRCS} sysdep.c softcore.c
12 CLEANFILES=     softcore.c testmain testmain.o
13 CFLAGS+=        -ffreestanding -fPIC
14 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
15 #CFLAGS+=       -march=i386
16 CFLAGS+=        -mno-mmx -mno-3dnow -mno-sse -mno-sse2
17 .endif
18 .if ${MACHINE_CPUARCH} == "i386"
19 CFLAGS+=        -mpreferred-stack-boundary=2
20 CFLAGS+=        -mno-sse3
21 .endif
22 .if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm"
23 CFLAGS+=        -msoft-float
24 .endif
25 .if ${MACHINE} == "pc98"
26 CFLAGS+=        -Os -DPC98
27 .endif
28 .if HAVE_PNP
29 CFLAGS+=        -DHAVE_PNP
30 .endif
31 .ifmake testmain
32 CFLAGS+=        -DTESTMAIN -D_TESTMAIN
33 SRCS+=          testmain.c
34 PROG=           testmain
35 .include <bsd.prog.mk>
36 .else
37 LIB=            ficl
38 INTERNALLIB=
39 .include <bsd.lib.mk>
40 .endif
41
42 # Standard softwords
43 .PATH: ${.CURDIR}/../../ficl/softwords
44 SOFTWORDS=      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
49 #.if ${MACHINE_CPUARCH} == "amd64"
50 #CFLAGS+=       -m32 -I.
51 #.endif
52
53 .if ${MACHINE_ARCH} == "powerpc64"
54 CFLAGS+=        -m32 -mcpu=powerpc -I.
55 .endif
56
57 CFLAGS+=        -I${.CURDIR}/../../ficl
58 CFLAGS+=        -I${.CURDIR}/../../ficl/${MACHINE_CPUARCH}
59 CFLAGS+=        -I${.CURDIR}/../../common
60
61 softcore.c: ${SOFTWORDS} softcore.awk
62         (cd ${.CURDIR}/../../ficl/softwords; cat ${SOFTWORDS} \
63             | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET}
64
65 #.if ${MACHINE_CPUARCH} == "amd64"
66 #${SRCS:M*.c:R:S/$/.o/g}: machine
67 #
68 #beforedepend ${OBJS}: machine
69 #
70 #machine:
71 #       ln -sf ${.CURDIR}/../../i386/include machine
72 #
73 #CLEANFILES+=   machine
74 #.endif