[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.208

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