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

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