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