1 |
|
# |
2 |
|
# $FreeBSD: src/Makefile.inc1,v 1.499.2.7 2006/01/07 19:40:08 netchild Exp $ |
3 |
< |
# $MidnightBSD: src/Makefile.inc1,v 1.37 2012/02/19 23:04:03 laffer1 Exp $ |
3 |
> |
# $MidnightBSD: src/Makefile.inc1,v 1.41 2012/07/04 18:35:44 laffer1 Exp $ |
4 |
|
# |
5 |
|
# Make command line options: |
6 |
|
# -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir |
38 |
|
.endif |
39 |
|
|
40 |
|
.include <bsd.own.mk> |
41 |
+ |
.include <bsd.arch.inc.mk> |
42 |
|
|
43 |
|
# We must do share/info early so that installation of info `dir' |
44 |
|
# entries works correctly. Do it first since it is less likely to |
122 |
|
.endif |
123 |
|
.endif |
124 |
|
|
125 |
< |
# Guess machine architecture from machine type, and vice versa. |
126 |
< |
.if !defined(TARGET_ARCH) && defined(TARGET) |
127 |
< |
TARGET_ARCH= ${TARGET} |
127 |
< |
.elif !defined(TARGET) && defined(TARGET_ARCH) && \ |
128 |
< |
${TARGET_ARCH} != ${MACHINE_ARCH} |
129 |
< |
TARGET= ${TARGET_ARCH} |
125 |
> |
.if !defined(VERSION) |
126 |
> |
VERSION!= uname -srp |
127 |
> |
VERSION+= ${OSRELDATE} |
128 |
|
.endif |
131 |
– |
# Otherwise, default to current machine type and architecture. |
132 |
– |
TARGET?= ${MACHINE} |
133 |
– |
TARGET_ARCH?= ${MACHINE_ARCH} |
129 |
|
|
130 |
+ |
|
131 |
|
KNOWN_ARCHES?= amd64 i386 sparc64 |
132 |
|
.if ${TARGET} == ${TARGET_ARCH} |
133 |
|
_t= ${TARGET} |
223 |
|
BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ |
224 |
|
PATH=${BPATH}:${PATH} \ |
225 |
|
WORLDTMP=${WORLDTMP} \ |
226 |
+ |
VERSION="${VERSION}" \ |
227 |
|
MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" |
228 |
|
BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ |
229 |
|
${BMAKEENV} ${MAKE} -f Makefile.inc1 \ |
248 |
|
# world stage |
249 |
|
WMAKEENV= ${CROSSENV} \ |
250 |
|
_SHLIBDIRPREFIX=${WORLDTMP} \ |
251 |
+ |
VERSION="${VERSION}" \ |
252 |
|
INSTALL="sh ${.CURDIR}/tools/install.sh" \ |
253 |
|
PATH=${TMPPATH} |
254 |
|
WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP} |
268 |
|
-B${LIB32TMP}/usr/lib32 |
269 |
|
|
270 |
|
# Yes, the flags are redundant. |
271 |
< |
LIB32WMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ |
271 |
> |
LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ |
272 |
|
_SHLIBDIRPREFIX=${LIB32TMP} \ |
273 |
|
MACHINE=i386 \ |
274 |
|
MACHINE_ARCH=i386 \ |
434 |
|
.if ${MK_KERBEROS} != "no" |
435 |
|
.for _t in obj depend all |
436 |
|
cd ${.CURDIR}/kerberos5/tools; \ |
437 |
< |
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} DESTDIR= ${_t} |
437 |
> |
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= ${_t} |
438 |
|
.endfor |
439 |
|
.endif |
440 |
|
.for _t in obj includes |
441 |
< |
cd ${.CURDIR}/include; ${LIB32WMAKE} ${_t} |
442 |
< |
cd ${.CURDIR}/lib; ${LIB32WMAKE} ${_t} |
441 |
> |
cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t} |
442 |
> |
cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t} |
443 |
|
.if ${MK_APACHE} != "no" |
444 |
|
cd ${.CURDIR}/apache/lib; ${LIB32WMAKE} ${_t} |
445 |
|
.endif |
472 |
|
.endfor |
473 |
|
|
474 |
|
distribute32 install32: |
477 |
– |
.if make(distribute32) |
478 |
– |
mkdir -p ${DISTDIR}/${DISTRIBUTION}/usr/lib32 # XXX add to mtree |
479 |
– |
.else |
480 |
– |
mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree |
481 |
– |
.endif |
475 |
|
cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
476 |
|
.if ${MK_CDDL} != "no" |
477 |
|
cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} |
938 |
|
|
939 |
|
.if ${MK_CXX} != "no" |
940 |
|
_gperf= gnu/usr.bin/gperf |
941 |
< |
.if ${BOOTSTRAPPING} < 700004 |
941 |
> |
.if ${BOOTSTRAPPING} < 4015 |
942 |
|
_groff= gnu/usr.bin/groff |
943 |
|
.else |
944 |
|
_groff= gnu/usr.bin/groff/tmac |
945 |
|
.endif |
946 |
|
.endif |
947 |
|
|
948 |
< |
.if ${BOOTSTRAPPING} < 700018 |
948 |
> |
.if ${BOOTSTRAPPING} < 4015 |
949 |
|
_gensnmptree= usr.sbin/bsnmpd/gensnmptree |
950 |
|
.endif |
951 |
|
|
952 |
|
.if ${MK_RESCUE} != "no" && \ |
953 |
< |
${BOOTSTRAPPING} < 700026 |
953 |
> |
${BOOTSTRAPPING} < 4015 |
954 |
|
_crunchgen= usr.sbin/crunch/crunchgen |
955 |
|
.endif |
956 |
|
|
1005 |
|
${_aicasm} \ |
1006 |
|
usr.bin/awk \ |
1007 |
|
lib/libmagic \ |
1008 |
< |
usr.sbin/sysinstall |
1008 |
> |
usr.sbin/sysinstall \ |
1009 |
> |
usr.bin/mkesdb_static \ |
1010 |
> |
usr.bin/mkcsmapper_static |
1011 |
|
${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \ |
1012 |
|
cd ${.CURDIR}/${_tool}; \ |
1013 |
|
${MAKE} DIRPRFX=${_tool}/ obj; \ |
1026 |
|
# |
1027 |
|
# cross-tools: Build cross-building tools |
1028 |
|
# |
1029 |
< |
.if ${TARGET_ARCH} != ${MACHINE_ARCH} |
1029 |
> |
.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 4012 |
1030 |
|
.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" |
1031 |
|
_btxld= usr.sbin/btxld |
1032 |
|
.endif |