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

1.150   ! reyk        1: #      $OpenBSD: bsd.own.mk,v 1.149 2014/04/22 09:48:51 reyk 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.139     miod       21: BINUTILS217_ARCH=hppa64 ia64
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.106     drahn      28:
                     29: .for _arch in ${MACHINE_ARCH}
1.141     miod       30: .if !empty(GCC3_ARCH:M${_arch})
                     31: COMPILER_VERSION?=gcc3
                     32: .else
1.101     espie      33: COMPILER_VERSION?=gcc4
1.107     drahn      34: .endif
                     35:
                     36: .if !empty(BINUTILS217_ARCH:M${_arch})
                     37: BINUTILS_VERSION=binutils-2.17
                     38: .else
                     39: BINUTILS_VERSION=binutils
1.72      mickey     40: .endif
1.121     pascal     41:
                     42: .if !empty(PIE_ARCH:M${_arch})
1.137     miod       43: NOPIE_FLAGS?=-fno-pie
                     44: NOPIE_LDFLAGS?=-nopie
                     45: PIE_DEFAULT?=${DEFAULT_PIE_DEF}
1.121     pascal     46: .else
1.137     miod       47: NOPIE_FLAGS?=
                     48: PIE_DEFAULT?=
1.121     pascal     49: .endif
1.106     drahn      50: .endfor
1.117     matthew    51:
                     52: .if ${COMPILER_VERSION} == "gcc4"
                     53: VISIBILITY_HIDDEN?=-fvisibility=hidden
                     54: .endif
1.32      niklas     55:
1.1       deraadt    56: # where the system object and source trees are kept; can be configurable
                     57: # by the user in case they want them in ~/foosrc and ~/fooobj, for example
                     58: BSDSRCDIR?=    /usr/src
                     59: BSDOBJDIR?=    /usr/obj
                     60:
                     61: BINGRP?=       bin
1.9       deraadt    62: BINOWN?=       root
1.1       deraadt    63: BINMODE?=      555
                     64: NONBINMODE?=   444
1.28      espie      65: DIRMODE?=      755
1.1       deraadt    66:
1.18      tholo      67: SHAREDIR?=     /usr/share
                     68: SHAREGRP?=     bin
                     69: SHAREOWN?=     root
                     70: SHAREMODE?=    ${NONBINMODE}
1.1       deraadt    71:
1.105     schwarze   72: MANDIR?=       /usr/share/man/man
1.1       deraadt    73: MANGRP?=       bin
1.9       deraadt    74: MANOWN?=       root
1.1       deraadt    75: MANMODE?=      ${NONBINMODE}
                     76:
                     77: LIBDIR?=       /usr/lib
                     78: LIBGRP?=       ${BINGRP}
                     79: LIBOWN?=       ${BINOWN}
                     80: LIBMODE?=      ${NONBINMODE}
                     81:
1.119     haesbaer   82: DOCDIR?=       /usr/share/doc
1.1       deraadt    83: DOCGRP?=       bin
1.9       deraadt    84: DOCOWN?=       root
1.119     haesbaer   85: DOCMODE?=      ${NONBINMODE}
1.5       tholo      86:
                     87: LKMDIR?=       /usr/lkm
                     88: LKMGRP?=       ${BINGRP}
                     89: LKMOWN?=       ${BINOWN}
                     90: LKMMODE?=      ${NONBINMODE}
1.1       deraadt    91:
                     92: NLSDIR?=       /usr/share/nls
                     93: NLSGRP?=       bin
1.9       deraadt    94: NLSOWN?=       root
1.1       deraadt    95: NLSMODE?=      ${NONBINMODE}
1.93      espie      96:
                     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:
                    119: # This may be changed for _single filesystem_ configurations (such as
                    120: # routers and other embedded systems); normal systems should leave it alone!
1.11      downsj    121: STATIC?=       -static
1.1       deraadt   122:
                    123: # Define SYS_INCLUDE to indicate whether you want symbolic links to the system
                    124: # source (``symlinks''), or a separate copy (``copies''); (latter useful
                    125: # in environments where it's not possible to keep /sys publicly readable)
                    126: #SYS_INCLUDE=  symlinks
                    127:
                    128: # don't try to generate PIC versions of libraries on machines
                    129: # which don't support PIC.
1.134     miod      130: .if ${MACHINE_ARCH} == "vax"
1.1       deraadt   131: NOPIC=
1.58      drahn     132: .endif
                    133:
1.86      pvalchev  134: # pic relocation flags.
1.96      martin    135: .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64")
1.100     deraadt   136: PICFLAG?=-fPIC
1.86      pvalchev  137: .else
1.100     deraadt   138: PICFLAG?=-fpic
1.62      art       139: .endif
1.86      pvalchev  140:
1.95      brad      141: .if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
1.58      drahn     142: ASPICFLAG=-KPIC
1.121     pascal    143: .endif
                    144:
1.129     kettenis  145: .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "powerpc" || \
                    146:     ${MACHINE_ARCH} == "sparc64"
1.121     pascal    147: # big PIE
                    148: DEFAULT_PIE_DEF=-DPIE_DEFAULT=2
                    149: .else
                    150: # small pie
                    151: DEFAULT_PIE_DEF=-DPIE_DEFAULT=1
1.14      rahnds    152: .endif
                    153:
                    154: # don't try to generate PROFILED versions of libraries on machines
                    155: # which don't support profiling.
1.87      miod      156: .if 0
1.14      rahnds    157: NOPROFILE=
1.1       deraadt   158: .endif
1.31      espie     159:
                    160: BSD_OWN_MK=Done
1.41      espie     161:
                    162: .PHONY: spell clean cleandir obj manpages print all \
1.98      espie     163:        depend beforedepend afterdepend cleandepend subdirdepend \
1.115     jsg       164:        all cleanman nlsinstall cleannls includes \
1.41      espie     165:        beforeinstall realinstall maninstall afterinstall install