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

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