Use `KMOD_SRCS` to pass extra kernel module sourcs.

For example, if you have an extra FreeBSD kernel module, and want to
compile it into F-Stack, you can do it like this:
```
cd f-stack/lib
export "KMOD_SRCS=/your/kmod/path/a.c /your/kmod/path/b.c"
export "CONF_CFLAGS=-I/your/kmod/path"
make
```
dev
logwang 2017-10-25 15:19:26 +08:00
parent 20a9422e03
commit c36e692a8e
2 changed files with 4 additions and 1 deletions

View File

@ -421,6 +421,9 @@ SRCS+= ${NETIPSEC_SRCS} ${OPENCRYPTO_SRCS} ${VM_SRCS}
# If witness is enabled.
# SRCS+= ${KERN_WITNESS_SRCS}
# Extra FreeBSD kernel module srcs.
SRCS+= ${KMOD_SRCS}
HOST_SRCS = ${FF_HOST_SRCS}
ASM_OBJS+= $(patsubst %.S,%.o,${ASM_SRCS})

View File

@ -79,7 +79,7 @@ CFLAGS+= ${CONF_CFLAGS}
# Optional linting. This can be overridden in /etc/make.conf.
LINTFLAGS= ${LINTOBJKERNFLAGS}
NORMAL_C= ${CC} -c ${CFLAGS} ${KERNEL_CFLAGS} ${INCLUDES} ${WERROR} ${PROF} $<
NORMAL_C= ${CC} -c ${CFLAGS} ${KERNEL_CFLAGS} ${INCLUDES} ${WERROR} ${PROF} $< -o $@
NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${INCLUDES} ${WERROR} $<
PROFILE_C= ${CC} -c ${CFLAGS} ${KERNEL_CFLAGS} ${INCLUDES} ${WERROR} $<
NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${KERNEL_CFLAGS} ${INCLUDES} ${PROF} $<