[BACK]Return to bsd.own.mk CVS log [TXT][DIR] Up to [local] / src / share / mk

Annotation of src/share/mk/bsd.own.mk, Revision 1.213

1.213   ! jca         1: #      $OpenBSD: bsd.own.mk,v 1.212 2021/11/23 10:30:08 robert Exp $
1.7       deraadt     2: #      $NetBSD: bsd.own.mk,v 1.24 1996/04/13 02:08:09 thorpej Exp $
                      3:
1.15      millert     4: # Host-specific overrides
1.7       deraadt     5: .if defined(MAKECONF) && exists(${MAKECONF})
                      6: .include "${MAKECONF}"
                      7: .elif exists(/etc/mk.conf)
                      8: .include "/etc/mk.conf"
1.26      art         9: .endif
1.1       deraadt    10:
1.51      espie      11: # Set `WARNINGS' to `yes' to add appropriate warnings to each compilation
                     12: WARNINGS?=     no
1.15      millert    13: # Set `SKEY' to `yes' to build with support for S/key authentication.
                     14: SKEY?=         yes
1.19      downsj     15: # Set `YP' to `yes' to build with support for NIS/YP.
1.15      millert    16: YP?=           yes
1.71      espie      17:
1.208     drahn      18: CLANG_ARCH=aarch64 amd64 arm i386 mips64 mips64el powerpc powerpc64 riscv64 sparc64
1.205     visa       19: GCC4_ARCH=alpha hppa sh sparc64
1.173     deraadt    20: GCC3_ARCH=m88k
1.211     gkoehler   21: LLD_ARCH=aarch64 amd64 arm i386 powerpc powerpc64 riscv64
1.213   ! jca        22: LLDB_ARCH=aarch64 amd64
1.198     visa       23:
1.171     deraadt    24: # m88k: ?
1.208     drahn      25: PIE_ARCH=aarch64 alpha amd64 arm hppa i386 mips64 mips64el powerpc powerpc64 riscv64 sh sparc64
                     26: STATICPIE_ARCH=aarch64 alpha amd64 arm hppa i386 mips64 mips64el powerpc powerpc64 riscv64 sh sparc64
1.106     drahn      27:
                     28: .for _arch in ${MACHINE_ARCH}
1.183     kettenis   29: .if !empty(GCC3_ARCH:M${_arch})
                     30: COMPILER_VERSION?=gcc3
                     31: .elif !empty(GCC4_ARCH:M${_arch})
                     32: COMPILER_VERSION?=gcc4
                     33: .elif !empty(CLANG_ARCH:M${_arch})
                     34: COMPILER_VERSION?=clang
                     35: .endif
                     36:
                     37: .if !empty(GCC3_ARCH:M${_arch})
                     38: BUILD_GCC3?=yes
                     39: .else
                     40: BUILD_GCC3?=no
                     41: .endif
1.210     naddy      42: .if !empty(GCC4_ARCH:M${_arch})
1.183     kettenis   43: BUILD_GCC4?=yes
                     44: .else
                     45: BUILD_GCC4?=no
                     46: .endif
1.182     patrick    47: .if !empty(CLANG_ARCH:M${_arch})
1.183     kettenis   48: BUILD_CLANG?=yes
1.141     miod       49: .else
1.183     kettenis   50: BUILD_CLANG?=no
1.190     kettenis   51: .endif
                     52:
                     53: .if !empty(LLD_ARCH:M${_arch})
                     54: LINKER_VERSION?=lld
1.212     robert     55: AR_VERSION?=llvm
1.190     kettenis   56: .else
                     57: LINKER_VERSION?=bfd
1.212     robert     58: AR_VERSION?=binutils
1.213   ! jca        59: .endif
        !            60:
        !            61: .if !empty(LLDB_ARCH:M${_arch})
        !            62: BUILD_LLDB?=yes
        !            63: .else
        !            64: BUILD_LLDB?=no
1.72      mickey     65: .endif
1.121     pascal     66:
1.151     deraadt    67: .if !empty(STATICPIE_ARCH:M${_arch})
1.154     kettenis   68: STATICPIE?=-pie
1.192     visa       69: .endif
                     70:
                     71: # Executables are always PIC on mips64.
                     72: # Do not pass -fno-pie to the compiler because clang does not accept it.
                     73: .if ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
                     74: NOPIE_FLAGS?=
1.151     deraadt    75: .endif
                     76:
1.121     pascal     77: .if !empty(PIE_ARCH:M${_arch})
1.137     miod       78: NOPIE_FLAGS?=-fno-pie
                     79: NOPIE_LDFLAGS?=-nopie
                     80: PIE_DEFAULT?=${DEFAULT_PIE_DEF}
1.121     pascal     81: .else
1.137     miod       82: NOPIE_FLAGS?=
                     83: PIE_DEFAULT?=
1.121     pascal     84: .endif
1.106     drahn      85: .endfor
1.32      niklas     86:
1.1       deraadt    87: # where the system object and source trees are kept; can be configurable
                     88: # by the user in case they want them in ~/foosrc and ~/fooobj, for example
                     89: BSDSRCDIR?=    /usr/src
                     90: BSDOBJDIR?=    /usr/obj
                     91:
                     92: BINGRP?=       bin
1.9       deraadt    93: BINOWN?=       root
1.1       deraadt    94: BINMODE?=      555
                     95: NONBINMODE?=   444
1.28      espie      96: DIRMODE?=      755
1.1       deraadt    97:
1.18      tholo      98: SHAREDIR?=     /usr/share
                     99: SHAREGRP?=     bin
                    100: SHAREOWN?=     root
                    101: SHAREMODE?=    ${NONBINMODE}
1.1       deraadt   102:
1.105     schwarze  103: MANDIR?=       /usr/share/man/man
1.1       deraadt   104: MANGRP?=       bin
1.9       deraadt   105: MANOWN?=       root
1.1       deraadt   106: MANMODE?=      ${NONBINMODE}
                    107:
                    108: LIBDIR?=       /usr/lib
                    109: LIBGRP?=       ${BINGRP}
                    110: LIBOWN?=       ${BINOWN}
                    111: LIBMODE?=      ${NONBINMODE}
                    112:
1.119     haesbaer  113: DOCDIR?=       /usr/share/doc
1.1       deraadt   114: DOCGRP?=       bin
1.9       deraadt   115: DOCOWN?=       root
1.119     haesbaer  116: DOCMODE?=      ${NONBINMODE}
1.1       deraadt   117:
1.93      espie     118: LOCALEDIR?=    /usr/share/locale
                    119: LOCALEGRP?=    wheel
                    120: LOCALEOWN?=    root
                    121: LOCALEMODE?=   ${NONBINMODE}
1.119     haesbaer  122:
                    123: .if !defined(CDIAGFLAGS)
                    124: CDIAGFLAGS=    -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes
1.143     martynas  125: CDIAGFLAGS+=   -Wmissing-prototypes -Wunused -Wsign-compare
1.119     haesbaer  126: CDIAGFLAGS+=   -Wshadow
1.120     sthen     127: .  if ${COMPILER_VERSION} == "gcc4"
                    128: CDIAGFLAGS+=   -Wdeclaration-after-statement
                    129: .  endif
1.119     haesbaer  130: .endif
1.56      espie     131:
1.57      espie     132: # Shared files for system gnu configure, not used yet
                    133: GNUSYSTEM_AUX_DIR?=${BSDSRCDIR}/share/gnu
1.1       deraadt   134:
1.17      millert   135: INSTALL_COPY?= -c
1.13      niklas    136: .ifndef DEBUG
1.17      millert   137: INSTALL_STRIP?=        -s
1.13      niklas    138: .endif
1.12      downsj    139:
1.151     deraadt   140: STATIC?=       -static ${STATICPIE}
1.1       deraadt   141:
                    142: # Define SYS_INCLUDE to indicate whether you want symbolic links to the system
                    143: # source (``symlinks''), or a separate copy (``copies''); (latter useful
                    144: # in environments where it's not possible to keep /sys publicly readable)
                    145: #SYS_INCLUDE=  symlinks
1.58      drahn     146:
1.86      pvalchev  147: # pic relocation flags.
1.196     kettenis  148: .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "powerpc" || \
                    149:     ${MACHINE_ARCH} == "sparc64"
1.100     deraadt   150: PICFLAG?=-fPIC
1.86      pvalchev  151: .else
1.100     deraadt   152: PICFLAG?=-fpic
1.121     pascal    153: .endif
                    154:
1.129     kettenis  155: .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "powerpc" || \
1.176     tedu      156:     ${MACHINE_ARCH} == "sparc64"
1.121     pascal    157: # big PIE
                    158: DEFAULT_PIE_DEF=-DPIE_DEFAULT=2
                    159: .else
                    160: # small pie
                    161: DEFAULT_PIE_DEF=-DPIE_DEFAULT=1
1.14      rahnds    162: .endif
                    163:
                    164: # don't try to generate PROFILED versions of libraries on machines
                    165: # which don't support profiling.
1.87      miod      166: .if 0
1.14      rahnds    167: NOPROFILE=
1.1       deraadt   168: .endif
1.180     natano    169:
1.181     tb        170: BUILDUSER?= build
                    171: WOBJGROUP?= wobj
                    172: WOBJUMASK?= 007
1.31      espie     173:
                    174: BSD_OWN_MK=Done
1.41      espie     175:
                    176: .PHONY: spell clean cleandir obj manpages print all \
1.98      espie     177:        depend beforedepend afterdepend cleandepend subdirdepend \
1.172     bluhm     178:        all cleanman includes \
1.41      espie     179:        beforeinstall realinstall maninstall afterinstall install