Steal the code from kmod.mk and use it to automatically create links. Modify it a little for the needs of the loader (no need to guess the OBJS dependency, and we have 32-on-64 cases to contend with). Remove 15 redundant implementations (which were mostly different, but kinda the same). A future commit should factor out this code and that of kmod.mk so we have only one copy of it in the tree. Sposnored by: Netflix
32 lines
597 B
Makefile
32 lines
597 B
Makefile
# $FreeBSD$
|
|
|
|
# Common flags to build FICL related files
|
|
|
|
.include "defs.mk"
|
|
|
|
.if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 1
|
|
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 ${DO32:U0} == 1
|
|
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
|