FEATURES: add notes about compilation env changes
[unleashed.git] / Makefile
blob5c1156e465c14c81fe1b7f0493bef7d8e84a2a5d
1 SUBDIR = bin \
2 boot \
3 etc \
4 include \
5 kernel \
6 lib \
7 libexec \
8 share
10 .-include "cfgparam.mk"
12 .ifdef CONFIG_MACH64 && DESTDIR
13 build:
14 ${.MAKE} obj
15 ${.MAKE}
16 ${.MAKE} install
18 .include <unleashed.mk>
19 .endif
21 .include <subdir.mk>
24 # Config related support
27 .if !empty(BUILD_ARCH)
28 CFGARCH=${BUILD_ARCH}
29 .elif ${MACHINE} == "i86pc" || ${MACHINE} == "i386" || ${MACHINE} == "amd64"
30 CFGARCH=x86
31 .elif ${MACHINE} == "sparc"
32 CFGARCH=sparc
33 .else
34 .error "Unknown machine architecture ${MACHINE}; override it via BUILD_ARCH"
35 .endif
37 CFGFILE=arch/${CFGARCH}/Sconfig
39 gen-config:
40 ${.MAKE} -C tools cleandir
41 ${.MAKE} -C tools obj
42 ${.MAKE} -C tools
43 ${.CURDIR}/tools/mkconfig/obj/mkconfig -I _SYS_CFGPARAM_H -H -o include/sys/cfgparam.h ${CFGFILE}
44 ${.CURDIR}/tools/mkconfig/obj/mkconfig -m -o usr/src/Makefile.cfgparam ${CFGFILE}
45 ${.CURDIR}/tools/mkconfig/obj/mkconfig -M -o cfgparam.mk ${CFGFILE}
47 .PHONY: gen-config build