mk: allow separate objdir for lib
[unleashed.git] / Makefile
blobcbaca71553c01b301efee903b2c2012e65c4e5c7
1 SUBDIR = bin \
2 include \
3 kernel \
4 lib \
5 share
7 .include <bsd.subdir.mk>
10 # Config related support
13 .if !empty(BUILD_ARCH)
14 CFGARCH=${BUILD_ARCH}
15 .elif ${MACHINE} == "i86pc" || ${MACHINE} == "i386" || ${MACHINE} == "amd64"
16 CFGARCH=x86
17 .elif ${MACHINE} == "sparc"
18 CFGARCH=sparc
19 .else
20 .error "Unknown machine architecture ${MACHINE}; override it via BUILD_ARCH"
21 .endif
23 CFGFILE=arch/${CFGARCH}/Sconfig
25 gen-config:
26 ${.MAKE} -C tools
27 ${.CURDIR}/tools/mkconfig/mkconfig -I _SYS_CFGPARAM_H -H -o include/sys/cfgparam.h ${CFGFILE}
28 ${.CURDIR}/tools/mkconfig/mkconfig -m -o usr/src/Makefile.cfgparam ${CFGFILE}
29 ${.CURDIR}/tools/mkconfig/mkconfig -M -o Makefile.cfgparam ${CFGFILE}
31 .PHONY: gen-config