150476Speter# $FreeBSD: releng/10.3/share/mk/bsd.own.mk 294693 2016-01-24 22:28:18Z des $ 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 \ 291156813Sru DICT \ 292156813Sru DYNAMICROOT \ 293235654Smarcel ED_CRYPTO \ 294278554Sngie EE \ 295156813Sru EXAMPLES \ 296279506Sngie FILE \ 297279505Sngie FINGER \ 298183242Ssam FLOPPY \ 299262650Sbrooks FMTREE \ 300250658Sbrooks FORMAT_EXTENSIONS \ 301156813Sru FORTH \ 302156813Sru FP_LIBC \ 303183242Ssam FREEBSD_UPDATE \ 304279505Sngie FTP \ 305156813Sru GAMES \ 306156813Sru GCOV \ 307156813Sru GDB \ 308156813Sru GNU \ 309156813Sru GPIB \ 310220359Simp GPIO \ 311266251Sian GPL_DTC \ 312156813Sru GROFF \ 313278556Sngie HAST \ 314156813Sru HTML \ 315254273Speter ICONV \ 316221266Sbz INET \ 317156813Sru INET6 \ 318279505Sngie INETD \ 319156813Sru INFO \ 320172832Sru INSTALLLIB \ 321156813Sru IPFILTER \ 322183242Ssam IPFW \ 323156813Sru IPX \ 324278555Sngie ISCSI \ 325183242Ssam JAIL \ 326240404Sobrien KDUMP \ 327156813Sru KERBEROS \ 328222185Simp KERNEL_SYMBOLS \ 329170644Ssepotvin KVM \ 330246827Sdes LDNS \ 331255850Sdes LDNS_UTILS \ 332183242Ssam LEGACY_CONSOLE \ 333157115Sru LIB32 \ 334156813Sru LIBPTHREAD \ 335156813Sru LIBTHR \ 336156813Sru LOCALES \ 337183242Ssam LOCATE \ 338156813Sru LPR \ 339235655Smarcel LS_COLORS \ 340183242Ssam MAIL \ 341156813Sru MAILWRAPPER \ 342183242Ssam MAKE \ 343156813Sru MAN \ 344262643Sbrooks NCURSESW \ 345183242Ssam NDIS \ 346156813Sru NETCAT \ 347183242Ssam NETGRAPH \ 348156813Sru NIS \ 349156813Sru NLS \ 350156813Sru NLS_CATALOGS \ 351257460Sbrooks NMTREE \ 352158115Sume NS_CACHING \ 353183242Ssam NTP \ 354156813Sru OPENSSH \ 355156813Sru OPENSSL \ 356156813Sru PAM \ 357245606Seadler PC_SYSINSTALL \ 358156813Sru PF \ 359238010Sglebius PKGBOOTSTRAP \ 360183242Ssam PMC \ 361183242Ssam PORTSNAP \ 362183242Ssam PPP \ 363228196Sfjoe PROFILE \ 364183242Ssam QUOTAS \ 365278569Sngie RADIUS_SUPPORT \ 366279505Sngie RBOOTD \ 367156813Sru RCMDS \ 368256198Sgjb RCS \ 369156813Sru RESCUE \ 370183242Ssam ROUTED \ 371156813Sru SENDMAIL \ 372156813Sru SETUID_LOGIN \ 373156813Sru SHAREDOCS \ 374244527Semaste SOURCELESS \ 375244527Semaste SOURCELESS_HOST \ 376244527Semaste SOURCELESS_UCODE \ 377169724Skan SSP \ 378251886Speter SVNLITE \ 379169524Sdeischen SYMVER \ 380156813Sru SYSCONS \ 381278710Sngie TALK \ 382156813Sru TCSH \ 383279505Sngie TCP_WRAPPERS \ 384183242Ssam TELNET \ 385183242Ssam TEXTPROC \ 386279505Sngie TFTP \ 387279505Sngie TIMED \ 388156813Sru TOOLCHAIN \ 389255597Sdes UNBOUND \ 390156813Sru USB \ 391223209Sed UTMPX \ 392268399Semaste VT \ 393183242Ssam WIRELESS \ 394168409Spjd WPA_SUPPLICANT_EAPOL \ 395175617Sru ZFS \ 396175617Sru ZONEINFO 397220359Simp 398220359Simp__DEFAULT_NO_OPTIONS = \ 399244527Semaste BSD_GREP \ 400231057Sdim CLANG_EXTRAS \ 401228158Sfjoe CTF \ 402251512Semaste DEBUG_FILES \ 403220359Simp HESIOD \ 404237612Sobrien INSTALL_AS_USER \ 405255722Semaste LLDB \ 406235537Sgber NAND \ 407234782Skib OFED \ 408254654Sae PKGTOOLS \ 409251886Speter SHARED_TOOLCHAIN \ 410253546Sglebius SVN \ 411260013Sjmmv TESTS \ 412253546Sglebius USB_GADGET_EXAMPLES 413220359Simp 414220359Simp# 415220359Simp# Default behaviour of some options depends on the architecture. Unfortunately 416220359Simp# this means that we have to test TARGET_ARCH (the buildworld case) as well 417220359Simp# as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not 418220359Simp# used at all in bsd.*.mk, but we have to make an exception here if we want 419221726Sru# to allow defaults for some things like clang and fdt to vary by target 420220359Simp# architecture. 421220359Simp# 422220359Simp.if defined(TARGET_ARCH) 423220359Simp__T=${TARGET_ARCH} 424220359Simp.else 425220359Simp__T=${MACHINE_ARCH} 426220359Simp.endif 427255321Stheraven.if defined(TARGET) 428255321Stheraven__TT=${TARGET} 429255321Stheraven.else 430255322Stheraven__TT=${MACHINE} 431255321Stheraven.endif 432246354Sandrew# Clang is only for x86, powerpc and little-endian arm right now, by default. 433235133Sdim.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} 434246259Sdim__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL 435246354Sandrew.elif ${__T} == "arm" || ${__T} == "armv6" 436246354Sandrew__DEFAULT_YES_OPTIONS+=CLANG 437246354Sandrew# GCC is unable to build the full clang on arm, disable it by default. 438246354Sandrew__DEFAULT_NO_OPTIONS+=CLANG_FULL 439220359Simp.else 440246259Sdim__DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL 441220359Simp.endif 442248856Sandrew# Clang the default system compiler only on little-endian arm and x86. 443248856Sandrew.if ${__T} == "amd64" || ${__T} == "arm" || ${__T} == "armv6" || \ 444248856Sandrew ${__T} == "i386" 445242624Sbrooks__DEFAULT_YES_OPTIONS+=CLANG_IS_CC 446255321Stheraven# The pc98 bootloader requires gcc to build and so we must leave gcc enabled 447255321Stheraven# for pc98 for now. 448255321Stheraven.if ${__TT} == "pc98" 449255321Stheraven__DEFAULT_NO_OPTIONS+=GNUCXX 450255321Stheraven__DEFAULT_YES_OPTIONS+=GCC 451242624Sbrooks.else 452255321Stheraven__DEFAULT_NO_OPTIONS+=GCC GNUCXX 453255321Stheraven.endif 454255321Stheraven.else 455255321Stheraven# If clang is not cc, then build gcc by default 456242624Sbrooks__DEFAULT_NO_OPTIONS+=CLANG_IS_CC 457255321Stheraven__DEFAULT_YES_OPTIONS+=GCC 458255321Stheraven# And if g++ is c++, build the rest of the GNU C++ stack 459255321Stheraven.if defined(WITHOUT_CXX) 460255321Stheraven__DEFAULT_NO_OPTIONS+=GNUCXX 461255321Stheraven.else 462255321Stheraven__DEFAULT_YES_OPTIONS+=GNUCXX 463242624Sbrooks.endif 464255321Stheraven.endif 465227775Snwhitehorn# FDT is needed only for arm, mips and powerpc 466227775Snwhitehorn.if ${__T:Marm*} || ${__T:Mpowerpc*} || ${__T:Mmips*} 467220359Simp__DEFAULT_YES_OPTIONS+=FDT 468220359Simp.else 469220359Simp__DEFAULT_NO_OPTIONS+=FDT 470220359Simp.endif 471272322Sdelphij# HyperV is only available for x86 and amd64. 472272322Sdelphij.if ${__T} == "amd64" || ${__T} == "i386" 473272322Sdelphij__DEFAULT_YES_OPTIONS+=HYPERV 474272322Sdelphij.else 475272322Sdelphij__DEFAULT_NO_OPTIONS+=HYPERV 476272322Sdelphij.endif 477220359Simp.undef __T 478220359Simp 479220359Simp# 480220359Simp# MK_* options which default to "yes". 481220359Simp# 482220359Simp.for var in ${__DEFAULT_YES_OPTIONS} 483156813Sru.if defined(WITH_${var}) && defined(WITHOUT_${var}) 484156813Sru.error WITH_${var} and WITHOUT_${var} can't both be set. 485156813Sru.endif 486156813Sru.if defined(MK_${var}) 487156813Sru.error MK_${var} can't be set by a user. 488156813Sru.endif 489156813Sru.if defined(WITHOUT_${var}) 490156813SruMK_${var}:= no 491156813Sru.else 492156813SruMK_${var}:= yes 493156813Sru.endif 494156813Sru.endfor 495220359Simp.undef __DEFAULT_YES_OPTIONS 496156813Sru 497156813Sru# 498156813Sru# MK_* options which default to "no". 499156813Sru# 500220359Simp.for var in ${__DEFAULT_NO_OPTIONS} 501156813Sru.if defined(WITH_${var}) && defined(WITHOUT_${var}) 502156813Sru.error WITH_${var} and WITHOUT_${var} can't both be set. 503156813Sru.endif 504156813Sru.if defined(MK_${var}) 505156813Sru.error MK_${var} can't be set by a user. 506156813Sru.endif 507156813Sru.if defined(WITH_${var}) 508156813SruMK_${var}:= yes 509156813Sru.else 510156813SruMK_${var}:= no 511156813Sru.endif 512156813Sru.endfor 513220359Simp.undef __DEFAULT_NO_OPTIONS 514156813Sru 515156813Sru# 516156813Sru# Force some options off if their dependencies are off. 517172571Sru# Order is somewhat important. 518156813Sru# 519172571Sru.if ${MK_LIBPTHREAD} == "no" 520172571SruMK_LIBTHR:= no 521172571Sru.endif 522172571Sru 523246827Sdes.if ${MK_LDNS} == "no" 524246827SdesMK_LDNS_UTILS:= no 525255597SdesMK_UNBOUND:= no 526246827Sdes.endif 527246827Sdes 528230972Srmh.if ${MK_SOURCELESS} == "no" 529230972SrmhMK_SOURCELESS_HOST:= no 530230972SrmhMK_SOURCELESS_UCODE:= no 531230972Srmh.endif 532230972Srmh 533168409Spjd.if ${MK_CDDL} == "no" 534168409SpjdMK_ZFS:= no 535228158SfjoeMK_CTF:= no 536168409Spjd.endif 537168409Spjd 538156813Sru.if ${MK_CRYPT} == "no" 539156813SruMK_OPENSSL:= no 540156813SruMK_OPENSSH:= no 541156813SruMK_KERBEROS:= no 542156813Sru.endif 543156813Sru 544220401Suqs.if ${MK_CXX} == "no" 545220401SuqsMK_CLANG:= no 546220401SuqsMK_GROFF:= no 547220401Suqs.endif 548220401Suqs 549183242Ssam.if ${MK_MAIL} == "no" 550183242SsamMK_MAILWRAPPER:= no 551183242SsamMK_SENDMAIL:= no 552183242Ssam.endif 553183242Ssam 554202440Santoine.if ${MK_NETGRAPH} == "no" 555202440SantoineMK_ATM:= no 556202440SantoineMK_BLUETOOTH:= no 557202440Santoine.endif 558202440Santoine 559156813Sru.if ${MK_OPENSSL} == "no" 560156813SruMK_OPENSSH:= no 561156813SruMK_KERBEROS:= no 562156813Sru.endif 563156813Sru 564156813Sru.if ${MK_PF} == "no" 565156813SruMK_AUTHPF:= no 566156813Sru.endif 567156813Sru 568183242Ssam.if ${MK_TEXTPROC} == "no" 569183242SsamMK_GROFF:= no 570183242Ssam.endif 571183242Ssam 572156813Sru.if ${MK_TOOLCHAIN} == "no" 573222090SimpMK_BINUTILS:= no 574208964SrdivackyMK_CLANG:= no 575222090SimpMK_GCC:= no 576156813SruMK_GDB:= no 577156813Sru.endif 578156813Sru 579232322Sdim.if ${MK_CLANG} == "no" 580246131SdimMK_CLANG_EXTRAS:= no 581246259SdimMK_CLANG_FULL:= no 582232322Sdim.endif 583232322Sdim 584255722Semaste.if ${MK_CLANG_IS_CC} == "no" 585255722SemasteMK_LLDB:= no 586255722Semaste.endif 587255722Semaste 588260013Sjmmv.if defined(NO_TESTS) 589260013Sjmmv# This should be handled above along the handling of all other NO_* options. 590260013Sjmmv# However, the above is broken when WITH_*=yes are passed to make(1) as 591260013Sjmmv# command line arguments. See PR bin/183762. 592156813Sru# 593260013Sjmmv# Because the TESTS option is new and it will default to yes, it's likely 594260013Sjmmv# that people will pass WITHOUT_TESTS=yes to make(1) directly and get a broken 595260013Sjmmv# build. So, just in case, it's better to explicitly handle this case here. 596260013Sjmmv# 597260013Sjmmv# TODO(jmmv): Either fix make to allow us putting this override where it 598260013Sjmmv# belongs above or fix this file to cope with the make bug. 599260013SjmmvMK_TESTS:= no 600260013Sjmmv.endif 601260013Sjmmv 602260013Sjmmv# 603156813Sru# Set defaults for the MK_*_SUPPORT variables. 604156813Sru# 605156813Sru 606156813Sru# 607156813Sru# MK_*_SUPPORT options which default to "yes" unless their corresponding 608156813Sru# MK_* variable is set to "no". 609156813Sru# 610156813Sru.for var in \ 611166255Sdelphij BZIP2 \ 612156813Sru GNU \ 613221266Sbz INET \ 614156813Sru INET6 \ 615156813Sru IPX \ 616156813Sru KERBEROS \ 617170644Ssepotvin KVM \ 618183242Ssam NETGRAPH \ 619183242Ssam PAM \ 620183242Ssam WIRELESS 621156813Sru.if defined(WITH_${var}_SUPPORT) && defined(WITHOUT_${var}_SUPPORT) 622156813Sru.error WITH_${var}_SUPPORT and WITHOUT_${var}_SUPPORT can't both be set. 623156813Sru.endif 624156813Sru.if defined(MK_${var}_SUPPORT) 625156813Sru.error MK_${var}_SUPPORT can't be set by a user. 626156813Sru.endif 627156813Sru.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" 628156813SruMK_${var}_SUPPORT:= no 629156813Sru.else 630156813SruMK_${var}_SUPPORT:= yes 631156813Sru.endif 632156813Sru.endfor 633174548Sru 634174548Sru# 635174548Sru# MK_* options whose default value depends on another option. 636174548Sru# 637174548Sru.for vv in \ 638208320Sjkim GSSAPI/KERBEROS \ 639208320Sjkim MAN_UTILS/MAN 640174548Sru.if defined(WITH_${vv:H}) && defined(WITHOUT_${vv:H}) 641174548Sru.error WITH_${vv:H} and WITHOUT_${vv:H} can't both be set. 642174548Sru.endif 643174548Sru.if defined(MK_${vv:H}) 644174548Sru.error MK_${vv:H} can't be set by a user. 645174548Sru.endif 646174548Sru.if defined(WITH_${vv:H}) 647174548SruMK_${vv:H}:= yes 648174548Sru.elif defined(WITHOUT_${vv:H}) 649174548SruMK_${vv:H}:= no 650174548Sru.else 651174548SruMK_${vv:H}:= ${MK_${vv:T}} 652174548Sru.endif 653174548Sru.endfor 654174548Sru 655240966Sbrooks# 656240966Sbrooks# MK_* options that default to "yes" if the compiler is a C++11 compiler. 657240966Sbrooks# 658240966Sbrooks.include <bsd.compiler.mk> 659240966Sbrooks.for var in \ 660240966Sbrooks LIBCPLUSPLUS 661240966Sbrooks.if defined(WITH_${var}) && defined(WITHOUT_${var}) 662240966Sbrooks.error WITH_${var} and WITHOUT_${var} can't both be set. 663240966Sbrooks.endif 664240966Sbrooks.if defined(MK_${var}) 665240966Sbrooks.error MK_${var} can't be set by a user. 666240966Sbrooks.endif 667240966Sbrooks.if ${COMPILER_FEATURES:Mc++11} 668240966Sbrooks.if defined(WITHOUT_${var}) 669240966SbrooksMK_${var}:= no 670240966Sbrooks.else 671240966SbrooksMK_${var}:= yes 672240966Sbrooks.endif 673240966Sbrooks.else 674240966Sbrooks.if defined(WITH_${var}) 675240966SbrooksMK_${var}:= yes 676240966Sbrooks.else 677240966SbrooksMK_${var}:= no 678240966Sbrooks.endif 679240966Sbrooks.endif 680240966Sbrooks.endfor 681240966Sbrooks 682228158Sfjoe.if ${MK_CTF} != "no" 683228158SfjoeCTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} 684243393Ssjg.elif defined(.PARSEDIR) || (defined(MAKE_VERSION) && ${MAKE_VERSION} >= 5201111300) 685228158SfjoeCTFCONVERT_CMD= 686228158Sfjoe.else 687228158SfjoeCTFCONVERT_CMD= @: 688228158Sfjoe.endif 689228158Sfjoe 690237612Sobrien.if ${MK_INSTALL_AS_USER} != "no" 691243392Ssjg_uid!= id -u 692237612Sobrien.if ${_uid} != 0 693243392Ssjg.if !defined(USER) 694243392SsjgUSER!= id -un 695243392Ssjg.endif 696237612Sobrien_gid!= id -gn 697284002Simp.for x in BIN CONF DOC DTB INFO KMOD LIB MAN NLS SHARE 698243392Ssjg$xOWN= ${USER} 699237612Sobrien$xGRP= ${_gid} 700237612Sobrien.endfor 701237612Sobrien.endif 702237612Sobrien.endif 703237612Sobrien 704164411Sru.endif # !_WITHOUT_SRCCONF 705156813Sru 706259962Sjmmv# Pointer to the top directory into which tests are installed. Should not be 707259962Sjmmv# overriden by Makefiles, but the user may choose to set this in src.conf(5). 708259962SjmmvTESTSBASE?= /usr/tests 709259962Sjmmv 710144893Sharti.endif # !target(__<bsd.own.mk>__) 711