10 .if
!make
(build
) && !make
(gen-config
)
11 .if
!exists
(${.CURDIR
}/cfgparam.mk
)
12 .error run make gen-config to generate cfgparam.mk
14 .
include "cfgparam.mk"
17 .if make
(build
) && !defined
(DESTDIR
)
18 .MAKEFLAGS
+= DESTDIR
=${.CURDIR
}/proto
/root_i386
21 .if
!exists
(${.CURDIR
}/cfgparam.mk
)
25 ${.MAKE
} -C
include # kernel/ depends on these; build separately
28 ${.MAKE
} -C lib build32
# special multiarch target
29 ${.MAKE
} -C usr
install # dmake expects libs to already be in DESTDIR
30 ${.MAKE
} -C tools
/postbuild
clean obj
31 ${.MAKE
} -C tools
/postbuild
33 .
include <unleashed.mk
>
36 cleandir
: clean_artifacts clean_tools clean_cfgparam
38 rm -rf
${.CURDIR
}/proto
/root_i386
${.CURDIR
}/packages
/i386
/nightly
/repo.redist
39 # tools/ is not in SUBDIR
41 ${.MAKE
} -C tools cleandir
42 # FIXME this is pretty dumb: we need cfgparam.mk to clean some subdirs. this is
43 # because eg. include/ has additional subdirs based on some config...
44 clean_cfgparam
:: ${SUBDIR}
45 rm -f
${.CURDIR
}/cfgparam.mk
${.CURDIR
}/usr
/src
/Makefile.cfgparam
${.CURDIR
}/include/sys
/cfgparam.h
48 # Config related support
51 .if
!empty
(BUILD_ARCH
)
53 .elif
${MACHINE} == "i86pc" ||
${MACHINE} == "i386" ||
${MACHINE} == "amd64"
55 .elif
${MACHINE} == "sparc"
58 .error
"Unknown machine architecture ${MACHINE}; override it via BUILD_ARCH"
61 CFGFILE
=arch
/${CFGARCH}/Sconfig
66 ${.CURDIR
}/tools
/mkconfig
/obj
/mkconfig
-I _SYS_CFGPARAM_H
-H
-o
include/sys
/cfgparam.h
${CFGFILE}
67 ${.CURDIR
}/tools
/mkconfig
/obj
/mkconfig
-m
-o usr
/src
/Makefile.cfgparam
${CFGFILE}
68 ${.CURDIR
}/tools
/mkconfig
/obj
/mkconfig
-M
-o cfgparam.mk
${CFGFILE}