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

1.162   ! kettenis    1: #      $OpenBSD: bsd.own.mk,v 1.161 2015/05/08 10:28:34 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.32      niklas     17: # Set `DEBUGLIBS' to `yes' to build libraries with debugging symbols
1.33      marc       18: DEBUGLIBS?=    no
1.71      espie      19:
1.145     miod       20: GCC3_ARCH=m88k vax
1.162   ! kettenis   21: BINUTILS217_ARCH=amd64 hppa hppa64 i386 ia64 mips64 mips64le powerpc sparc64
1.127     deraadt    22:
1.131     deraadt    23: # arm needs binutils-2.17, which still lacks W^X support
1.142     deraadt    24: # sparc has not been tried
1.144     deraadt    25: # m88k unknown
                     26: # hppa64 unknown
1.147     pascal     27: PIE_ARCH=alpha amd64 hppa i386 mips64 mips64el powerpc sh sparc64
1.160     deraadt    28: STATICPIE_ARCH=alpha amd64 hppa i386 mips64 mips64el powerpc sh sparc64
1.106     drahn      29:
                     30: .for _arch in ${MACHINE_ARCH}
1.141     miod       31: .if !empty(GCC3_ARCH:M${_arch})
                     32: COMPILER_VERSION?=gcc3
                     33: .else
1.101     espie      34: COMPILER_VERSION?=gcc4
1.107     drahn      35: .endif
                     36:
                     37: .if !empty(BINUTILS217_ARCH:M${_arch})
                     38: BINUTILS_VERSION=binutils-2.17
                     39: .else
                     40: BINUTILS_VERSION=binutils
1.72      mickey     41: .endif
1.121     pascal     42:
1.151     deraadt    43: .if !empty(STATICPIE_ARCH:M${_arch})
1.154     kettenis   44: STATICPIE?=-pie
1.151     deraadt    45: .endif
                     46:
1.121     pascal     47: .if !empty(PIE_ARCH:M${_arch})
1.137     miod       48: NOPIE_FLAGS?=-fno-pie
                     49: NOPIE_LDFLAGS?=-nopie
                     50: PIE_DEFAULT?=${DEFAULT_PIE_DEF}
1.121     pascal     51: .else
1.137     miod       52: NOPIE_FLAGS?=
                     53: PIE_DEFAULT?=
1.121     pascal     54: .endif
1.106     drahn      55: .endfor
1.117     matthew    56:
                     57: .if ${COMPILER_VERSION} == "gcc4"
                     58: VISIBILITY_HIDDEN?=-fvisibility=hidden
                     59: .endif
1.32      niklas     60:
1.1       deraadt    61: # where the system object and source trees are kept; can be configurable
                     62: # by the user in case they want them in ~/foosrc and ~/fooobj, for example
                     63: BSDSRCDIR?=    /usr/src
                     64: BSDOBJDIR?=    /usr/obj
                     65:
                     66: BINGRP?=       bin
1.9       deraadt    67: BINOWN?=       root
1.1       deraadt    68: BINMODE?=      555
                     69: NONBINMODE?=   444
1.28      espie      70: DIRMODE?=      755
1.1       deraadt    71:
1.18      tholo      72: SHAREDIR?=     /usr/share
                     73: SHAREGRP?=     bin
                     74: SHAREOWN?=     root
                     75: SHAREMODE?=    ${NONBINMODE}
1.1       deraadt    76:
1.105     schwarze   77: MANDIR?=       /usr/share/man/man
1.1       deraadt    78: MANGRP?=       bin
1.9       deraadt    79: MANOWN?=       root
1.1       deraadt    80: MANMODE?=      ${NONBINMODE}
                     81:
                     82: LIBDIR?=       /usr/lib
                     83: LIBGRP?=       ${BINGRP}
                     84: LIBOWN?=       ${BINOWN}
                     85: LIBMODE?=      ${NONBINMODE}
                     86:
1.119     haesbaer   87: DOCDIR?=       /usr/share/doc
1.1       deraadt    88: DOCGRP?=       bin
1.9       deraadt    89: DOCOWN?=       root
1.119     haesbaer   90: DOCMODE?=      ${NONBINMODE}
1.5       tholo      91:
                     92: LKMDIR?=       /usr/lkm
                     93: LKMGRP?=       ${BINGRP}
                     94: LKMOWN?=       ${BINOWN}
                     95: LKMMODE?=      ${NONBINMODE}
1.1       deraadt    96:
                     97: NLSDIR?=       /usr/share/nls
                     98: NLSGRP?=       bin
1.9       deraadt    99: NLSOWN?=       root
1.1       deraadt   100: NLSMODE?=      ${NONBINMODE}
1.93      espie     101:
                    102: LOCALEDIR?=    /usr/share/locale
                    103: LOCALEGRP?=    wheel
                    104: LOCALEOWN?=    root
                    105: LOCALEMODE?=   ${NONBINMODE}
1.119     haesbaer  106:
                    107: .if !defined(CDIAGFLAGS)
                    108: CDIAGFLAGS=    -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes
1.143     martynas  109: CDIAGFLAGS+=   -Wmissing-prototypes -Wunused -Wsign-compare
1.119     haesbaer  110: CDIAGFLAGS+=   -Wshadow
1.120     sthen     111: .  if ${COMPILER_VERSION} == "gcc4"
                    112: CDIAGFLAGS+=   -Wdeclaration-after-statement
                    113: .  endif
1.119     haesbaer  114: .endif
1.56      espie     115:
1.57      espie     116: # Shared files for system gnu configure, not used yet
                    117: GNUSYSTEM_AUX_DIR?=${BSDSRCDIR}/share/gnu
1.1       deraadt   118:
1.17      millert   119: INSTALL_COPY?= -c
1.13      niklas    120: .ifndef DEBUG
1.17      millert   121: INSTALL_STRIP?=        -s
1.13      niklas    122: .endif
1.12      downsj    123:
1.151     deraadt   124: STATIC?=       -static ${STATICPIE}
1.1       deraadt   125:
                    126: # Define SYS_INCLUDE to indicate whether you want symbolic links to the system
                    127: # source (``symlinks''), or a separate copy (``copies''); (latter useful
                    128: # in environments where it's not possible to keep /sys publicly readable)
                    129: #SYS_INCLUDE=  symlinks
                    130:
                    131: # don't try to generate PIC versions of libraries on machines
                    132: # which don't support PIC.
1.134     miod      133: .if ${MACHINE_ARCH} == "vax"
1.1       deraadt   134: NOPIC=
1.58      drahn     135: .endif
                    136:
1.86      pvalchev  137: # pic relocation flags.
1.96      martin    138: .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64")
1.100     deraadt   139: PICFLAG?=-fPIC
1.86      pvalchev  140: .else
1.100     deraadt   141: PICFLAG?=-fpic
1.62      art       142: .endif
1.86      pvalchev  143:
1.95      brad      144: .if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
1.58      drahn     145: ASPICFLAG=-KPIC
1.121     pascal    146: .endif
                    147:
1.129     kettenis  148: .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "powerpc" || \
                    149:     ${MACHINE_ARCH} == "sparc64"
1.121     pascal    150: # big PIE
                    151: DEFAULT_PIE_DEF=-DPIE_DEFAULT=2
                    152: .else
                    153: # small pie
                    154: DEFAULT_PIE_DEF=-DPIE_DEFAULT=1
1.14      rahnds    155: .endif
                    156:
                    157: # don't try to generate PROFILED versions of libraries on machines
                    158: # which don't support profiling.
1.87      miod      159: .if 0
1.14      rahnds    160: NOPROFILE=
1.1       deraadt   161: .endif
1.31      espie     162:
                    163: BSD_OWN_MK=Done
1.41      espie     164:
                    165: .PHONY: spell clean cleandir obj manpages print all \
1.98      espie     166:        depend beforedepend afterdepend cleandepend subdirdepend \
1.115     jsg       167:        all cleanman nlsinstall cleannls includes \
1.41      espie     168:        beforeinstall realinstall maninstall afterinstall install