150476Speter# $FreeBSD: stable/10/share/mk/bsd.own.mk 324140 2017-09-30 20:46:34Z ngie $ 215903Swosch# 315903Swosch# The include file <bsd.own.mk> set common variables for owner, 415903Swosch# group, mode, and directories. Defaults are in brackets. 515903Swosch# 615903Swosch# 715903Swosch# +++ variables +++ 815903Swosch# 915903Swosch# DESTDIR Change the tree where the file gets installed. [not set] 1015903Swosch# 1115903Swosch# DISTDIR Change the tree where the file for a distribution 1215903Swosch# gets installed (see /usr/src/release/Makefile). [not set] 1315903Swosch# 14139761Skrion# COMPRESS_CMD Program to compress documents. 1534678Sbde# Output is to stdout. [gzip -cn] 1623546Swosch# 1723546Swosch# COMPRESS_EXT File name extension of ${COMPRESS_CMD} command. [.gz] 1823546Swosch# 1939161Sobrien# BINOWN Binary owner. [root] 2015903Swosch# 2139161Sobrien# BINGRP Binary group. [wheel] 2215903Swosch# 2315903Swosch# BINMODE Binary mode. [555] 2415903Swosch# 2515903Swosch# NOBINMODE Mode for non-executable files. [444] 2615903Swosch# 2715903Swosch# LIBDIR Base path for libraries. [/usr/lib] 2815903Swosch# 2932216Swosch# LIBCOMPATDIR Base path for compat libraries. [/usr/lib/compat] 3032216Swosch# 31255384Sdes# LIBPRIVATEDIR Base path for private libraries. [/usr/lib/private] 32255384Sdes# 3332216Swosch# LIBDATADIR Base path for misc. utility data files. [/usr/libdata] 3432216Swosch# 35218525Skeramida# LIBEXECDIR Base path for system daemons and utilities. [/usr/libexec] 36218525Skeramida# 3715903Swosch# LINTLIBDIR Base path for lint libraries. [/usr/libdata/lint] 3815903Swosch# 3915903Swosch# SHLIBDIR Base path for shared libraries. [${LIBDIR}] 4015903Swosch# 41119057Sobrien# LIBOWN Library owner. [${BINOWN}] 4215903Swosch# 4315903Swosch# LIBGRP Library group. [${BINGRP}] 4415903Swosch# 4515903Swosch# LIBMODE Library mode. [${NOBINMODE}] 4615903Swosch# 4715903Swosch# 48251512Semaste# DEBUGDIR Base path for standalone debug files. [/usr/lib/debug] 49251512Semaste# 50251512Semaste# DEBUGMODE Mode for debug files. [${NOBINMODE}] 51251512Semaste# 52251512Semaste# 5315903Swosch# KMODDIR Base path for loadable kernel modules 5465501Sobrien# (see kld(4)). [/boot/kernel] 5515903Swosch# 56186894Sbz# KMODOWN Kernel and KLD owner. [${BINOWN}] 5715903Swosch# 58186894Sbz# KMODGRP Kernel and KLD group. [${BINGRP}] 5915903Swosch# 6053033Sphantom# KMODMODE KLD mode. [${BINMODE}] 6115903Swosch# 6215903Swosch# 6315903Swosch# SHAREDIR Base path for architecture-independent ascii 6415903Swosch# text files. [/usr/share] 6515903Swosch# 6639161Sobrien# SHAREOWN ASCII text file owner. [root] 6715903Swosch# 6839161Sobrien# SHAREGRP ASCII text file group. [wheel] 6915903Swosch# 7015903Swosch# SHAREMODE ASCII text file mode. [${NOBINMODE}] 7115903Swosch# 7215903Swosch# 73223596Sse# CONFDIR Base path for configuration files. [/etc] 74223596Sse# 75223596Sse# CONFOWN Configuration file owner. [root] 76223596Sse# 77223596Sse# CONFGRP Configuration file group. [wheel] 78223596Sse# 79223596Sse# CONFMODE Configuration file mode. [644] 80223596Sse# 81223596Sse# 8215903Swosch# DOCDIR Base path for system documentation (e.g. PSD, USD, 8315903Swosch# handbook, FAQ etc.). [${SHAREDIR}/doc] 8415903Swosch# 8515903Swosch# DOCOWN Documentation owner. [${SHAREOWN}] 8615903Swosch# 8715903Swosch# DOCGRP Documentation group. [${SHAREGRP}] 8815903Swosch# 8915903Swosch# DOCMODE Documentation mode. [${NOBINMODE}] 9015903Swosch# 9115903Swosch# 9215903Swosch# INFODIR Base path for GNU's hypertext system 9315903Swosch# called Info (see info(1)). [${SHAREDIR}/info] 9415903Swosch# 9515903Swosch# INFOOWN Info owner. [${SHAREOWN}] 9615903Swosch# 9715903Swosch# INFOGRP Info group. [${SHAREGRP}] 9815903Swosch# 9915903Swosch# INFOMODE Info mode. [${NOBINMODE}] 10015903Swosch# 10115903Swosch# 10215903Swosch# MANDIR Base path for manual installation. [${SHAREDIR}/man/man] 10315903Swosch# 10415903Swosch# MANOWN Manual owner. [${SHAREOWN}] 10515903Swosch# 10615903Swosch# MANGRP Manual group. [${SHAREGRP}] 10715903Swosch# 10815903Swosch# MANMODE Manual mode. [${NOBINMODE}] 10915903Swosch# 11015903Swosch# 11115903Swosch# NLSDIR Base path for National Language Support files 11290627Sphantom# installation. [${SHAREDIR}/nls] 11315903Swosch# 11490626Sphantom# NLSOWN National Language Support files owner. [${SHAREOWN}] 11515903Swosch# 11690626Sphantom# NLSGRP National Language Support files group. [${SHAREGRP}] 11715903Swosch# 11861462Sghelmer# NLSMODE National Language Support files mode. [${NOBINMODE}] 11915903Swosch# 12032216Swosch# INCLUDEDIR Base path for standard C include files [/usr/include] 12115903Swosch 12294982Sru.if !target(__<bsd.own.mk>__) 12394982Sru__<bsd.own.mk>__: 12494982Sru 125164411Sru.if !defined(_WITHOUT_SRCCONF) 126156813SruSRCCONF?= /etc/src.conf 127248751Semaste.if exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf" 128156836Sru.include "${SRCCONF}" 129156836Sru.endif 130164411Sru.endif 131156813Sru 13214968Swosch# Binaries 13339161SobrienBINOWN?= root 13439161SobrienBINGRP?= wheel 13514573SwoschBINMODE?= 555 13614968SwoschNOBINMODE?= 444 13714573Swosch 138111853Sru.if defined(MODULES_WITH_WORLD) 139111853SruKMODDIR?= /boot/modules 140111853Sru.else 14165501SobrienKMODDIR?= /boot/kernel 142111853Sru.endif 14348204SjmgKMODOWN?= ${BINOWN} 14448204SjmgKMODGRP?= ${BINGRP} 14548204SjmgKMODMODE?= ${BINMODE} 146284002SimpDTBDIR?= /boot/dtb 147284002SimpDTBOWN?= root 148284002SimpDTBGRP?= wheel 149284002SimpDTBMODE?= 444 15048204Sjmg 15114573SwoschLIBDIR?= /usr/lib 15232226SsteveLIBCOMPATDIR?= /usr/lib/compat 153255384SdesLIBPRIVATEDIR?= /usr/lib/private 15432226SsteveLIBDATADIR?= /usr/libdata 155218525SkeramidaLIBEXECDIR?= /usr/libexec 15614573SwoschLINTLIBDIR?= /usr/libdata/lint 15714573SwoschSHLIBDIR?= ${LIBDIR} 15814968SwoschLIBOWN?= ${BINOWN} 15914968SwoschLIBGRP?= ${BINGRP} 16014968SwoschLIBMODE?= ${NOBINMODE} 16114573Swosch 162251512SemasteDEBUGDIR?= /usr/lib/debug 163251512SemasteDEBUGMODE?= ${NOBINMODE} 16414968Swosch 165251512Semaste 16614968Swosch# Share files 16714968SwoschSHAREDIR?= /usr/share 16839161SobrienSHAREOWN?= root 16939161SobrienSHAREGRP?= wheel 17014968SwoschSHAREMODE?= ${NOBINMODE} 17114968Swosch 172223596SseCONFDIR?= /etc 173223596SseCONFOWN?= root 174223596SseCONFGRP?= wheel 175223596SseCONFMODE?= 644 176223596Sse 17714968SwoschMANDIR?= ${SHAREDIR}/man/man 17814968SwoschMANOWN?= ${SHAREOWN} 17914968SwoschMANGRP?= ${SHAREGRP} 18014968SwoschMANMODE?= ${NOBINMODE} 18114968Swosch 18214968SwoschDOCDIR?= ${SHAREDIR}/doc 18314968SwoschDOCOWN?= ${SHAREOWN} 18414968SwoschDOCGRP?= ${SHAREGRP} 18514968SwoschDOCMODE?= ${NOBINMODE} 18614968Swosch 18714968SwoschINFODIR?= ${SHAREDIR}/info 18814968SwoschINFOOWN?= ${SHAREOWN} 18914968SwoschINFOGRP?= ${SHAREGRP} 19014968SwoschINFOMODE?= ${NOBINMODE} 19114968Swosch 19214968SwoschNLSDIR?= ${SHAREDIR}/nls 19390626SphantomNLSOWN?= ${SHAREOWN} 19490626SphantomNLSGRP?= ${SHAREGRP} 19561462SghelmerNLSMODE?= ${NOBINMODE} 19614968Swosch 19732216SwoschINCLUDEDIR?= /usr/include 19832216Swosch 199245752Sbrooks# 200245752Sbrooks# install(1) parameters. 201245752Sbrooks# 202245752SbrooksHRDLINK?= -l h 203245752SbrooksSYMLINK?= -l s 204245752Sbrooks 205245752SbrooksINSTALL_LINK?= ${INSTALL} ${HRDLINK} 206245752SbrooksINSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} 207245752Sbrooks 20814968Swosch# Common variables 209125494Sru.if !defined(DEBUG_FLAGS) 210125494SruSTRIP?= -s 211125494Sru.endif 212125494Sru 21334678SbdeCOMPRESS_CMD?= gzip -cn 21423546SwoschCOMPRESS_EXT?= .gz 21594982Sru 216292940Sgjb# Set XZ_THREADS to 1 to disable multi-threading. 217292940SgjbXZ_THREADS?= 0 218292940Sgjb 219292940Sgjb.if !empty(XZ_THREADS) 220292940SgjbXZ_CMD?= xz -T ${XZ_THREADS} 221292940Sgjb.else 222292940SgjbXZ_CMD?= xz 223292940Sgjb.endif 224292940Sgjb 225164411Sru.if !defined(_WITHOUT_SRCCONF) 226156813Sru# 227156813Sru# Define MK_* variables (which are either "yes" or "no") for users 228156813Sru# to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the 229156813Sru# make(1) environment. 230156813Sru# These should be tested with `== "no"' or `!= "no"' in makefiles. 231156813Sru# The NO_* variables should only be set by makefiles. 232156813Sru# 233156813Sru 234156813Sru# 235156813Sru# Supported NO_* options (if defined, MK_* will be forced to "no", 236156813Sru# regardless of user's setting). 237156813Sru# 238156813Sru.for var in \ 239228158Sfjoe CTF \ 240251512Semaste DEBUG_FILES \ 241172832Sru INSTALLLIB \ 242156869Sru MAN \ 243156869Sru PROFILE 244156813Sru.if defined(NO_${var}) 245228120Sfjoe.if defined(WITH_${var}) 246228120Sfjoe.undef WITH_${var} 247228120Sfjoe.endif 248156813SruWITHOUT_${var}= 249156813Sru.endif 250156813Sru.endfor 251156813Sru 252156813Sru# 253156813Sru# Older-style variables that enabled behaviour when set. 254156813Sru# 255156813Sru.if defined(YES_HESIOD) 256156813SruWITH_HESIOD= 257156813Sru.endif 258156813Sru 259220359Simp__DEFAULT_YES_OPTIONS = \ 260183242Ssam ACCT \ 261156813Sru ACPI \ 262183242Ssam AMD \ 263183242Ssam APM \ 264253396Sandrew ARM_EABI \ 265162210Simp ASSERT_DEBUG \ 266183242Ssam AT \ 267156813Sru ATM \ 268156813Sru AUDIT \ 269156813Sru AUTHPF \ 270278558Sngie AUTOFS \ 271278557Sngie BHYVE \ 272222090Simp BINUTILS \ 273156813Sru BLUETOOTH \ 274250699Ssjg BMAKE \ 275156813Sru BOOT \ 276279505Sngie BOOTPARAMD \ 277279505Sngie BOOTPD \ 278179815Sdougb BSD_CPIO \ 279278713Sngie BSDINSTALL \ 280183242Ssam BSNMP \ 281166255Sdelphij BZIP2 \ 282156813Sru CALENDAR \ 283229319Srwatson CAPSICUM \ 284278717Sngie CCD \ 285163861Sjb CDDL \ 286156813Sru CPP \ 287250659Sbrooks CROSS_COMPILER \ 288156813Sru CRYPT \ 289183242Ssam CTM \ 290156813Sru CXX \ 291322094Smarius DIALOG \ 292156813Sru DICT \ 293156813Sru DYNAMICROOT \ 294235654Smarcel ED_CRYPTO \ 295278554Sngie EE \ 296156813Sru EXAMPLES \ 297279506Sngie FILE \ 298279505Sngie FINGER \ 299183242Ssam FLOPPY \ 300262650Sbrooks FMTREE \ 301250658Sbrooks FORMAT_EXTENSIONS \ 302156813Sru FORTH \ 303156813Sru FP_LIBC \ 304183242Ssam FREEBSD_UPDATE \ 305279505Sngie FTP \ 306156813Sru GAMES \ 307156813Sru GCOV \ 308156813Sru GDB \ 309156813Sru GNU \ 310156813Sru GPIB \ 311220359Simp GPIO \ 312266251Sian GPL_DTC \ 313156813Sru GROFF \ 314278556Sngie HAST \ 315156813Sru HTML \ 316254273Speter ICONV \ 317221266Sbz INET \ 318156813Sru INET6 \ 319279505Sngie INETD \ 320156813Sru INFO \ 321172832Sru INSTALLLIB \ 322156813Sru IPFILTER \ 323183242Ssam IPFW \ 324156813Sru IPX \ 325278555Sngie ISCSI \ 326183242Ssam JAIL \ 327240404Sobrien KDUMP \ 328156813Sru KERBEROS \ 329222185Simp KERNEL_SYMBOLS \ 330170644Ssepotvin KVM \ 331246827Sdes LDNS \ 332255850Sdes LDNS_UTILS \ 333183242Ssam LEGACY_CONSOLE \ 334157115Sru LIB32 \ 335156813Sru LIBPTHREAD \ 336156813Sru LIBTHR \ 337156813Sru LOCALES \ 338183242Ssam LOCATE \ 339156813Sru LPR \ 340235655Smarcel LS_COLORS \ 341183242Ssam MAIL \ 342156813Sru MAILWRAPPER \ 343183242Ssam MAKE \ 344156813Sru MAN \ 345262643Sbrooks NCURSESW \ 346183242Ssam NDIS \ 347156813Sru NETCAT \ 348183242Ssam NETGRAPH \ 349156813Sru NIS \ 350156813Sru NLS \ 351156813Sru NLS_CATALOGS \ 352257460Sbrooks NMTREE \ 353158115Sume NS_CACHING \ 354183242Ssam NTP \ 355156813Sru OPENSSH \ 356156813Sru OPENSSL \ 357156813Sru PAM \ 358245606Seadler PC_SYSINSTALL \ 359156813Sru PF \ 360238010Sglebius PKGBOOTSTRAP \ 361183242Ssam PMC \ 362183242Ssam PORTSNAP \ 363183242Ssam PPP \ 364228196Sfjoe PROFILE \ 365183242Ssam QUOTAS \ 366278569Sngie RADIUS_SUPPORT \ 367279505Sngie RBOOTD \ 368156813Sru RCMDS \ 369256198Sgjb RCS \ 370156813Sru RESCUE \ 371183242Ssam ROUTED \ 372156813Sru SENDMAIL \ 373156813Sru SETUID_LOGIN \ 374156813Sru SHAREDOCS \ 375244527Semaste SOURCELESS \ 376244527Semaste SOURCELESS_HOST \ 377244527Semaste SOURCELESS_UCODE \ 378169724Skan SSP \ 379251886Speter SVNLITE \ 380169524Sdeischen SYMVER \ 381156813Sru SYSCONS \ 382278710Sngie TALK \ 383156813Sru TCSH \ 384279505Sngie TCP_WRAPPERS \ 385183242Ssam TELNET \ 386183242Ssam TEXTPROC \ 387279505Sngie TFTP \ 388279505Sngie TIMED \ 389156813Sru TOOLCHAIN \ 390255597Sdes UNBOUND \ 391156813Sru USB \ 392223209Sed UTMPX \ 393268399Semaste VT \ 394183242Ssam WIRELESS \ 395168409Spjd WPA_SUPPLICANT_EAPOL \ 396175617Sru ZFS \ 397175617Sru ZONEINFO 398220359Simp 399220359Simp__DEFAULT_NO_OPTIONS = \ 400244527Semaste BSD_GREP \ 401231057Sdim CLANG_EXTRAS \ 402228158Sfjoe CTF \ 403251512Semaste DEBUG_FILES \ 404220359Simp HESIOD \ 405237612Sobrien INSTALL_AS_USER \ 406255722Semaste LLDB \ 407235537Sgber NAND \ 408234782Skib OFED \ 409254654Sae PKGTOOLS \ 410319243Sngie RPCBIND_WARMSTART_SUPPORT \ 411251886Speter SHARED_TOOLCHAIN \ 412253546Sglebius SVN \ 413260013Sjmmv TESTS \ 414322100Sngie USB_GADGET_EXAMPLES \ 415322100Sngie ZONEINFO_LEAPSECONDS_SUPPORT \ 416322100Sngie ZONEINFO_OLD_TIMEZONES_SUPPORT \ 417220359Simp 418322100Sngie 419220359Simp# 420220359Simp# Default behaviour of some options depends on the architecture. Unfortunately 421220359Simp# this means that we have to test TARGET_ARCH (the buildworld case) as well 422220359Simp# as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not 423220359Simp# used at all in bsd.*.mk, but we have to make an exception here if we want 424221726Sru# to allow defaults for some things like clang and fdt to vary by target 425220359Simp# architecture. 426220359Simp# 427220359Simp.if defined(TARGET_ARCH) 428220359Simp__T=${TARGET_ARCH} 429220359Simp.else 430220359Simp__T=${MACHINE_ARCH} 431220359Simp.endif 432255321Stheraven.if defined(TARGET) 433255321Stheraven__TT=${TARGET} 434255321Stheraven.else 435255322Stheraven__TT=${MACHINE} 436255321Stheraven.endif 437246354Sandrew# Clang is only for x86, powerpc and little-endian arm right now, by default. 438235133Sdim.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} 439246259Sdim__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL 440246354Sandrew.elif ${__T} == "arm" || ${__T} == "armv6" 441246354Sandrew__DEFAULT_YES_OPTIONS+=CLANG 442246354Sandrew# GCC is unable to build the full clang on arm, disable it by default. 443246354Sandrew__DEFAULT_NO_OPTIONS+=CLANG_FULL 444220359Simp.else 445246259Sdim__DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL 446220359Simp.endif 447248856Sandrew# Clang the default system compiler only on little-endian arm and x86. 448248856Sandrew.if ${__T} == "amd64" || ${__T} == "arm" || ${__T} == "armv6" || \ 449248856Sandrew ${__T} == "i386" 450242624Sbrooks__DEFAULT_YES_OPTIONS+=CLANG_IS_CC 451255321Stheraven# The pc98 bootloader requires gcc to build and so we must leave gcc enabled 452255321Stheraven# for pc98 for now. 453255321Stheraven.if ${__TT} == "pc98" 454255321Stheraven__DEFAULT_NO_OPTIONS+=GNUCXX 455255321Stheraven__DEFAULT_YES_OPTIONS+=GCC 456242624Sbrooks.else 457255321Stheraven__DEFAULT_NO_OPTIONS+=GCC GNUCXX 458255321Stheraven.endif 459255321Stheraven.else 460255321Stheraven# If clang is not cc, then build gcc by default 461242624Sbrooks__DEFAULT_NO_OPTIONS+=CLANG_IS_CC 462255321Stheraven__DEFAULT_YES_OPTIONS+=GCC 463255321Stheraven# And if g++ is c++, build the rest of the GNU C++ stack 464255321Stheraven.if defined(WITHOUT_CXX) 465255321Stheraven__DEFAULT_NO_OPTIONS+=GNUCXX 466255321Stheraven.else 467255321Stheraven__DEFAULT_YES_OPTIONS+=GNUCXX 468242624Sbrooks.endif 469255321Stheraven.endif 470319390Sngie.if ${__T} == "amd64" || ${__T} == "i386" || \ 471319390Sngie ${__T} == "powerpc64" || ${__T} == "sparc64" 472319390Sngie__DEFAULT_YES_OPTIONS+=CXGBETOOL 473319390Sngie.else 474319390Sngie__DEFAULT_NO_OPTIONS+=CXGBETOOL 475319390Sngie.endif 476227775Snwhitehorn# FDT is needed only for arm, mips and powerpc 477227775Snwhitehorn.if ${__T:Marm*} || ${__T:Mpowerpc*} || ${__T:Mmips*} 478220359Simp__DEFAULT_YES_OPTIONS+=FDT 479220359Simp.else 480220359Simp__DEFAULT_NO_OPTIONS+=FDT 481220359Simp.endif 482272322Sdelphij# HyperV is only available for x86 and amd64. 483272322Sdelphij.if ${__T} == "amd64" || ${__T} == "i386" 484272322Sdelphij__DEFAULT_YES_OPTIONS+=HYPERV 485272322Sdelphij.else 486272322Sdelphij__DEFAULT_NO_OPTIONS+=HYPERV 487272322Sdelphij.endif 488220359Simp.undef __T 489220359Simp 490220359Simp# 491220359Simp# MK_* options which default to "yes". 492220359Simp# 493220359Simp.for var in ${__DEFAULT_YES_OPTIONS} 494300243Sbdrewery.if !defined(MK_${var}) 495156813Sru.if defined(WITH_${var}) && defined(WITHOUT_${var}) 496156813Sru.error WITH_${var} and WITHOUT_${var} can't both be set. 497156813Sru.endif 498156813Sru.if defined(WITHOUT_${var}) 499156813SruMK_${var}:= no 500156813Sru.else 501156813SruMK_${var}:= yes 502156813Sru.endif 503300243Sbdrewery.endif # !defined(MK_${var}) 504156813Sru.endfor 505220359Simp.undef __DEFAULT_YES_OPTIONS 506156813Sru 507156813Sru# 508156813Sru# MK_* options which default to "no". 509156813Sru# 510220359Simp.for var in ${__DEFAULT_NO_OPTIONS} 511300243Sbdrewery.if !defined(MK_${var}) 512156813Sru.if defined(WITH_${var}) && defined(WITHOUT_${var}) 513156813Sru.error WITH_${var} and WITHOUT_${var} can't both be set. 514156813Sru.endif 515156813Sru.if defined(WITH_${var}) 516156813SruMK_${var}:= yes 517156813Sru.else 518156813SruMK_${var}:= no 519156813Sru.endif 520300243Sbdrewery.endif # !defined(MK_${var}) 521156813Sru.endfor 522220359Simp.undef __DEFAULT_NO_OPTIONS 523156813Sru 524156813Sru# 525156813Sru# Force some options off if their dependencies are off. 526172571Sru# Order is somewhat important. 527156813Sru# 528172571Sru.if ${MK_LIBPTHREAD} == "no" 529172571SruMK_LIBTHR:= no 530172571Sru.endif 531172571Sru 532246827Sdes.if ${MK_LDNS} == "no" 533246827SdesMK_LDNS_UTILS:= no 534255597SdesMK_UNBOUND:= no 535246827Sdes.endif 536246827Sdes 537230972Srmh.if ${MK_SOURCELESS} == "no" 538230972SrmhMK_SOURCELESS_HOST:= no 539230972SrmhMK_SOURCELESS_UCODE:= no 540230972Srmh.endif 541230972Srmh 542168409Spjd.if ${MK_CDDL} == "no" 543168409SpjdMK_ZFS:= no 544228158SfjoeMK_CTF:= no 545168409Spjd.endif 546168409Spjd 547156813Sru.if ${MK_CRYPT} == "no" 548156813SruMK_OPENSSL:= no 549156813SruMK_OPENSSH:= no 550156813SruMK_KERBEROS:= no 551156813Sru.endif 552156813Sru 553220401Suqs.if ${MK_CXX} == "no" 554220401SuqsMK_CLANG:= no 555220401SuqsMK_GROFF:= no 556220401Suqs.endif 557220401Suqs 558322094Smarius.if ${MK_DIALOG} == "no" 559322094SmariusMK_BSDINSTALL:= no 560322094Smarius.endif 561322094Smarius 562183242Ssam.if ${MK_MAIL} == "no" 563183242SsamMK_MAILWRAPPER:= no 564183242SsamMK_SENDMAIL:= no 565183242Ssam.endif 566183242Ssam 567202440Santoine.if ${MK_NETGRAPH} == "no" 568202440SantoineMK_ATM:= no 569202440SantoineMK_BLUETOOTH:= no 570202440Santoine.endif 571202440Santoine 572324140Sngie.if ${MK_NLS} == "no" 573324140SngieMK_NLS_CATALOGS:= no 574324140Sngie.endif 575324140Sngie 576156813Sru.if ${MK_OPENSSL} == "no" 577156813SruMK_OPENSSH:= no 578156813SruMK_KERBEROS:= no 579156813Sru.endif 580156813Sru 581156813Sru.if ${MK_PF} == "no" 582156813SruMK_AUTHPF:= no 583156813Sru.endif 584156813Sru 585183242Ssam.if ${MK_TEXTPROC} == "no" 586183242SsamMK_GROFF:= no 587183242Ssam.endif 588183242Ssam 589156813Sru.if ${MK_TOOLCHAIN} == "no" 590222090SimpMK_BINUTILS:= no 591208964SrdivackyMK_CLANG:= no 592222090SimpMK_GCC:= no 593156813SruMK_GDB:= no 594156813Sru.endif 595156813Sru 596322100Sngie.if ${MK_ZONEINFO} == "no" 597322100SngieMK_ZONEINFO_LEAPSECONDS_SUPPORT:= no 598322100SngieMK_ZONEINFO_OLD_TIMEZONES_SUPPORT:= no 599322100Sngie.endif 600322100Sngie 601232322Sdim.if ${MK_CLANG} == "no" 602246131SdimMK_CLANG_EXTRAS:= no 603246259SdimMK_CLANG_FULL:= no 604232322Sdim.endif 605232322Sdim 606255722Semaste.if ${MK_CLANG_IS_CC} == "no" 607255722SemasteMK_LLDB:= no 608255722Semaste.endif 609255722Semaste 610260013Sjmmv.if defined(NO_TESTS) 611260013Sjmmv# This should be handled above along the handling of all other NO_* options. 612260013Sjmmv# However, the above is broken when WITH_*=yes are passed to make(1) as 613260013Sjmmv# command line arguments. See PR bin/183762. 614156813Sru# 615260013Sjmmv# Because the TESTS option is new and it will default to yes, it's likely 616260013Sjmmv# that people will pass WITHOUT_TESTS=yes to make(1) directly and get a broken 617260013Sjmmv# build. So, just in case, it's better to explicitly handle this case here. 618260013Sjmmv# 619260013Sjmmv# TODO(jmmv): Either fix make to allow us putting this override where it 620260013Sjmmv# belongs above or fix this file to cope with the make bug. 621260013SjmmvMK_TESTS:= no 622260013Sjmmv.endif 623260013Sjmmv 624260013Sjmmv# 625156813Sru# Set defaults for the MK_*_SUPPORT variables. 626156813Sru# 627156813Sru 628156813Sru# 629312273Sngie# MK_* options whose default value depends on another option. 630312273Sngie# 631312273Sngie.for vv in \ 632312273Sngie GSSAPI/KERBEROS \ 633312273Sngie MAN_UTILS/MAN 634312273Sngie.if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H}) 635312273Sngie.error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set. 636312273Sngie.endif 637312273Sngie.if defined(WITH_${vv:H}) 638312273SngieMK_${vv:H}:= yes 639312273Sngie.elif defined(WITHOUT_${vv:H}) 640312273SngieMK_${vv:H}:= no 641312273Sngie.else 642312273SngieMK_${vv:H}:= ${MK_${vv:T}} 643312273Sngie.endif 644312273Sngie.endfor 645312273Sngie 646312273Sngie# 647156813Sru# MK_*_SUPPORT options which default to "yes" unless their corresponding 648156813Sru# MK_* variable is set to "no". 649156813Sru# 650156813Sru.for var in \ 651166255Sdelphij BZIP2 \ 652156813Sru GNU \ 653221266Sbz INET \ 654156813Sru INET6 \ 655156813Sru IPX \ 656156813Sru KERBEROS \ 657170644Ssepotvin KVM \ 658183242Ssam NETGRAPH \ 659183242Ssam PAM \ 660183242Ssam WIRELESS 661156813Sru.if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT) 662156813Sru.error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set. 663156813Sru.endif 664156813Sru.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" 665156813SruMK_${var}_SUPPORT:= no 666156813Sru.else 667156813SruMK_${var}_SUPPORT:= yes 668156813Sru.endif 669156813Sru.endfor 670174548Sru 671174548Sru# 672240966Sbrooks# MK_* options that default to "yes" if the compiler is a C++11 compiler. 673240966Sbrooks# 674240966Sbrooks.include <bsd.compiler.mk> 675240966Sbrooks.for var in \ 676240966Sbrooks LIBCPLUSPLUS 677240966Sbrooks.if defined(WITH_${var}) && defined(WITHOUT_${var}) 678240966Sbrooks.error WITH_${var} and WITHOUT_${var} can't both be set. 679240966Sbrooks.endif 680240966Sbrooks.if ${COMPILER_FEATURES:Mc++11} 681240966Sbrooks.if defined(WITHOUT_${var}) 682240966SbrooksMK_${var}:= no 683240966Sbrooks.else 684240966SbrooksMK_${var}:= yes 685240966Sbrooks.endif 686240966Sbrooks.else 687240966Sbrooks.if defined(WITH_${var}) 688240966SbrooksMK_${var}:= yes 689240966Sbrooks.else 690240966SbrooksMK_${var}:= no 691240966Sbrooks.endif 692240966Sbrooks.endif 693240966Sbrooks.endfor 694240966Sbrooks 695228158Sfjoe.if ${MK_CTF} != "no" 696228158SfjoeCTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} 697243393Ssjg.elif defined(.PARSEDIR) || (defined(MAKE_VERSION) && ${MAKE_VERSION} >= 5201111300) 698228158SfjoeCTFCONVERT_CMD= 699228158Sfjoe.else 700228158SfjoeCTFCONVERT_CMD= @: 701228158Sfjoe.endif 702228158Sfjoe 703237612Sobrien.if ${MK_INSTALL_AS_USER} != "no" 704243392Ssjg_uid!= id -u 705237612Sobrien.if ${_uid} != 0 706243392Ssjg.if !defined(USER) 707243392SsjgUSER!= id -un 708243392Ssjg.endif 709237612Sobrien_gid!= id -gn 710284002Simp.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE 711243392Ssjg$xOWN= ${USER} 712237612Sobrien$xGRP= ${_gid} 713237612Sobrien.endfor 714237612Sobrien.endif 715237612Sobrien.endif 716237612Sobrien 717164411Sru.endif # !_WITHOUT_SRCCONF 718156813Sru 719259962Sjmmv# Pointer to the top directory into which tests are installed. Should not be 720259962Sjmmv# overriden by Makefiles, but the user may choose to set this in src.conf(5). 721259962SjmmvTESTSBASE?= /usr/tests 722259962Sjmmv 723144893Sharti.endif # !target(__<bsd.own.mk>__) 724