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

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