fix leftover protocmp warnings
[unleashed.git] / Makefile
blob0ab23920a00de68c09de410e9f8322c7b4e9851d
1 SUBDIR = bin \
2 boot \
3 etc \
4 include \
5 kernel \
6 lib \
7 libexec \
8 share
10 .if !make(gen-config)
11 .if !exists(${.CURDIR}/cfgparam.mk)
12 .error run make gen-config to generate cfgparam.mk
13 .endif
14 .include "cfgparam.mk"
15 .endif
17 .ifdef DESTDIR
18 build:
19 ${.MAKE} obj
20 ${.MAKE}
21 ${.MAKE} install
23 .include <unleashed.mk>
24 .endif
26 .include <subdir.mk>
29 # Config related support
32 .if !empty(BUILD_ARCH)
33 CFGARCH=${BUILD_ARCH}
34 .elif ${MACHINE} == "i86pc" || ${MACHINE} == "i386" || ${MACHINE} == "amd64"
35 CFGARCH=x86
36 .elif ${MACHINE} == "sparc"
37 CFGARCH=sparc
38 .else
39 .error "Unknown machine architecture ${MACHINE}; override it via BUILD_ARCH"
40 .endif
42 CFGFILE=arch/${CFGARCH}/Sconfig
44 gen-config:
45 ${.MAKE} -C tools cleandir
46 ${.MAKE} -C tools obj
47 ${.MAKE} -C tools
48 ${.CURDIR}/tools/mkconfig/obj/mkconfig -I _SYS_CFGPARAM_H -H -o include/sys/cfgparam.h ${CFGFILE}
49 ${.CURDIR}/tools/mkconfig/obj/mkconfig -m -o usr/src/Makefile.cfgparam ${CFGFILE}
50 ${.CURDIR}/tools/mkconfig/obj/mkconfig -M -o cfgparam.mk ${CFGFILE}
52 .PHONY: gen-config build