Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
# $NetBSD: Makefile.inc,v 1.12 2012/07/08 01:21:12 rmind Exp $
|
2011-02-14 20:36:03 +01:00
|
|
|
|
|
|
|
COMMON_DIR:=${.PARSEDIR}
|
2011-02-15 21:12:04 +01:00
|
|
|
.if defined(__MINIX)
|
2014-12-11 15:00:57 +01:00
|
|
|
COMMON_CODEDIRS=atomic gen inet md net stdlib string
|
2011-02-15 21:12:04 +01:00
|
|
|
.else
|
2011-02-14 20:36:03 +01:00
|
|
|
COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string sys
|
2011-02-15 21:12:04 +01:00
|
|
|
.endif
|
2012-11-15 12:06:41 +01:00
|
|
|
COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/rmd160 hash/murmurhash
|
2011-02-14 20:36:03 +01:00
|
|
|
|
|
|
|
.if defined(COMMON_MACHINE_ARCH) && !empty(COMMON_MACHINE_ARCH) && \
|
|
|
|
exists(${COMMON_DIR}/arch/${COMMON_MACHINE_ARCH})
|
|
|
|
COMMON_ARCHSUBDIR= ${COMMON_MACHINE_ARCH}
|
|
|
|
.elif defined(LIBKERN_ARCH) && !empty(LIBKERN_ARCH) && \
|
|
|
|
exists(${KERNDIR}/arch/${LIBKERN_ARCH})
|
|
|
|
COMMON_ARCHSUBDIR= ${LIBKERN_ARCH}
|
|
|
|
.elif exists(${COMMON_DIR}/arch/${MACHINE_ARCH})
|
|
|
|
COMMON_ARCHSUBDIR= ${MACHINE_ARCH}
|
|
|
|
.elif exists(${COMMON_DIR}/arch/${MACHINE_CPU})
|
|
|
|
COMMON_ARCHSUBDIR= ${MACHINE_CPU}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
COMMON_ARCHDIR=${COMMON_DIR}/arch/${COMMON_ARCHSUBDIR}
|
|
|
|
|
|
|
|
.for i in ${COMMON_CODEDIRS}
|
|
|
|
.if exists(${COMMON_DIR}/$i)
|
|
|
|
.PATH.c: ${COMMON_DIR}/$i
|
|
|
|
.endif
|
|
|
|
.if exists(${COMMON_ARCHDIR}/${i}/Makefile.inc)
|
|
|
|
.include "${COMMON_ARCHDIR}/${i}/Makefile.inc"
|
|
|
|
.endif
|
Upgrading build system to new NetBSD revision
The tested targets are the followgin ones:
* tools
* distribution
* sets
* release
The remaining NetBSD targets have not been disabled nor tested
*at all*. Try them at your own risk, they may reboot the earth.
For all compliant Makefiles, objects and generated files are put in
MAKEOBJDIR, which means you can now keep objects between two branch
switching. Same for DESTDIR, please refer to build.sh options.
Regarding new or modifications of Makefiles a few things:
* Read share/mk/bsd.README
* If you add a subdirectory, add a Makefile in it, and have it called
by the parent through the SUBDIR variable.
* Do not add arbitrary inclusion which crosses to another branch of
the hierarchy; If you can't do without it, put a comment on why.
If possible, do not use inclusion at all.
* Use as much as possible the infrastructure, it is here to make
life easier, do not fight it.
Sets and package are now used to track files.
We have one set called "minix", composed of one package called "minix-sys"
2012-09-12 09:37:05 +02:00
|
|
|
.if !empty(CPPFLAGS:M-DLIBKERN_OPTIMISE_SPACE) && \
|
|
|
|
exists(${COMMON_ARCHDIR}/$i/small)
|
|
|
|
.PATH.S: ${COMMON_ARCHDIR}/$i/small
|
|
|
|
.endif
|
|
|
|
|
2011-02-14 20:36:03 +01:00
|
|
|
.if exists(${COMMON_ARCHDIR}/$i)
|
|
|
|
.PATH.c: ${COMMON_ARCHDIR}/$i
|
|
|
|
.PATH.S: ${COMMON_ARCHDIR}/$i
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
CPPFLAGS+=-I${COMMON_DIR}/quad -I${COMMON_DIR}/string
|
|
|
|
.if defined(COMMON_ARCHSUBDIR)
|
|
|
|
CPPFLAGS+=-I${COMMON_ARCHDIR}/string
|
|
|
|
.endif
|