Makefile.inc1 revision 55817
1# 2# $FreeBSD: head/Makefile.inc1 55817 2000-01-11 13:19:57Z 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 MACHINE_ARCH=${BUILD_ARCH} \ 146 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 -DNOHTML 159 160# build-tool stage 161TMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \ 162 PATH=${TMPPATH} 163TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1 164 165# cross-tool stage 166XMAKEENV= ${BOOTSTRAPENV} \ 167 TARGET_ARCH=${MACHINE_ARCH} 168XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO -DNOHTML \ 169 -DNO_FORTRAN -DNO_GDB 170 171# world stage 172WMAKEENV= ${CROSSENV} \ 173 DESTDIR=${WORLDTMP} \ 174 PATH=${TMPPATH} 175WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 176 177# install stage 178IMAKEENV= ${CROSSENV} 179IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 180 181USRDIRS= usr/bin usr/lib/compat/aout usr/games usr/libdata/ldscripts \ 182 usr/libexec/${OBJFORMAT} usr/sbin usr/share/misc 183 184.if ${MACHINE_ARCH} == "i386" && ${MACHINE} == "pc98" 185USRDIRS+= usr/libexec/aout 186.endif 187 188INCDIRS= arpa g++/std objc protocols readline rpc rpcsvc openssl \ 189 security ss 190 191# 192# buildworld 193# 194# Attempt to rebuild the entire system, with reasonable chance of 195# success, regardless of how old your existing system is. 196# 197buildworld: 198 @echo 199 @echo "--------------------------------------------------------------" 200 @echo ">>> Rebuilding the temporary build tree" 201 @echo "--------------------------------------------------------------" 202.if !defined(NOCLEAN) 203 rm -rf ${WORLDTMP} 204.else 205 for dir in bin games include lib sbin; do \ 206 rm -rf ${WORLDTMP}/usr/$$dir; \ 207 done 208 rm -f ${WORLDTMP}/sys 209.endif 210.for _dir in ${USRDIRS} 211 mkdir -p ${WORLDTMP}/${_dir} 212.endfor 213.for _dir in ${INCDIRS} 214 mkdir -p ${WORLDTMP}/usr/include/${_dir} 215.endfor 216 ln -sf ${.CURDIR}/sys ${WORLDTMP}/sys 217 @echo 218 @echo "--------------------------------------------------------------" 219 @echo ">>> stage 1: bootstrap tools" 220 @echo "--------------------------------------------------------------" 221 cd ${.CURDIR}; ${BMAKE} bootstrap-tools 222.if !defined(NOCLEAN) 223 @echo 224 @echo "--------------------------------------------------------------" 225 @echo ">>> stage 2: cleaning up the object tree" 226 @echo "--------------------------------------------------------------" 227 cd ${.CURDIR}; ${TMAKE} ${CLEANDIR:S/^/par-/} 228.endif 229 @echo 230 @echo "--------------------------------------------------------------" 231 @echo ">>> stage 2: rebuilding the object tree" 232 @echo "--------------------------------------------------------------" 233 cd ${.CURDIR}; ${TMAKE} par-obj 234 @echo 235 @echo "--------------------------------------------------------------" 236 @echo ">>> stage 2: build tools" 237 @echo "--------------------------------------------------------------" 238 cd ${.CURDIR}; ${TMAKE} build-tools 239 @echo 240 @echo "--------------------------------------------------------------" 241 @echo ">>> stage 3: cross tools" 242 @echo "--------------------------------------------------------------" 243 cd ${.CURDIR}; ${XMAKE} cross-tools 244 @echo 245 @echo "--------------------------------------------------------------" 246 @echo ">>> stage 4: populating ${WORLDTMP}/usr/include" 247 @echo "--------------------------------------------------------------" 248 cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes 249 @echo 250 @echo "--------------------------------------------------------------" 251 @echo ">>> stage 4: building libraries" 252 @echo "--------------------------------------------------------------" 253 cd ${.CURDIR}; ${WMAKE} -DNOHTML -DNOINFO -DNOMAN libraries 254 @echo 255 @echo "--------------------------------------------------------------" 256 @echo ">>> stage 4: make dependencies" 257 @echo "--------------------------------------------------------------" 258 cd ${.CURDIR}; ${WMAKE} par-depend 259 @echo 260 @echo "--------------------------------------------------------------" 261 @echo ">>> stage 4: building everything.." 262 @echo "--------------------------------------------------------------" 263 cd ${.CURDIR}; ${WMAKE} all 264 265everything: 266 @echo "--------------------------------------------------------------" 267 @echo ">>> Building everything.." 268 @echo "--------------------------------------------------------------" 269 cd ${.CURDIR}; ${WMAKE} all 270 271# 272# installworld 273# 274# Installs everything compiled by a 'buildworld'. 275# 276installworld: 277 cd ${.CURDIR}; ${IMAKE} reinstall 278 279# 280# reinstall 281# 282# If you have a build server, you can NFS mount the source and obj directories 283# and do a 'make reinstall' on the *client* to install new binaries from the 284# most recent server build. 285# 286reinstall: 287 @echo "--------------------------------------------------------------" 288 @echo ">>> Making hierarchy" 289 @echo "--------------------------------------------------------------" 290 cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 hierarchy 291 @echo 292 @echo "--------------------------------------------------------------" 293 @echo ">>> Installing everything.." 294 @echo "--------------------------------------------------------------" 295 cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install 296.if !defined(NOMAN) 297 @echo 298 @echo "--------------------------------------------------------------" 299 @echo ">>> Rebuilding man page indices" 300 @echo "--------------------------------------------------------------" 301 cd ${.CURDIR}/share/man; ${MAKE} makedb 302.endif 303 304# 305# buildkernel and installkernel 306# 307# Which kernels to build and/or install is specified by setting 308# KERNEL. If not defined a GENERIC kernel is built/installed. 309# Only the existing (depending MACHINE) config files are used 310# for building kernels and only the first of these is designated 311# as the one being installed. 312# 313# Note that we have to use MACHINE instead of MACHINE_ARCH when 314# we're in kernel-land. Since only MACHINE_ARCH is (expected) to 315# be set to cross-build, we have to make sure MACHINE is set 316# properly. 317 318KERNEL?= GENERIC GENERIC98 319 320# The only exotic MACHINE_ARCH/MACHINE combination valid at this 321# time is i386/pc98. In all other cases set MACHINE equal to 322# MACHINE_ARCH. 323.if ${MACHINE_ARCH} != "i386" || ${MACHINE} != "pc98" 324MACHINE= ${MACHINE_ARCH} 325.endif 326 327KRNLSRCDIR= ${.CURDIR}/sys 328KRNLCONFDIR= ${KRNLSRCDIR}/${MACHINE}/conf 329KRNLOBJDIR= ${OBJTREE}${KRNLSRCDIR} 330 331.if !defined(NOCLEAN) 332CONFIGARGS+= -r 333.endif 334 335BUILDKERNELS= 336INSTALLKERNEL= 337.for _kernel in ${KERNEL} 338.if exists(${KRNLCONFDIR}/${_kernel}) 339BUILDKERNELS+= ${_kernel} 340.if empty(INSTALLKERNEL) 341INSTALLKERNEL= ${_kernel} 342.endif 343.endif 344.endfor 345 346# 347# buildkernel 348# 349# Builds all kernels defined by BUILDKERNELS. 350# 351buildkernel: 352 @echo 353 @echo "--------------------------------------------------------------" 354 @echo ">>> Rebuilding kernel(s)" 355 @echo "--------------------------------------------------------------" 356.for _kernel in ${BUILDKERNELS} 357 @echo "===> ${_kernel}" 358 cd ${KRNLCONFDIR}; \ 359 PATH=${TMPPATH} \ 360 config ${CONFIGARGS} -d ${KRNLOBJDIR}/${_kernel} ${_kernel} 361 cd ${KRNLOBJDIR}/${_kernel}; \ 362 MAKESRCPATH=${KRNLSRCDIR}/dev/aic7xxx \ 363 ${MAKE} -f ${KRNLSRCDIR}/dev/aic7xxx/Makefile; \ 364 ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} depend; \ 365 ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} all 366.endfor 367 368# 369# installkernel 370# 371# Install the kernel defined by INSTALLKERNEL 372# 373installkernel: 374 cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ 375 ${WMAKEENV} MACHINE=${MACHINE} ${MAKE} install 376 377# 378# update 379# 380# Update the source tree, by running sup and/or running cvs to update to the 381# latest copy. 382# 383update: 384.if defined(SUP_UPDATE) 385 @echo "--------------------------------------------------------------" 386 @echo ">>> Running ${SUP}" 387 @echo "--------------------------------------------------------------" 388.if defined(SUPFILE) 389 @${SUP} ${SUPFLAGS} ${SUPFILE} 390.endif 391.if defined(SUPFILE1) 392 @${SUP} ${SUPFLAGS} ${SUPFILE1} 393.endif 394.if defined(SUPFILE2) 395 @${SUP} ${SUPFLAGS} ${SUPFILE2} 396.endif 397.if defined(PORTSSUPFILE) 398 @${SUP} ${SUPFLAGS} ${PORTSSUPFILE} 399.endif 400.endif 401.if defined(CVS_UPDATE) 402 @echo "--------------------------------------------------------------" 403 @echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT} 404 @echo "--------------------------------------------------------------" 405 cd ${.CURDIR}; cvs -q update -P -d 406.endif 407 408# 409# most 410# 411# Build most of the user binaries on the existing system libs and includes. 412# 413most: 414 @echo "--------------------------------------------------------------" 415 @echo ">>> Building programs only" 416 @echo "--------------------------------------------------------------" 417 cd ${.CURDIR}/bin; ${MAKE} all 418 cd ${.CURDIR}/sbin; ${MAKE} all 419 cd ${.CURDIR}/libexec; ${MAKE} all 420 cd ${.CURDIR}/usr.bin; ${MAKE} all 421 cd ${.CURDIR}/usr.sbin; ${MAKE} all 422 cd ${.CURDIR}/gnu/libexec; ${MAKE} all 423 cd ${.CURDIR}/gnu/usr.bin; ${MAKE} all 424 cd ${.CURDIR}/gnu/usr.sbin; ${MAKE} all 425 426# 427# installmost 428# 429# Install the binaries built by the 'most' target. This does not include 430# libraries or include files. 431# 432installmost: 433 @echo "--------------------------------------------------------------" 434 @echo ">>> Installing programs only" 435 @echo "--------------------------------------------------------------" 436 cd ${.CURDIR}/bin; ${MAKE} install 437 cd ${.CURDIR}/sbin; ${MAKE} install 438 cd ${.CURDIR}/libexec; ${MAKE} install 439 cd ${.CURDIR}/usr.bin; ${MAKE} install 440 cd ${.CURDIR}/usr.sbin; ${MAKE} install 441 cd ${.CURDIR}/gnu/libexec; ${MAKE} install 442 cd ${.CURDIR}/gnu/usr.bin; ${MAKE} install 443 cd ${.CURDIR}/gnu/usr.sbin; ${MAKE} install 444 445# 446# ------------------------------------------------------------------------ 447# 448# From here onwards are utility targets used by the 'make world' and 449# related targets. If your 'world' breaks, you may like to try to fix 450# the problem and manually run the following targets to attempt to 451# complete the build. Beware, this is *not* guaranteed to work, you 452# need to have a pretty good grip on the current state of the system 453# to attempt to manually finish it. If in doubt, 'make world' again. 454# 455 456# 457# bootstrap-tools: Build tools needed for compatibility 458# 459.if exists(${.CURDIR}/games) && !defined(NOGAMES) 460_strfile= games/fortune/strfile 461.endif 462 463bootstrap-tools: 464.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef usr.sbin/config 465 cd ${.CURDIR}/${_tool}; \ 466 ${MAKE} obj; \ 467 ${MAKE} depend; \ 468 ${MAKE} all; \ 469 ${MAKE} install 470.endfor 471 472# 473# build-tools: Build special purpose build tools 474# 475.if exists(${.CURDIR}/games) && !defined(NOGAMES) 476_games= games/adventure games/hack games/phantasia 477.endif 478 479.if exists(${.CURDIR}/share) && !defined(NOSHARE) 480_share= share/syscons/scrnmaps 481.endif 482 483.if !defined(NO_FORTRAN) 484_fortran= gnu/usr.bin/cc/f771 485.endif 486 487.if exists(${.CURDIR}/kerberosIV) && exists(${.CURDIR}/crypto) && \ 488 !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 489_libroken= kerberosIV/lib/libroken 490.endif 491 492build-tools: 493.for _tool in bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \ 494 ${_libroken} lib/libncurses ${_share} 495 cd ${.CURDIR}/${_tool}; ${MAKE} build-tools 496.endfor 497 498# 499# cross-tools: Build cross-building tools 500# 501# WARNING: Because the bootstrap tools are expected to run on the 502# build-machine, MACHINE_ARCH is *always* set to BUILD_ARCH when this 503# target is being made. TARGET_ARCH is *always* set to reflect the 504# target-machine (which you can set by specifying MACHINE_ARCH on 505# make's command-line, get it?). 506# The reason is simple: we build these tools not to be run on the 507# architecture we're cross-building, but on the architecture we're 508# currently building on (ie the host-machine) and we expect these 509# tools to produce output for the architecture we're trying to 510# cross-build. 511# 512.if ${TARGET_ARCH} == "alpha" && ${MACHINE_ARCH} != "alpha" 513_elf2exe= usr.sbin/elf2exe 514.endif 515 516.if ${TARGET_ARCH} == "i386" && ${MACHINE_ARCH} != "i386" 517_btxld= usr.sbin/btxld 518.endif 519 520# XXX - MACHINE should actually be TARGET. But we don't set that... 521.if ${TARGET_ARCH} == "i386" && ${MACHINE} == "pc98" 522_aout_tools= usr.bin/size usr.bin/strip gnu/usr.bin/as gnu/usr.bin/ld 523.endif 524 525cross-tools: 526.for _tool in ${_aout_tools} ${_btxld} ${_elf2exe} usr.bin/genassym \ 527 usr.bin/gensetdefs gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc 528 cd ${.CURDIR}/${_tool}; \ 529 ${MAKE} obj; \ 530 ${MAKE} depend; \ 531 ${MAKE} all; \ 532 ${MAKE} install 533.endfor 534 535# 536# hierarchy - ensure that all the needed directories are present 537# 538hierarchy: 539 cd ${.CURDIR}/etc; ${MAKE} distrib-dirs 540 541# 542# includes - possibly generate and install the include files. 543# 544includes: 545 cd ${.CURDIR}/include; ${MAKE} -B all install 546 cd ${.CURDIR}/gnu/include; ${MAKE} install 547 cd ${.CURDIR}/gnu/lib/libmp; ${MAKE} beforeinstall 548 cd ${.CURDIR}/gnu/lib/libobjc; ${MAKE} beforeinstall 549 cd ${.CURDIR}/gnu/lib/libreadline; ${MAKE} beforeinstall 550 cd ${.CURDIR}/gnu/lib/libregex; ${MAKE} beforeinstall 551 cd ${.CURDIR}/gnu/lib/libstdc++; ${MAKE} beforeinstall 552 cd ${.CURDIR}/gnu/lib/libdialog; ${MAKE} beforeinstall 553 cd ${.CURDIR}/gnu/lib/libgmp; ${MAKE} beforeinstall 554 cd ${.CURDIR}/gnu/usr.bin/cc/cc1plus; ${MAKE} beforeinstall 555.if exists(${.CURDIR}/secure) && !defined(NOCRYPT) 556.if exists(${.CURDIR}/secure/lib/libcrypto) 557 cd ${.CURDIR}/secure/lib/libcrypto; ${MAKE} beforeinstall 558.endif 559 cd ${.CURDIR}/secure/lib/libdes; ${MAKE} beforeinstall 560.if exists(${.CURDIR}/secure/lib/libssl) 561 cd ${.CURDIR}/secure/lib/libssl; ${MAKE} beforeinstall 562.endif 563.endif 564.if exists(${.CURDIR}/kerberosIV) && !defined(NOCRYPT) && \ 565 defined(MAKE_KERBEROS4) 566 cd ${.CURDIR}/kerberosIV/lib/libacl; ${MAKE} beforeinstall 567 cd ${.CURDIR}/kerberosIV/lib/libkadm; ${MAKE} beforeinstall 568 cd ${.CURDIR}/kerberosIV/lib/libkafs; ${MAKE} beforeinstall 569 cd ${.CURDIR}/kerberosIV/lib/libkdb; ${MAKE} beforeinstall 570 cd ${.CURDIR}/kerberosIV/lib/libkrb; ${MAKE} beforeinstall 571 cd ${.CURDIR}/kerberosIV/lib/libtelnet; ${MAKE} beforeinstall 572.else 573 cd ${.CURDIR}/lib/libtelnet; ${MAKE} beforeinstall 574.endif 575.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}) 576 cd ${.CURDIR}/lib/csu/${MACHINE_ARCH}; ${MAKE} beforeinstall 577.endif 578 cd ${.CURDIR}/lib/libalias; ${MAKE} beforeinstall 579 cd ${.CURDIR}/lib/libatm; ${MAKE} beforeinstall 580 cd ${.CURDIR}/lib/libdevstat; ${MAKE} beforeinstall 581 cd ${.CURDIR}/lib/libc; ${MAKE} beforeinstall 582 cd ${.CURDIR}/lib/libcalendar; ${MAKE} beforeinstall 583 cd ${.CURDIR}/lib/libcam; ${MAKE} beforeinstall 584 cd ${.CURDIR}/lib/libdisk; ${MAKE} beforeinstall 585 cd ${.CURDIR}/lib/libedit; ${MAKE} beforeinstall 586 cd ${.CURDIR}/lib/libftpio; ${MAKE} beforeinstall 587 cd ${.CURDIR}/lib/libkvm; ${MAKE} beforeinstall 588 cd ${.CURDIR}/lib/libmd; ${MAKE} beforeinstall 589.if !defined(WANT_CSRG_LIBM) 590 cd ${.CURDIR}/lib/msun; ${MAKE} beforeinstall 591.endif 592 cd ${.CURDIR}/lib/libncp; ${MAKE} beforeinstall 593 cd ${.CURDIR}/lib/libncurses; ${MAKE} beforeinstall 594 cd ${.CURDIR}/lib/libnetgraph; ${MAKE} beforeinstall 595 cd ${.CURDIR}/lib/libopie; ${MAKE} beforeinstall 596 cd ${.CURDIR}/lib/libpam/libpam; ${MAKE} beforeinstall 597 cd ${.CURDIR}/lib/libpcap; ${MAKE} beforeinstall 598 cd ${.CURDIR}/lib/libradius; ${MAKE} beforeinstall 599 cd ${.CURDIR}/lib/librpcsvc; ${MAKE} beforeinstall 600 cd ${.CURDIR}/lib/libskey; ${MAKE} beforeinstall 601 cd ${.CURDIR}/lib/libstand; ${MAKE} beforeinstall 602 cd ${.CURDIR}/lib/libtacplus; ${MAKE} beforeinstall 603 cd ${.CURDIR}/lib/libcom_err; ${MAKE} beforeinstall 604 cd ${.CURDIR}/lib/libss; ${MAKE} -B hdrs beforeinstall 605 cd ${.CURDIR}/lib/libutil; ${MAKE} beforeinstall 606 cd ${.CURDIR}/lib/libvgl; ${MAKE} beforeinstall 607 cd ${.CURDIR}/lib/libwrap; ${MAKE} beforeinstall 608 cd ${.CURDIR}/lib/libz; ${MAKE} beforeinstall 609 cd ${.CURDIR}/usr.bin/lex; ${MAKE} beforeinstall 610 611# 612# libraries - build all libraries, and install them under ${DESTDIR}. 613# 614# The following dependencies exist between the libraries: 615# 616# lib*: csu 617# libatm: libmd 618# libcrypt: libmd 619# libdialog: libncurses 620# libedit: libncurses 621# libg++: libm 622# libkrb: libcrypt 623# libopie: libmd 624# libpam: libcom_err libcrypt libdes libgcc_pic libkrb libradius libskey \ 625# libtacplus libutil 626# libradius: libmd 627# libreadline: libncurses 628# libskey: libcrypt libmd 629# libss: libcom_err 630# libstc++: libm 631# libtacplus: libmd 632# 633# Across directories this comes down to (rougly): 634# 635# gnu/lib: lib/libm lib/libncurses 636# kerberosIV/lib: lib/libcrypt 637# lib/libpam: secure/lib/libdes kerberosIV/lib/libkrb gnu/lib/libgcc 638# secure/lib: lib/libmd 639# 640.if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}.pcc) 641_csu= lib/csu/${MACHINE_ARCH}.pcc 642.elif ${MACHINE_ARCH} == "i386" && ${OBJFORMAT} == "elf" 643_csu= lib/csu/i386-elf 644.else 645_csu= lib/csu/${MACHINE_ARCH} 646.endif 647 648.if !defined(NOSECURE) && !defined(NOCRYPT) 649_secure_lib= secure/lib 650.endif 651 652.if !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 653_kerberosIV_lib= kerberosIV/lib 654.endif 655 656.if defined(WANT_CSRG_LIBM) 657_libm= lib/libm 658.else 659_libm= lib/msun 660.endif 661 662.if !defined(NOPERL) 663_libperl= gnu/usr.bin/perl/libperl 664.endif 665 666.if ${MACHINE_ARCH} == "i386" 667_libkeycap= usr.sbin/pcvt/keycap 668.endif 669 670libraries: 671.for _lib in ${_csu} lib/libmd lib/libcrypt ${_secure_lib} ${_kerberosIV_lib} \ 672 gnu/lib/libgcc lib/libcom_err ${_libm} lib/libncurses lib/libradius \ 673 lib/libskey lib/libtacplus lib/libutil lib gnu/lib ${_libperl} \ 674 usr.bin/lex/lib ${_libkeycap} 675.if exists(${.CURDIR}/${_lib}) 676 cd ${.CURDIR}/${_lib}; \ 677 ${MAKE} depend; \ 678 ${MAKE} all; \ 679 ${MAKE} install 680.endif 681.endfor 682 683.for __target in clean cleandepend cleandir depend obj 684.for entry in ${SUBDIR} 685${entry}.${__target}__D: .PHONY 686 @if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \ 687 ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE_ARCH}"; \ 688 edir=${entry}.${MACHINE_ARCH}; \ 689 cd ${.CURDIR}/$${edir}; \ 690 else \ 691 ${ECHODIR} "===> ${DIRPRFX}${entry}"; \ 692 edir=${entry}; \ 693 cd ${.CURDIR}/$${edir}; \ 694 fi; \ 695 ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/ 696.endfor 697par-${__target}: ${SUBDIR:S/$/.${__target}__D/} 698.endfor 699 700.include <bsd.subdir.mk> 701