]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/boot/ficl.mk
Prefer SRCTOP paths for bits we're grabbing from libc.
[FreeBSD/FreeBSD.git] / sys / boot / ficl.mk
1 # $FreeBSD$
2
3 # Common flags to build FICL related files
4
5 .include "defs.mk"
6
7 .if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
8 FICL_CPUARCH=   i386
9 .elif ${MACHINE_ARCH:Mmips64*} != ""
10 FICL_CPUARCH=   mips64
11 .else
12 FICL_CPUARCH=   ${MACHINE_CPUARCH}
13 .endif
14
15 .PATH: ${FICLSRC} ${FICLSRC}/${FICL_CPUARCH}
16
17 .if ${MACHINE_CPUARCH} == "amd64"
18 .if defined(FICL32)
19 CFLAGS+=        -m32 -I.
20 .else
21 CFLAGS+=        -fPIC
22 .endif
23 .endif
24
25 .if ${MACHINE_ARCH} == "powerpc64"
26 CFLAGS+=        -m32 -mcpu=powerpc -I.
27 .endif
28
29 CFLAGS+=        -I${FICLSRC} -I${FICLSRC}/${FICL_CPUARCH} -I${LDRSRC}
30 CFLAGS+=        -DBOOT_FORTH
31 CFLAGS+=        -DBF_DICTSIZE=15000
32
33 .if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
34 .if !exists(machine)
35 ${SRCS:M*.c:R:S/$/.o/g}: machine
36
37 beforedepend ${OBJS}: machine
38 .endif
39
40 machine: .NOMETA
41         ln -sf ${.CURDIR}/../../i386/include machine
42
43 CLEANFILES+=    machine
44 .endif