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

1.147   ! pascal      1: #      $OpenBSD: bsd.own.mk,v 1.146 2014/03/23 03:33:58 tedu 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
                     15: # Set `KERBEROS5' to `yes' to build with support for Kerberos5 authentication.
1.47      hin        16: KERBEROS5?=    yes
1.19      downsj     17: # Set `YP' to `yes' to build with support for NIS/YP.
1.15      millert    18: YP?=           yes
1.19      downsj     19: # Set `TCP_WRAPPERS' to `yes' to build certain networking daemons with
                     20: # integrated support for libwrap.
1.146     tedu       21: TCP_WRAPPERS?= no
1.32      niklas     22: # Set `DEBUGLIBS' to `yes' to build libraries with debugging symbols
1.33      marc       23: DEBUGLIBS?=    no
1.61      pvalchev   24: # Set toolchain to be able to know differences.
1.50      drahn      25: ELF_TOOLCHAIN?=        yes
1.71      espie      26:
1.145     miod       27: GCC3_ARCH=m88k vax
1.139     miod       28: BINUTILS217_ARCH=hppa64 ia64
1.127     deraadt    29:
1.131     deraadt    30: # arm needs binutils-2.17, which still lacks W^X support
1.142     deraadt    31: # sparc has not been tried
1.144     deraadt    32: # m88k unknown
                     33: # hppa64 unknown
1.147   ! pascal     34: PIE_ARCH=alpha amd64 hppa i386 mips64 mips64el powerpc sh sparc64
1.106     drahn      35:
                     36: .for _arch in ${MACHINE_ARCH}
1.141     miod       37: .if !empty(GCC3_ARCH:M${_arch})
                     38: COMPILER_VERSION?=gcc3
                     39: .else
1.101     espie      40: COMPILER_VERSION?=gcc4
1.107     drahn      41: .endif
                     42:
                     43: .if !empty(BINUTILS217_ARCH:M${_arch})
                     44: BINUTILS_VERSION=binutils-2.17
                     45: .else
                     46: BINUTILS_VERSION=binutils
1.72      mickey     47: .endif
1.121     pascal     48:
                     49: .if !empty(PIE_ARCH:M${_arch})
1.137     miod       50: NOPIE_FLAGS?=-fno-pie
                     51: NOPIE_LDFLAGS?=-nopie
                     52: PIE_DEFAULT?=${DEFAULT_PIE_DEF}
1.121     pascal     53: .else
1.137     miod       54: NOPIE_FLAGS?=
                     55: PIE_DEFAULT?=
1.121     pascal     56: .endif
1.106     drahn      57: .endfor
1.117     matthew    58:
                     59: .if ${COMPILER_VERSION} == "gcc4"
                     60: VISIBILITY_HIDDEN?=-fvisibility=hidden
                     61: .endif
1.32      niklas     62:
1.1       deraadt    63: # where the system object and source trees are kept; can be configurable
                     64: # by the user in case they want them in ~/foosrc and ~/fooobj, for example
                     65: BSDSRCDIR?=    /usr/src
                     66: BSDOBJDIR?=    /usr/obj
                     67:
                     68: BINGRP?=       bin
1.9       deraadt    69: BINOWN?=       root
1.1       deraadt    70: BINMODE?=      555
                     71: NONBINMODE?=   444
1.28      espie      72: DIRMODE?=      755
1.1       deraadt    73:
1.18      tholo      74: SHAREDIR?=     /usr/share
                     75: SHAREGRP?=     bin
                     76: SHAREOWN?=     root
                     77: SHAREMODE?=    ${NONBINMODE}
1.1       deraadt    78:
1.105     schwarze   79: MANDIR?=       /usr/share/man/man
1.1       deraadt    80: MANGRP?=       bin
1.9       deraadt    81: MANOWN?=       root
1.1       deraadt    82: MANMODE?=      ${NONBINMODE}
                     83:
                     84: LIBDIR?=       /usr/lib
                     85: LIBGRP?=       ${BINGRP}
                     86: LIBOWN?=       ${BINOWN}
                     87: LIBMODE?=      ${NONBINMODE}
                     88:
1.119     haesbaer   89: DOCDIR?=       /usr/share/doc
1.1       deraadt    90: DOCGRP?=       bin
1.9       deraadt    91: DOCOWN?=       root
1.119     haesbaer   92: DOCMODE?=      ${NONBINMODE}
1.5       tholo      93:
                     94: LKMDIR?=       /usr/lkm
                     95: LKMGRP?=       ${BINGRP}
                     96: LKMOWN?=       ${BINOWN}
                     97: LKMMODE?=      ${NONBINMODE}
1.1       deraadt    98:
                     99: NLSDIR?=       /usr/share/nls
                    100: NLSGRP?=       bin
1.9       deraadt   101: NLSOWN?=       root
1.1       deraadt   102: NLSMODE?=      ${NONBINMODE}
1.93      espie     103:
                    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:
                    126: # This may be changed for _single filesystem_ configurations (such as
                    127: # routers and other embedded systems); normal systems should leave it alone!
1.11      downsj    128: STATIC?=       -static
1.1       deraadt   129:
                    130: # Define SYS_INCLUDE to indicate whether you want symbolic links to the system
                    131: # source (``symlinks''), or a separate copy (``copies''); (latter useful
                    132: # in environments where it's not possible to keep /sys publicly readable)
                    133: #SYS_INCLUDE=  symlinks
                    134:
                    135: # don't try to generate PIC versions of libraries on machines
                    136: # which don't support PIC.
1.134     miod      137: .if ${MACHINE_ARCH} == "vax"
1.1       deraadt   138: NOPIC=
1.58      drahn     139: .endif
                    140:
1.86      pvalchev  141: # pic relocation flags.
1.96      martin    142: .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64")
1.100     deraadt   143: PICFLAG?=-fPIC
1.86      pvalchev  144: .else
1.100     deraadt   145: PICFLAG?=-fpic
1.62      art       146: .endif
1.86      pvalchev  147:
1.95      brad      148: .if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
1.58      drahn     149: ASPICFLAG=-KPIC
1.95      brad      150: .elif ${ELF_TOOLCHAIN:L} == "no"
1.58      drahn     151: ASPICFLAG=-k
1.121     pascal    152: .endif
                    153:
1.129     kettenis  154: .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "powerpc" || \
                    155:     ${MACHINE_ARCH} == "sparc64"
1.121     pascal    156: # big PIE
                    157: DEFAULT_PIE_DEF=-DPIE_DEFAULT=2
                    158: .else
                    159: # small pie
                    160: DEFAULT_PIE_DEF=-DPIE_DEFAULT=1
1.14      rahnds    161: .endif
                    162:
                    163: # don't try to generate PROFILED versions of libraries on machines
                    164: # which don't support profiling.
1.87      miod      165: .if 0
1.14      rahnds    166: NOPROFILE=
1.1       deraadt   167: .endif
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.115     jsg       173:        all cleanman nlsinstall cleannls includes \
1.41      espie     174:        beforeinstall realinstall maninstall afterinstall install