1#
| 1#
|
2# $FreeBSD: head/Makefile.inc1 55218 1999-12-29 14:18:51Z kris $
| 2# $FreeBSD: head/Makefile.inc1 55220 1999-12-29 14:42:46Z obrien $
|
3# 4# Make command line options: 5# -DMAKE_KERBEROS4 to build KerberosIV 6# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir 7# -DNOCLEAN do not clean at all 8# -DNOCRYPT will prevent building of crypt versions 9# -DNOPROFILE do not build profiled libraries 10# -DNOSECURE do not go into secure subdir 11# -DNOGAMES do not go into games subdir 12# -DNOSHARE do not go into share subdir 13# -DNOINFO do not make or install info files 14# -DNOLIBC_R do not build libc_r. 15# -DNO_FORTRAN do not build g77 and related libraries. 16# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list 17 18# 19# The intended user-driven targets are: 20# buildworld - rebuild *everything*, including glue to help do upgrades 21# installworld- install everything built by "buildworld" 22# update - convenient way to update your source tree (eg: sup/cvs) 23# most - build user commands, no libraries or include files 24# installmost - install user commands, no libraries or include files 25# 26# Standard targets (not defined here) are documented in the makefiles in 27# /usr/share/mk. These include: 28# obj depend all install clean cleandepend cleanobj 29 30# Put initial settings here. 31SUBDIR= 32 33# We must do share/info early so that installation of info `dir' 34# entries works correctly. Do it first since it is less likely to 35# grow dependencies on include and lib than vice versa. 36.if exists(${.CURDIR}/share/info) 37SUBDIR+= share/info 38.endif 39 40# We must do include and lib early so that the perl *.ph generation 41# works correctly as it uses the header files installed by this. 42.if exists(${.CURDIR}/include) 43SUBDIR+= include 44.endif 45.if exists(${.CURDIR}/lib) 46SUBDIR+= lib 47.endif 48 49.if exists(${.CURDIR}/bin) 50SUBDIR+= bin 51.endif 52.if exists(${.CURDIR}/games) && !defined(NOGAMES) 53SUBDIR+= games 54.endif 55.if exists(${.CURDIR}/gnu) 56SUBDIR+= gnu 57.endif 58.if exists(${.CURDIR}/kerberosIV) && exists(${.CURDIR}/crypto) && \ 59 !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 60SUBDIR+= kerberosIV 61.endif 62.if exists(${.CURDIR}/libexec) 63SUBDIR+= libexec 64.endif 65.if exists(${.CURDIR}/sbin) 66SUBDIR+= sbin 67.endif 68.if exists(${.CURDIR}/share) && !defined(NOSHARE) 69SUBDIR+= share 70.endif 71.if exists(${.CURDIR}/sys) 72SUBDIR+= sys 73.endif 74.if exists(${.CURDIR}/usr.bin) 75SUBDIR+= usr.bin 76.endif 77.if exists(${.CURDIR}/usr.sbin) 78SUBDIR+= usr.sbin 79.endif 80.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) 81SUBDIR+= secure 82.endif 83 84# etc must be last for "distribute" to work 85.if exists(${.CURDIR}/etc) 86SUBDIR+= etc 87.endif 88 89# These are last, since it is nice to at least get the base system 90# rebuilt before you do them. 91.if defined(LOCAL_DIRS) 92.for _DIR in ${LOCAL_DIRS} 93.if exists(${.CURDIR}/${_DIR}) & exists(${.CURDIR}/${_DIR}/Makefile) 94SUBDIR+= ${_DIR} 95.endif 96.endfor 97.endif 98 99.if defined(NOCLEANDIR) 100CLEANDIR= clean cleandepend 101.else 102CLEANDIR= cleandir 103.endif 104 105SUP?= cvsup 106SUPFLAGS?= -g -L 2 -P - 107 108MAKEOBJDIRPREFIX?= /usr/obj 109TARGET_ARCH?= ${MACHINE_ARCH} 110BUILD_ARCH!= sysctl -n hw.machine_arch 111.if ${BUILD_ARCH} == ${MACHINE_ARCH} 112OBJTREE= ${MAKEOBJDIRPREFIX} 113.else 114OBJTREE= ${MAKEOBJDIRPREFIX}/${MACHINE_ARCH} 115.endif 116WORLDTMP= ${OBJTREE}${.CURDIR}/${BUILD_ARCH} 117# /usr/games added for fortune which depend on strfile 118STRICTTMPPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games 119TMPPATH= ${STRICTTMPPATH}:${PATH} 120 121# 122# Building a world goes through the following stages 123# 124# bootstrap-tool stage [BMAKE] 125# This stage is responsible for creating programs that 126# are needed for backward compatibility reasons. They 127# are not built as cross-tools. 128# build-tool stage [TMAKE] 129# This stage is responsible for creating the object 130# tree and building any tools that are needed during 131# the build process. 132# cross-tool stage [XMAKE] 133# This stage is responsible for creating any tools that 134# are needed for cross-builds. A cross-compiler is one 135# of them. 136# world stage [WMAKE] 137# This stage actually builds the world. 138# install stage (optional) [IMAKE] 139# This stage installs a previously built world. 140# 141 142# Common environment for bootstrap related stages 143BOOTSTRAPENV= MAKEOBJDIRPREFIX=${WORLDTMP} \ 144 DESTDIR=${WORLDTMP} \ 145 INSTALL="sh ${.CURDIR}/tools/install.sh" \ 146 MACHINE_ARCH=${BUILD_ARCH} \
| 3# 4# Make command line options: 5# -DMAKE_KERBEROS4 to build KerberosIV 6# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir 7# -DNOCLEAN do not clean at all 8# -DNOCRYPT will prevent building of crypt versions 9# -DNOPROFILE do not build profiled libraries 10# -DNOSECURE do not go into secure subdir 11# -DNOGAMES do not go into games subdir 12# -DNOSHARE do not go into share subdir 13# -DNOINFO do not make or install info files 14# -DNOLIBC_R do not build libc_r. 15# -DNO_FORTRAN do not build g77 and related libraries. 16# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list 17 18# 19# The intended user-driven targets are: 20# buildworld - rebuild *everything*, including glue to help do upgrades 21# installworld- install everything built by "buildworld" 22# update - convenient way to update your source tree (eg: sup/cvs) 23# most - build user commands, no libraries or include files 24# installmost - install user commands, no libraries or include files 25# 26# Standard targets (not defined here) are documented in the makefiles in 27# /usr/share/mk. These include: 28# obj depend all install clean cleandepend cleanobj 29 30# Put initial settings here. 31SUBDIR= 32 33# We must do share/info early so that installation of info `dir' 34# entries works correctly. Do it first since it is less likely to 35# grow dependencies on include and lib than vice versa. 36.if exists(${.CURDIR}/share/info) 37SUBDIR+= share/info 38.endif 39 40# We must do include and lib early so that the perl *.ph generation 41# works correctly as it uses the header files installed by this. 42.if exists(${.CURDIR}/include) 43SUBDIR+= include 44.endif 45.if exists(${.CURDIR}/lib) 46SUBDIR+= lib 47.endif 48 49.if exists(${.CURDIR}/bin) 50SUBDIR+= bin 51.endif 52.if exists(${.CURDIR}/games) && !defined(NOGAMES) 53SUBDIR+= games 54.endif 55.if exists(${.CURDIR}/gnu) 56SUBDIR+= gnu 57.endif 58.if exists(${.CURDIR}/kerberosIV) && exists(${.CURDIR}/crypto) && \ 59 !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 60SUBDIR+= kerberosIV 61.endif 62.if exists(${.CURDIR}/libexec) 63SUBDIR+= libexec 64.endif 65.if exists(${.CURDIR}/sbin) 66SUBDIR+= sbin 67.endif 68.if exists(${.CURDIR}/share) && !defined(NOSHARE) 69SUBDIR+= share 70.endif 71.if exists(${.CURDIR}/sys) 72SUBDIR+= sys 73.endif 74.if exists(${.CURDIR}/usr.bin) 75SUBDIR+= usr.bin 76.endif 77.if exists(${.CURDIR}/usr.sbin) 78SUBDIR+= usr.sbin 79.endif 80.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) && !defined(NOSECURE) 81SUBDIR+= secure 82.endif 83 84# etc must be last for "distribute" to work 85.if exists(${.CURDIR}/etc) 86SUBDIR+= etc 87.endif 88 89# These are last, since it is nice to at least get the base system 90# rebuilt before you do them. 91.if defined(LOCAL_DIRS) 92.for _DIR in ${LOCAL_DIRS} 93.if exists(${.CURDIR}/${_DIR}) & exists(${.CURDIR}/${_DIR}/Makefile) 94SUBDIR+= ${_DIR} 95.endif 96.endfor 97.endif 98 99.if defined(NOCLEANDIR) 100CLEANDIR= clean cleandepend 101.else 102CLEANDIR= cleandir 103.endif 104 105SUP?= cvsup 106SUPFLAGS?= -g -L 2 -P - 107 108MAKEOBJDIRPREFIX?= /usr/obj 109TARGET_ARCH?= ${MACHINE_ARCH} 110BUILD_ARCH!= sysctl -n hw.machine_arch 111.if ${BUILD_ARCH} == ${MACHINE_ARCH} 112OBJTREE= ${MAKEOBJDIRPREFIX} 113.else 114OBJTREE= ${MAKEOBJDIRPREFIX}/${MACHINE_ARCH} 115.endif 116WORLDTMP= ${OBJTREE}${.CURDIR}/${BUILD_ARCH} 117# /usr/games added for fortune which depend on strfile 118STRICTTMPPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games 119TMPPATH= ${STRICTTMPPATH}:${PATH} 120 121# 122# Building a world goes through the following stages 123# 124# bootstrap-tool stage [BMAKE] 125# This stage is responsible for creating programs that 126# are needed for backward compatibility reasons. They 127# are not built as cross-tools. 128# build-tool stage [TMAKE] 129# This stage is responsible for creating the object 130# tree and building any tools that are needed during 131# the build process. 132# cross-tool stage [XMAKE] 133# This stage is responsible for creating any tools that 134# are needed for cross-builds. A cross-compiler is one 135# of them. 136# world stage [WMAKE] 137# This stage actually builds the world. 138# install stage (optional) [IMAKE] 139# This stage installs a previously built world. 140# 141 142# Common environment for bootstrap related stages 143BOOTSTRAPENV= MAKEOBJDIRPREFIX=${WORLDTMP} \ 144 DESTDIR=${WORLDTMP} \ 145 INSTALL="sh ${.CURDIR}/tools/install.sh" \ 146 MACHINE_ARCH=${BUILD_ARCH} \
|
| 147 TOOLS_PREFIX=${WORLDTMP} \
|
147 PATH=${TMPPATH} 148 149# Common environment for world related stages 150CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ 151 COMPILER_PATH=${WORLDTMP}/usr/libexec:${WORLDTMP}/usr/bin \ 152 LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib \ 153 OBJFORMAT_PATH=${WORLDTMP}/usr/libexec \ 154 PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.00503 155 156# bootstrap-tool stage 157BMAKEENV= ${BOOTSTRAPENV} 158BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO 159 160# build-tool stage 161TMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \ 162 INSTALL="sh ${.CURDIR}/tools/install.sh" \ 163 PATH=${TMPPATH} 164TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 165 166# cross-tool stage 167XMAKEENV= ${BOOTSTRAPENV} \ 168 TARGET_ARCH=${MACHINE_ARCH} 169XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO \ 170 -DNO_FORTRAN -DNO_GDB 171 172# world stage 173WMAKEENV= ${CROSSENV} \ 174 DESTDIR=${WORLDTMP} \ 175 INSTALL="sh ${.CURDIR}/tools/install.sh" \ 176 PATH=${TMPPATH} 177WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 178 179# install stage 180IMAKEENV= ${CROSSENV} 181IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 182 183USRDIRS= usr/bin usr/lib/compat/aout usr/games usr/libdata/ldscripts \ 184 usr/libexec/${OBJFORMAT} usr/sbin usr/share/misc 185 186.if ${MACHINE_ARCH} == "i386" && ${MACHINE} == "pc98" 187USRDIRS+= usr/libexec/aout 188.endif 189 190INCDIRS= arpa g++/std objc protocols readline rpc rpcsvc openssl \ 191 security ss 192 193# 194# buildworld 195# 196# Attempt to rebuild the entire system, with reasonable chance of 197# success, regardless of how old your existing system is. 198# 199buildworld: 200 @echo 201 @echo "--------------------------------------------------------------" 202 @echo ">>> Rebuilding the temporary build tree" 203 @echo "--------------------------------------------------------------" 204.if !defined(NOCLEAN) 205 rm -rf ${WORLDTMP} 206.else 207 for dir in bin games include lib sbin; do \ 208 rm -rf ${WORLDTMP}/usr/$$dir; \ 209 done 210 rm -f ${WORLDTMP}/sys 211.endif 212.for _dir in ${USRDIRS} 213 mkdir -p ${WORLDTMP}/${_dir} 214.endfor 215.for _dir in ${INCDIRS} 216 mkdir -p ${WORLDTMP}/usr/include/${_dir} 217.endfor 218 ln -sf ${.CURDIR}/sys ${WORLDTMP}/sys 219 @echo 220 @echo "--------------------------------------------------------------" 221 @echo ">>> stage 1: bootstrap tools" 222 @echo "--------------------------------------------------------------" 223 cd ${.CURDIR}; ${BMAKE} bootstrap-tools 224.if !defined(NOCLEAN) 225 @echo 226 @echo "--------------------------------------------------------------" 227 @echo ">>> stage 2: cleaning up the object tree" 228 @echo "--------------------------------------------------------------" 229 cd ${.CURDIR}; ${TMAKE} ${CLEANDIR:S/^/par-/} 230.endif 231 @echo 232 @echo "--------------------------------------------------------------" 233 @echo ">>> stage 2: rebuilding the object tree" 234 @echo "--------------------------------------------------------------" 235 cd ${.CURDIR}; ${TMAKE} par-obj 236 @echo 237 @echo "--------------------------------------------------------------" 238 @echo ">>> stage 2: build tools" 239 @echo "--------------------------------------------------------------" 240 cd ${.CURDIR}; ${TMAKE} build-tools 241 @echo 242 @echo "--------------------------------------------------------------" 243 @echo ">>> stage 3: cross tools" 244 @echo "--------------------------------------------------------------" 245 cd ${.CURDIR}; ${XMAKE} cross-tools 246 @echo 247 @echo "--------------------------------------------------------------" 248 @echo ">>> stage 4: populating ${WORLDTMP}/usr/include" 249 @echo "--------------------------------------------------------------" 250 cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes 251 @echo 252 @echo "--------------------------------------------------------------" 253 @echo ">>> stage 4: building libraries" 254 @echo "--------------------------------------------------------------" 255 cd ${.CURDIR}; ${WMAKE} -DNOINFO -DNOMAN libraries 256 @echo 257 @echo "--------------------------------------------------------------" 258 @echo ">>> stage 4: make dependencies" 259 @echo "--------------------------------------------------------------" 260 cd ${.CURDIR}; ${WMAKE} par-depend 261 @echo 262 @echo "--------------------------------------------------------------" 263 @echo ">>> stage 4: building everything.." 264 @echo "--------------------------------------------------------------" 265 cd ${.CURDIR}; ${WMAKE} all 266 267everything: 268 @echo "--------------------------------------------------------------" 269 @echo ">>> Building everything.." 270 @echo "--------------------------------------------------------------" 271 cd ${.CURDIR}; ${WMAKE} all 272 273# 274# installworld 275# 276# Installs everything compiled by a 'buildworld'. 277# 278installworld: 279 cd ${.CURDIR}; ${IMAKE} reinstall 280 281# 282# reinstall 283# 284# If you have a build server, you can NFS mount the source and obj directories 285# and do a 'make reinstall' on the *client* to install new binaries from the 286# most recent server build. 287# 288reinstall: 289 @echo "--------------------------------------------------------------" 290 @echo ">>> Making hierarchy" 291 @echo "--------------------------------------------------------------" 292 cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 hierarchy 293 @echo 294 @echo "--------------------------------------------------------------" 295 @echo ">>> Installing everything.." 296 @echo "--------------------------------------------------------------" 297 cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install 298.if !defined(NOMAN) 299 @echo 300 @echo "--------------------------------------------------------------" 301 @echo ">>> Rebuilding man page indices" 302 @echo "--------------------------------------------------------------" 303 cd ${.CURDIR}/share/man; ${MAKE} makedb 304.endif 305 306# 307# update 308# 309# Update the source tree, by running sup and/or running cvs to update to the 310# latest copy. 311# 312update: 313.if defined(SUP_UPDATE) 314 @echo "--------------------------------------------------------------" 315 @echo ">>> Running ${SUP}" 316 @echo "--------------------------------------------------------------" 317.if defined(SUPFILE) 318 @${SUP} ${SUPFLAGS} ${SUPFILE} 319.endif 320.if defined(SUPFILE1) 321 @${SUP} ${SUPFLAGS} ${SUPFILE1} 322.endif 323.if defined(SUPFILE2) 324 @${SUP} ${SUPFLAGS} ${SUPFILE2} 325.endif 326.if defined(PORTSSUPFILE) 327 @${SUP} ${SUPFLAGS} ${PORTSSUPFILE} 328.endif 329.endif 330.if defined(CVS_UPDATE) 331 @echo "--------------------------------------------------------------" 332 @echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT} 333 @echo "--------------------------------------------------------------" 334 cd ${.CURDIR}; cvs -q update -P -d 335.endif 336 337# 338# most 339# 340# Build most of the user binaries on the existing system libs and includes. 341# 342most: 343 @echo "--------------------------------------------------------------" 344 @echo ">>> Building programs only" 345 @echo "--------------------------------------------------------------" 346 cd ${.CURDIR}/bin; ${MAKE} all 347 cd ${.CURDIR}/sbin; ${MAKE} all 348 cd ${.CURDIR}/libexec; ${MAKE} all 349 cd ${.CURDIR}/usr.bin; ${MAKE} all 350 cd ${.CURDIR}/usr.sbin; ${MAKE} all 351 cd ${.CURDIR}/gnu/libexec; ${MAKE} all 352 cd ${.CURDIR}/gnu/usr.bin; ${MAKE} all 353 cd ${.CURDIR}/gnu/usr.sbin; ${MAKE} all 354 355# 356# installmost 357# 358# Install the binaries built by the 'most' target. This does not include 359# libraries or include files. 360# 361installmost: 362 @echo "--------------------------------------------------------------" 363 @echo ">>> Installing programs only" 364 @echo "--------------------------------------------------------------" 365 cd ${.CURDIR}/bin; ${MAKE} install 366 cd ${.CURDIR}/sbin; ${MAKE} install 367 cd ${.CURDIR}/libexec; ${MAKE} install 368 cd ${.CURDIR}/usr.bin; ${MAKE} install 369 cd ${.CURDIR}/usr.sbin; ${MAKE} install 370 cd ${.CURDIR}/gnu/libexec; ${MAKE} install 371 cd ${.CURDIR}/gnu/usr.bin; ${MAKE} install 372 cd ${.CURDIR}/gnu/usr.sbin; ${MAKE} install 373 374# 375# ------------------------------------------------------------------------ 376# 377# From here onwards are utility targets used by the 'make world' and 378# related targets. If your 'world' breaks, you may like to try to fix 379# the problem and manually run the following targets to attempt to 380# complete the build. Beware, this is *not* guaranteed to work, you 381# need to have a pretty good grip on the current state of the system 382# to attempt to manually finish it. If in doubt, 'make world' again. 383# 384 385# 386# bootstrap-tools: Build tools needed for compatibility 387# 388.if exists(${.CURDIR}/games) && !defined(NOGAMES) 389_strfile= games/fortune/strfile 390.endif 391 392bootstrap-tools: 393.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef gnu/usr.bin/bison 394 cd ${.CURDIR}/${_tool}; \ 395 ${MAKE} obj; \ 396 ${MAKE} depend; \ 397 ${MAKE} all; \ 398 ${MAKE} install 399.endfor 400 401# 402# build-tools: Build special purpose build tools 403# 404.if exists(${.CURDIR}/games) && !defined(NOGAMES) 405_games= games/adventure games/hack games/phantasia 406.endif 407 408.if exists(${.CURDIR}/share) && !defined(NOSHARE) 409_share= share/syscons/scrnmaps 410.endif 411 412.if !defined(NO_FORTRAN) 413_fortran= gnu/usr.bin/cc/f771 414.endif 415 416build-tools: 417.for _tool in bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \ 418 lib/libncurses ${_share} 419 cd ${.CURDIR}/${_tool}; ${MAKE} build-tools 420.endfor 421 422# 423# cross-tools: Build cross-building tools 424# 425# WARNING: Because the bootstrap tools are expected to run on the 426# build-machine, MACHINE_ARCH is *always* set to BUILD_ARCH when this 427# target is being made. TARGET_ARCH is *always* set to reflect the 428# target-machine (which you can set by specifying MACHINE_ARCH on 429# make's command-line, get it?). 430# The reason is simple: we build these tools not to be run on the 431# architecture we're cross-building, but on the architecture we're 432# currently building on (ie the host-machine) and we expect these 433# tools to produce output for the architecture we're trying to 434# cross-build. 435# 436.if ${TARGET_ARCH} == "alpha" && ${MACHINE_ARCH} != "alpha" 437_elf2exe= usr.sbin/elf2exe 438.endif 439 440# XXX - MACHINE should actually be TARGET. But we don't set that... 441.if ${TARGET_ARCH} == "i386" && ${MACHINE} == "pc98" 442_aout_tools= usr.bin/size usr.bin/strip gnu/usr.bin/as gnu/usr.bin/ld 443.endif 444 445cross-tools: 446.for _tool in ${_aout_tools} ${_elf2exe} usr.bin/genassym usr.bin/gensetdefs \ 447 gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc 448 cd ${.CURDIR}/${_tool}; \ 449 ${MAKE} obj; \ 450 ${MAKE} depend; \ 451 ${MAKE} all; \ 452 ${MAKE} install 453.endfor 454 455# 456# hierarchy - ensure that all the needed directories are present 457# 458hierarchy: 459 cd ${.CURDIR}/etc; ${MAKE} distrib-dirs 460 461# 462# includes - possibly generate and install the include files. 463# 464includes: 465 cd ${.CURDIR}/include; ${MAKE} -B all install 466 cd ${.CURDIR}/gnu/include; ${MAKE} install 467 cd ${.CURDIR}/gnu/lib/libmp; ${MAKE} beforeinstall 468 cd ${.CURDIR}/gnu/lib/libobjc; ${MAKE} beforeinstall 469 cd ${.CURDIR}/gnu/lib/libreadline; ${MAKE} beforeinstall 470 cd ${.CURDIR}/gnu/lib/libregex; ${MAKE} beforeinstall 471 cd ${.CURDIR}/gnu/lib/libstdc++; ${MAKE} beforeinstall 472 cd ${.CURDIR}/gnu/lib/libdialog; ${MAKE} beforeinstall 473 cd ${.CURDIR}/gnu/lib/libgmp; ${MAKE} beforeinstall 474 cd ${.CURDIR}/gnu/usr.bin/cc/cc1plus; ${MAKE} beforeinstall 475.if exists(${.CURDIR}/secure) && !defined(NOCRYPT)
| 148 PATH=${TMPPATH} 149 150# Common environment for world related stages 151CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \ 152 COMPILER_PATH=${WORLDTMP}/usr/libexec:${WORLDTMP}/usr/bin \ 153 LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib \ 154 OBJFORMAT_PATH=${WORLDTMP}/usr/libexec \ 155 PERL5LIB=${WORLDTMP}/usr/libdata/perl/5.00503 156 157# bootstrap-tool stage 158BMAKEENV= ${BOOTSTRAPENV} 159BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO 160 161# build-tool stage 162TMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \ 163 INSTALL="sh ${.CURDIR}/tools/install.sh" \ 164 PATH=${TMPPATH} 165TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 166 167# cross-tool stage 168XMAKEENV= ${BOOTSTRAPENV} \ 169 TARGET_ARCH=${MACHINE_ARCH} 170XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO \ 171 -DNO_FORTRAN -DNO_GDB 172 173# world stage 174WMAKEENV= ${CROSSENV} \ 175 DESTDIR=${WORLDTMP} \ 176 INSTALL="sh ${.CURDIR}/tools/install.sh" \ 177 PATH=${TMPPATH} 178WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 179 180# install stage 181IMAKEENV= ${CROSSENV} 182IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 183 184USRDIRS= usr/bin usr/lib/compat/aout usr/games usr/libdata/ldscripts \ 185 usr/libexec/${OBJFORMAT} usr/sbin usr/share/misc 186 187.if ${MACHINE_ARCH} == "i386" && ${MACHINE} == "pc98" 188USRDIRS+= usr/libexec/aout 189.endif 190 191INCDIRS= arpa g++/std objc protocols readline rpc rpcsvc openssl \ 192 security ss 193 194# 195# buildworld 196# 197# Attempt to rebuild the entire system, with reasonable chance of 198# success, regardless of how old your existing system is. 199# 200buildworld: 201 @echo 202 @echo "--------------------------------------------------------------" 203 @echo ">>> Rebuilding the temporary build tree" 204 @echo "--------------------------------------------------------------" 205.if !defined(NOCLEAN) 206 rm -rf ${WORLDTMP} 207.else 208 for dir in bin games include lib sbin; do \ 209 rm -rf ${WORLDTMP}/usr/$$dir; \ 210 done 211 rm -f ${WORLDTMP}/sys 212.endif 213.for _dir in ${USRDIRS} 214 mkdir -p ${WORLDTMP}/${_dir} 215.endfor 216.for _dir in ${INCDIRS} 217 mkdir -p ${WORLDTMP}/usr/include/${_dir} 218.endfor 219 ln -sf ${.CURDIR}/sys ${WORLDTMP}/sys 220 @echo 221 @echo "--------------------------------------------------------------" 222 @echo ">>> stage 1: bootstrap tools" 223 @echo "--------------------------------------------------------------" 224 cd ${.CURDIR}; ${BMAKE} bootstrap-tools 225.if !defined(NOCLEAN) 226 @echo 227 @echo "--------------------------------------------------------------" 228 @echo ">>> stage 2: cleaning up the object tree" 229 @echo "--------------------------------------------------------------" 230 cd ${.CURDIR}; ${TMAKE} ${CLEANDIR:S/^/par-/} 231.endif 232 @echo 233 @echo "--------------------------------------------------------------" 234 @echo ">>> stage 2: rebuilding the object tree" 235 @echo "--------------------------------------------------------------" 236 cd ${.CURDIR}; ${TMAKE} par-obj 237 @echo 238 @echo "--------------------------------------------------------------" 239 @echo ">>> stage 2: build tools" 240 @echo "--------------------------------------------------------------" 241 cd ${.CURDIR}; ${TMAKE} build-tools 242 @echo 243 @echo "--------------------------------------------------------------" 244 @echo ">>> stage 3: cross tools" 245 @echo "--------------------------------------------------------------" 246 cd ${.CURDIR}; ${XMAKE} cross-tools 247 @echo 248 @echo "--------------------------------------------------------------" 249 @echo ">>> stage 4: populating ${WORLDTMP}/usr/include" 250 @echo "--------------------------------------------------------------" 251 cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes 252 @echo 253 @echo "--------------------------------------------------------------" 254 @echo ">>> stage 4: building libraries" 255 @echo "--------------------------------------------------------------" 256 cd ${.CURDIR}; ${WMAKE} -DNOINFO -DNOMAN libraries 257 @echo 258 @echo "--------------------------------------------------------------" 259 @echo ">>> stage 4: make dependencies" 260 @echo "--------------------------------------------------------------" 261 cd ${.CURDIR}; ${WMAKE} par-depend 262 @echo 263 @echo "--------------------------------------------------------------" 264 @echo ">>> stage 4: building everything.." 265 @echo "--------------------------------------------------------------" 266 cd ${.CURDIR}; ${WMAKE} all 267 268everything: 269 @echo "--------------------------------------------------------------" 270 @echo ">>> Building everything.." 271 @echo "--------------------------------------------------------------" 272 cd ${.CURDIR}; ${WMAKE} all 273 274# 275# installworld 276# 277# Installs everything compiled by a 'buildworld'. 278# 279installworld: 280 cd ${.CURDIR}; ${IMAKE} reinstall 281 282# 283# reinstall 284# 285# If you have a build server, you can NFS mount the source and obj directories 286# and do a 'make reinstall' on the *client* to install new binaries from the 287# most recent server build. 288# 289reinstall: 290 @echo "--------------------------------------------------------------" 291 @echo ">>> Making hierarchy" 292 @echo "--------------------------------------------------------------" 293 cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 hierarchy 294 @echo 295 @echo "--------------------------------------------------------------" 296 @echo ">>> Installing everything.." 297 @echo "--------------------------------------------------------------" 298 cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install 299.if !defined(NOMAN) 300 @echo 301 @echo "--------------------------------------------------------------" 302 @echo ">>> Rebuilding man page indices" 303 @echo "--------------------------------------------------------------" 304 cd ${.CURDIR}/share/man; ${MAKE} makedb 305.endif 306 307# 308# update 309# 310# Update the source tree, by running sup and/or running cvs to update to the 311# latest copy. 312# 313update: 314.if defined(SUP_UPDATE) 315 @echo "--------------------------------------------------------------" 316 @echo ">>> Running ${SUP}" 317 @echo "--------------------------------------------------------------" 318.if defined(SUPFILE) 319 @${SUP} ${SUPFLAGS} ${SUPFILE} 320.endif 321.if defined(SUPFILE1) 322 @${SUP} ${SUPFLAGS} ${SUPFILE1} 323.endif 324.if defined(SUPFILE2) 325 @${SUP} ${SUPFLAGS} ${SUPFILE2} 326.endif 327.if defined(PORTSSUPFILE) 328 @${SUP} ${SUPFLAGS} ${PORTSSUPFILE} 329.endif 330.endif 331.if defined(CVS_UPDATE) 332 @echo "--------------------------------------------------------------" 333 @echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT} 334 @echo "--------------------------------------------------------------" 335 cd ${.CURDIR}; cvs -q update -P -d 336.endif 337 338# 339# most 340# 341# Build most of the user binaries on the existing system libs and includes. 342# 343most: 344 @echo "--------------------------------------------------------------" 345 @echo ">>> Building programs only" 346 @echo "--------------------------------------------------------------" 347 cd ${.CURDIR}/bin; ${MAKE} all 348 cd ${.CURDIR}/sbin; ${MAKE} all 349 cd ${.CURDIR}/libexec; ${MAKE} all 350 cd ${.CURDIR}/usr.bin; ${MAKE} all 351 cd ${.CURDIR}/usr.sbin; ${MAKE} all 352 cd ${.CURDIR}/gnu/libexec; ${MAKE} all 353 cd ${.CURDIR}/gnu/usr.bin; ${MAKE} all 354 cd ${.CURDIR}/gnu/usr.sbin; ${MAKE} all 355 356# 357# installmost 358# 359# Install the binaries built by the 'most' target. This does not include 360# libraries or include files. 361# 362installmost: 363 @echo "--------------------------------------------------------------" 364 @echo ">>> Installing programs only" 365 @echo "--------------------------------------------------------------" 366 cd ${.CURDIR}/bin; ${MAKE} install 367 cd ${.CURDIR}/sbin; ${MAKE} install 368 cd ${.CURDIR}/libexec; ${MAKE} install 369 cd ${.CURDIR}/usr.bin; ${MAKE} install 370 cd ${.CURDIR}/usr.sbin; ${MAKE} install 371 cd ${.CURDIR}/gnu/libexec; ${MAKE} install 372 cd ${.CURDIR}/gnu/usr.bin; ${MAKE} install 373 cd ${.CURDIR}/gnu/usr.sbin; ${MAKE} install 374 375# 376# ------------------------------------------------------------------------ 377# 378# From here onwards are utility targets used by the 'make world' and 379# related targets. If your 'world' breaks, you may like to try to fix 380# the problem and manually run the following targets to attempt to 381# complete the build. Beware, this is *not* guaranteed to work, you 382# need to have a pretty good grip on the current state of the system 383# to attempt to manually finish it. If in doubt, 'make world' again. 384# 385 386# 387# bootstrap-tools: Build tools needed for compatibility 388# 389.if exists(${.CURDIR}/games) && !defined(NOGAMES) 390_strfile= games/fortune/strfile 391.endif 392 393bootstrap-tools: 394.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef gnu/usr.bin/bison 395 cd ${.CURDIR}/${_tool}; \ 396 ${MAKE} obj; \ 397 ${MAKE} depend; \ 398 ${MAKE} all; \ 399 ${MAKE} install 400.endfor 401 402# 403# build-tools: Build special purpose build tools 404# 405.if exists(${.CURDIR}/games) && !defined(NOGAMES) 406_games= games/adventure games/hack games/phantasia 407.endif 408 409.if exists(${.CURDIR}/share) && !defined(NOSHARE) 410_share= share/syscons/scrnmaps 411.endif 412 413.if !defined(NO_FORTRAN) 414_fortran= gnu/usr.bin/cc/f771 415.endif 416 417build-tools: 418.for _tool in bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \ 419 lib/libncurses ${_share} 420 cd ${.CURDIR}/${_tool}; ${MAKE} build-tools 421.endfor 422 423# 424# cross-tools: Build cross-building tools 425# 426# WARNING: Because the bootstrap tools are expected to run on the 427# build-machine, MACHINE_ARCH is *always* set to BUILD_ARCH when this 428# target is being made. TARGET_ARCH is *always* set to reflect the 429# target-machine (which you can set by specifying MACHINE_ARCH on 430# make's command-line, get it?). 431# The reason is simple: we build these tools not to be run on the 432# architecture we're cross-building, but on the architecture we're 433# currently building on (ie the host-machine) and we expect these 434# tools to produce output for the architecture we're trying to 435# cross-build. 436# 437.if ${TARGET_ARCH} == "alpha" && ${MACHINE_ARCH} != "alpha" 438_elf2exe= usr.sbin/elf2exe 439.endif 440 441# XXX - MACHINE should actually be TARGET. But we don't set that... 442.if ${TARGET_ARCH} == "i386" && ${MACHINE} == "pc98" 443_aout_tools= usr.bin/size usr.bin/strip gnu/usr.bin/as gnu/usr.bin/ld 444.endif 445 446cross-tools: 447.for _tool in ${_aout_tools} ${_elf2exe} usr.bin/genassym usr.bin/gensetdefs \ 448 gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc 449 cd ${.CURDIR}/${_tool}; \ 450 ${MAKE} obj; \ 451 ${MAKE} depend; \ 452 ${MAKE} all; \ 453 ${MAKE} install 454.endfor 455 456# 457# hierarchy - ensure that all the needed directories are present 458# 459hierarchy: 460 cd ${.CURDIR}/etc; ${MAKE} distrib-dirs 461 462# 463# includes - possibly generate and install the include files. 464# 465includes: 466 cd ${.CURDIR}/include; ${MAKE} -B all install 467 cd ${.CURDIR}/gnu/include; ${MAKE} install 468 cd ${.CURDIR}/gnu/lib/libmp; ${MAKE} beforeinstall 469 cd ${.CURDIR}/gnu/lib/libobjc; ${MAKE} beforeinstall 470 cd ${.CURDIR}/gnu/lib/libreadline; ${MAKE} beforeinstall 471 cd ${.CURDIR}/gnu/lib/libregex; ${MAKE} beforeinstall 472 cd ${.CURDIR}/gnu/lib/libstdc++; ${MAKE} beforeinstall 473 cd ${.CURDIR}/gnu/lib/libdialog; ${MAKE} beforeinstall 474 cd ${.CURDIR}/gnu/lib/libgmp; ${MAKE} beforeinstall 475 cd ${.CURDIR}/gnu/usr.bin/cc/cc1plus; ${MAKE} beforeinstall 476.if exists(${.CURDIR}/secure) && !defined(NOCRYPT)
|
476.if exists(${.CURDIR}/secure/lib/libcrypto)
| |
477 cd ${.CURDIR}/secure/lib/libcrypto; ${MAKE} beforeinstall
| 477 cd ${.CURDIR}/secure/lib/libcrypto; ${MAKE} beforeinstall
|
478.endif
| |
479 cd ${.CURDIR}/secure/lib/libdes; ${MAKE} beforeinstall
| 478 cd ${.CURDIR}/secure/lib/libdes; ${MAKE} beforeinstall
|
480.if exists(${.CURDIR}/secure/lib/libssl)
| |
481 cd ${.CURDIR}/secure/lib/libssl; ${MAKE} beforeinstall 482.endif
| 479 cd ${.CURDIR}/secure/lib/libssl; ${MAKE} beforeinstall 480.endif
|
483.endif
| |
484.if exists(${.CURDIR}/kerberosIV) && !defined(NOCRYPT) && \ 485 defined(MAKE_KERBEROS4) 486 cd ${.CURDIR}/kerberosIV/lib/libacl; ${MAKE} beforeinstall 487 cd ${.CURDIR}/kerberosIV/lib/libkadm; ${MAKE} beforeinstall 488 cd ${.CURDIR}/kerberosIV/lib/libkafs; ${MAKE} beforeinstall 489 cd ${.CURDIR}/kerberosIV/lib/libkdb; ${MAKE} beforeinstall 490 cd ${.CURDIR}/kerberosIV/lib/libkrb; ${MAKE} beforeinstall 491 cd ${.CURDIR}/kerberosIV/lib/libtelnet; ${MAKE} beforeinstall 492.else 493 cd ${.CURDIR}/lib/libtelnet; ${MAKE} beforeinstall 494.endif 495.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}) 496 cd ${.CURDIR}/lib/csu/${MACHINE_ARCH}; ${MAKE} beforeinstall 497.endif 498 cd ${.CURDIR}/lib/libalias; ${MAKE} beforeinstall 499 cd ${.CURDIR}/lib/libatm; ${MAKE} beforeinstall 500 cd ${.CURDIR}/lib/libdevstat; ${MAKE} beforeinstall 501 cd ${.CURDIR}/lib/libc; ${MAKE} beforeinstall 502 cd ${.CURDIR}/lib/libcalendar; ${MAKE} beforeinstall 503 cd ${.CURDIR}/lib/libcam; ${MAKE} beforeinstall 504 cd ${.CURDIR}/lib/libdisk; ${MAKE} beforeinstall 505 cd ${.CURDIR}/lib/libedit; ${MAKE} beforeinstall 506 cd ${.CURDIR}/lib/libftpio; ${MAKE} beforeinstall 507 cd ${.CURDIR}/lib/libkvm; ${MAKE} beforeinstall 508 cd ${.CURDIR}/lib/libmd; ${MAKE} beforeinstall 509.if !defined(WANT_CSRG_LIBM) 510 cd ${.CURDIR}/lib/msun; ${MAKE} beforeinstall 511.endif 512 cd ${.CURDIR}/lib/libncp; ${MAKE} beforeinstall 513 cd ${.CURDIR}/lib/libncurses; ${MAKE} beforeinstall 514 cd ${.CURDIR}/lib/libnetgraph; ${MAKE} beforeinstall 515 cd ${.CURDIR}/lib/libopie; ${MAKE} beforeinstall 516 cd ${.CURDIR}/lib/libpam/libpam; ${MAKE} beforeinstall 517 cd ${.CURDIR}/lib/libpcap; ${MAKE} beforeinstall 518 cd ${.CURDIR}/lib/libradius; ${MAKE} beforeinstall 519 cd ${.CURDIR}/lib/librpcsvc; ${MAKE} beforeinstall 520 cd ${.CURDIR}/lib/libskey; ${MAKE} beforeinstall 521 cd ${.CURDIR}/lib/libstand; ${MAKE} beforeinstall 522 cd ${.CURDIR}/lib/libtacplus; ${MAKE} beforeinstall 523 cd ${.CURDIR}/lib/libcom_err; ${MAKE} beforeinstall 524 cd ${.CURDIR}/lib/libss; ${MAKE} -B hdrs beforeinstall 525 cd ${.CURDIR}/lib/libutil; ${MAKE} beforeinstall 526 cd ${.CURDIR}/lib/libvgl; ${MAKE} beforeinstall 527 cd ${.CURDIR}/lib/libwrap; ${MAKE} beforeinstall 528 cd ${.CURDIR}/lib/libz; ${MAKE} beforeinstall 529 cd ${.CURDIR}/usr.bin/lex; ${MAKE} beforeinstall 530 531# 532# libraries - build all libraries, and install them under ${DESTDIR}. 533# 534# The following dependencies exist between the libraries: 535# 536# lib*: csu 537# libatm: libmd 538# libcrypt: libmd 539# libdialog: libncurses 540# libedit: libncurses 541# libg++: libm 542# libkrb: libcrypt 543# libopie: libmd 544# libpam: libcom_err libcrypt libdes libgcc_pic libkrb libradius libskey \ 545# libtacplus libutil 546# libradius: libmd 547# libreadline: libncurses 548# libskey: libcrypt libmd 549# libss: libcom_err 550# libstc++: libm 551# libtacplus: libmd 552# 553# Across directories this comes down to (rougly): 554# 555# gnu/lib: lib/libm lib/libncurses 556# kerberosIV/lib: lib/libcrypt 557# lib/libpam: secure/lib/libdes kerberosIV/lib/libkrb gnu/lib/libgcc 558# secure/lib: lib/libmd 559# 560.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}.pcc) 561_csu= lib/csu/${MACHINE_ARCH}.pcc 562.elif ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" 563_csu= lib/csu/i386-elf 564.else 565_csu= lib/csu/${MACHINE_ARCH} 566.endif 567 568.if !defined(NOSECURE) && !defined(NOCRYPT) 569_secure_lib= secure/lib 570.endif 571 572.if !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 573_kerberosIV_lib= kerberosIV/lib 574.endif 575 576.if defined(WANT_CSRG_LIBM) 577_libm= lib/libm 578.else 579_libm= lib/msun 580.endif 581 582.if !defined(NOPERL) 583_libperl= gnu/usr.bin/perl/libperl 584.endif 585 586.if ${MACHINE_ARCH} == "i386" 587_libkeycap= usr.sbin/pcvt/keycap 588.endif 589 590libraries: 591.for _lib in ${_csu} lib/libmd lib/libcrypt ${_secure_lib} ${_kerberosIV_lib} \ 592 gnu/lib/libgcc lib/libcom_err ${_libm} lib/libncurses lib/libradius \ 593 lib/libskey lib/libtacplus lib/libutil lib gnu/lib ${_libperl} \ 594 usr.bin/lex/lib ${_libkeycap} 595.if exists(${.CURDIR}/${_lib}) 596 cd ${.CURDIR}/${_lib}; \ 597 ${MAKE} depend; \ 598 ${MAKE} all; \ 599 ${MAKE} install 600.endif 601.endfor 602 603.for __target in clean cleandepend cleandir depend obj 604.for entry in ${SUBDIR} 605${entry}.${__target}__D: .PHONY 606 @if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \ 607 ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH}"; \ 608 edir=${entry}.${MACHINE_ARCH}; \ 609 cd ${.CURDIR}/$${edir}; \ 610 else \ 611 ${ECHODIR} "===> ${DIRPRFX}${entry}"; \ 612 edir=${entry}; \ 613 cd ${.CURDIR}/$${edir}; \ 614 fi; \ 615 ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/ 616.endfor 617par-${__target}: ${SUBDIR:S/$/.${__target}__D/} 618.endfor 619 620.include <bsd.subdir.mk>
| 481.if exists(${.CURDIR}/kerberosIV) && !defined(NOCRYPT) && \ 482 defined(MAKE_KERBEROS4) 483 cd ${.CURDIR}/kerberosIV/lib/libacl; ${MAKE} beforeinstall 484 cd ${.CURDIR}/kerberosIV/lib/libkadm; ${MAKE} beforeinstall 485 cd ${.CURDIR}/kerberosIV/lib/libkafs; ${MAKE} beforeinstall 486 cd ${.CURDIR}/kerberosIV/lib/libkdb; ${MAKE} beforeinstall 487 cd ${.CURDIR}/kerberosIV/lib/libkrb; ${MAKE} beforeinstall 488 cd ${.CURDIR}/kerberosIV/lib/libtelnet; ${MAKE} beforeinstall 489.else 490 cd ${.CURDIR}/lib/libtelnet; ${MAKE} beforeinstall 491.endif 492.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}) 493 cd ${.CURDIR}/lib/csu/${MACHINE_ARCH}; ${MAKE} beforeinstall 494.endif 495 cd ${.CURDIR}/lib/libalias; ${MAKE} beforeinstall 496 cd ${.CURDIR}/lib/libatm; ${MAKE} beforeinstall 497 cd ${.CURDIR}/lib/libdevstat; ${MAKE} beforeinstall 498 cd ${.CURDIR}/lib/libc; ${MAKE} beforeinstall 499 cd ${.CURDIR}/lib/libcalendar; ${MAKE} beforeinstall 500 cd ${.CURDIR}/lib/libcam; ${MAKE} beforeinstall 501 cd ${.CURDIR}/lib/libdisk; ${MAKE} beforeinstall 502 cd ${.CURDIR}/lib/libedit; ${MAKE} beforeinstall 503 cd ${.CURDIR}/lib/libftpio; ${MAKE} beforeinstall 504 cd ${.CURDIR}/lib/libkvm; ${MAKE} beforeinstall 505 cd ${.CURDIR}/lib/libmd; ${MAKE} beforeinstall 506.if !defined(WANT_CSRG_LIBM) 507 cd ${.CURDIR}/lib/msun; ${MAKE} beforeinstall 508.endif 509 cd ${.CURDIR}/lib/libncp; ${MAKE} beforeinstall 510 cd ${.CURDIR}/lib/libncurses; ${MAKE} beforeinstall 511 cd ${.CURDIR}/lib/libnetgraph; ${MAKE} beforeinstall 512 cd ${.CURDIR}/lib/libopie; ${MAKE} beforeinstall 513 cd ${.CURDIR}/lib/libpam/libpam; ${MAKE} beforeinstall 514 cd ${.CURDIR}/lib/libpcap; ${MAKE} beforeinstall 515 cd ${.CURDIR}/lib/libradius; ${MAKE} beforeinstall 516 cd ${.CURDIR}/lib/librpcsvc; ${MAKE} beforeinstall 517 cd ${.CURDIR}/lib/libskey; ${MAKE} beforeinstall 518 cd ${.CURDIR}/lib/libstand; ${MAKE} beforeinstall 519 cd ${.CURDIR}/lib/libtacplus; ${MAKE} beforeinstall 520 cd ${.CURDIR}/lib/libcom_err; ${MAKE} beforeinstall 521 cd ${.CURDIR}/lib/libss; ${MAKE} -B hdrs beforeinstall 522 cd ${.CURDIR}/lib/libutil; ${MAKE} beforeinstall 523 cd ${.CURDIR}/lib/libvgl; ${MAKE} beforeinstall 524 cd ${.CURDIR}/lib/libwrap; ${MAKE} beforeinstall 525 cd ${.CURDIR}/lib/libz; ${MAKE} beforeinstall 526 cd ${.CURDIR}/usr.bin/lex; ${MAKE} beforeinstall 527 528# 529# libraries - build all libraries, and install them under ${DESTDIR}. 530# 531# The following dependencies exist between the libraries: 532# 533# lib*: csu 534# libatm: libmd 535# libcrypt: libmd 536# libdialog: libncurses 537# libedit: libncurses 538# libg++: libm 539# libkrb: libcrypt 540# libopie: libmd 541# libpam: libcom_err libcrypt libdes libgcc_pic libkrb libradius libskey \ 542# libtacplus libutil 543# libradius: libmd 544# libreadline: libncurses 545# libskey: libcrypt libmd 546# libss: libcom_err 547# libstc++: libm 548# libtacplus: libmd 549# 550# Across directories this comes down to (rougly): 551# 552# gnu/lib: lib/libm lib/libncurses 553# kerberosIV/lib: lib/libcrypt 554# lib/libpam: secure/lib/libdes kerberosIV/lib/libkrb gnu/lib/libgcc 555# secure/lib: lib/libmd 556# 557.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}.pcc) 558_csu= lib/csu/${MACHINE_ARCH}.pcc 559.elif ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" 560_csu= lib/csu/i386-elf 561.else 562_csu= lib/csu/${MACHINE_ARCH} 563.endif 564 565.if !defined(NOSECURE) && !defined(NOCRYPT) 566_secure_lib= secure/lib 567.endif 568 569.if !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 570_kerberosIV_lib= kerberosIV/lib 571.endif 572 573.if defined(WANT_CSRG_LIBM) 574_libm= lib/libm 575.else 576_libm= lib/msun 577.endif 578 579.if !defined(NOPERL) 580_libperl= gnu/usr.bin/perl/libperl 581.endif 582 583.if ${MACHINE_ARCH} == "i386" 584_libkeycap= usr.sbin/pcvt/keycap 585.endif 586 587libraries: 588.for _lib in ${_csu} lib/libmd lib/libcrypt ${_secure_lib} ${_kerberosIV_lib} \ 589 gnu/lib/libgcc lib/libcom_err ${_libm} lib/libncurses lib/libradius \ 590 lib/libskey lib/libtacplus lib/libutil lib gnu/lib ${_libperl} \ 591 usr.bin/lex/lib ${_libkeycap} 592.if exists(${.CURDIR}/${_lib}) 593 cd ${.CURDIR}/${_lib}; \ 594 ${MAKE} depend; \ 595 ${MAKE} all; \ 596 ${MAKE} install 597.endif 598.endfor 599 600.for __target in clean cleandepend cleandir depend obj 601.for entry in ${SUBDIR} 602${entry}.${__target}__D: .PHONY 603 @if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \ 604 ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH}"; \ 605 edir=${entry}.${MACHINE_ARCH}; \ 606 cd ${.CURDIR}/$${edir}; \ 607 else \ 608 ${ECHODIR} "===> ${DIRPRFX}${entry}"; \ 609 edir=${entry}; \ 610 cd ${.CURDIR}/$${edir}; \ 611 fi; \ 612 ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/ 613.endfor 614par-${__target}: ${SUBDIR:S/$/.${__target}__D/} 615.endfor 616 617.include <bsd.subdir.mk>
|