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