8987 bootadm: add bootfile fallback to unix
[unleashed.git] / Makefile
blob63421f3d21e15292fa8085cff3620e53428c4355
1 SUBDIR = bin \
2 boot \
3 etc \
4 include \
5 kernel \
6 lib \
7 share
9 .-include "cfgparam.mk"
11 .ifdef CONFIG_MACH64
12 build:
13 ${.MAKE} obj
14 ${.MAKE}
15 ${.MAKE} install
16 ${.MAKE} -C lib MACHINE=${CONFIG_MACH64} obj
17 ${.MAKE} -C lib MACHINE=${CONFIG_MACH64}
18 ${.MAKE} -C lib MACHINE=${CONFIG_MACH64} install
20 .include <unleashed.mk>
21 .endif
23 .include <subdir.mk>
26 # Config related support
29 .if !empty(BUILD_ARCH)
30 CFGARCH=${BUILD_ARCH}
31 .elif ${MACHINE} == "i86pc" || ${MACHINE} == "i386" || ${MACHINE} == "amd64"
32 CFGARCH=x86
33 .elif ${MACHINE} == "sparc"
34 CFGARCH=sparc
35 .else
36 .error "Unknown machine architecture ${MACHINE}; override it via BUILD_ARCH"
37 .endif
39 CFGFILE=arch/${CFGARCH}/Sconfig
41 gen-config:
42 ${.MAKE} -C tools obj
43 ${.MAKE} -C tools
44 ${.CURDIR}/tools/mkconfig/obj/mkconfig -I _SYS_CFGPARAM_H -H -o include/sys/cfgparam.h ${CFGFILE}
45 ${.CURDIR}/tools/mkconfig/obj/mkconfig -m -o usr/src/Makefile.cfgparam ${CFGFILE}
46 ${.CURDIR}/tools/mkconfig/obj/mkconfig -M -o cfgparam.mk ${CFGFILE}
48 .PHONY: gen-config build