freebsd-dev/sys/boot/ficl.mk
Warner Losh 05c2ec42c6 Cleanup non-arch Makefiles
Use SYSDIR, BOOTSRC, LDRSRC and FDTSRC in preference to relative
paths. Also, use bsd.init.mk where needed.

Sponsored by: Netflix
2017-10-29 05:27:22 +00:00

45 lines
829 B
Makefile

# $FreeBSD$
# Common flags to build FICL related files
.include "defs.mk"
.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
FICL_CPUARCH= i386
.elif ${MACHINE_ARCH:Mmips64*} != ""
FICL_CPUARCH= mips64
.else
FICL_CPUARCH= ${MACHINE_CPUARCH}
.endif
.PATH: ${FICLSRC} ${FICLSRC}/${FICL_CPUARCH}
.if ${MACHINE_CPUARCH} == "amd64"
.if defined(FICL32)
CFLAGS+= -m32 -I.
.else
CFLAGS+= -fPIC
.endif
.endif
.if ${MACHINE_ARCH} == "powerpc64"
CFLAGS+= -m32 -mcpu=powerpc -I.
.endif
CFLAGS+= -I${FICLSRC} -I${FICLSRC}/${FICL_CPUARCH} -I${LDRSRC}
CFLAGS+= -DBOOT_FORTH
CFLAGS+= -DBF_DICTSIZE=15000
.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
.if !exists(machine)
${SRCS:M*.c:R:S/$/.o/g}: machine
beforedepend ${OBJS}: machine
.endif
machine: .NOMETA
ln -sf ${SYSDIR}/i386/include machine
CLEANFILES+= machine
.endif