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

1.124   ! pascal      1: #      $OpenBSD: bsd.own.mk,v 1.123 2012/08/28 14:26:47 pascal 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.
                     21: TCP_WRAPPERS?= yes
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.82      mickey     25: .if ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m88k" || \
                     26:     ${MACHINE_ARCH} == "vax"
                     27: ELF_TOOLCHAIN?=        no
                     28: .else
1.50      drahn      29: ELF_TOOLCHAIN?=        yes
                     30: .endif
1.71      espie      31:
1.109     miod       32: GCC2_ARCH=m68k m88k vax
1.116     jsg        33: GCC4_ARCH=alpha amd64 arm avr32 hppa hppa64 i386 ia64 mips64 mips64el powerpc sparc sparc64 sh
1.113     jasper     34: BINUTILS217_ARCH=avr32 hppa64 ia64
1.121     pascal     35: PIE_ARCH=
1.106     drahn      36:
                     37: .for _arch in ${MACHINE_ARCH}
                     38: .if !empty(GCC2_ARCH:M${_arch})
1.101     espie      39: COMPILER_VERSION?=gcc2
1.106     drahn      40: .elif !empty(GCC4_ARCH:M${_arch})
1.101     espie      41: COMPILER_VERSION?=gcc4
1.92      mickey     42: .else
1.101     espie      43: COMPILER_VERSION?=gcc3
1.107     drahn      44: .endif
                     45:
                     46: .if !empty(BINUTILS217_ARCH:M${_arch})
                     47: BINUTILS_VERSION=binutils-2.17
                     48: .else
                     49: BINUTILS_VERSION=binutils
1.72      mickey     50: .endif
1.121     pascal     51:
                     52: .if !empty(PIE_ARCH:M${_arch})
                     53: NOPIE_FLAGS=-fno-pie
1.124   ! pascal     54: NOPIE_LDFLAGS=-nopie
1.123     pascal     55: PIE_DEFAULT=${DEFAULT_PIE_DEF}
1.121     pascal     56: .else
                     57: NOPIE_FLAGS=
1.123     pascal     58: PIE_DEFAULT=
1.121     pascal     59: .endif
1.106     drahn      60: .endfor
1.117     matthew    61:
                     62: .if ${COMPILER_VERSION} == "gcc4"
                     63: VISIBILITY_HIDDEN?=-fvisibility=hidden
                     64: .endif
1.32      niklas     65:
1.1       deraadt    66: # where the system object and source trees are kept; can be configurable
                     67: # by the user in case they want them in ~/foosrc and ~/fooobj, for example
                     68: BSDSRCDIR?=    /usr/src
                     69: BSDOBJDIR?=    /usr/obj
                     70:
                     71: BINGRP?=       bin
1.9       deraadt    72: BINOWN?=       root
1.1       deraadt    73: BINMODE?=      555
                     74: NONBINMODE?=   444
1.28      espie      75: DIRMODE?=      755
1.1       deraadt    76:
1.18      tholo      77: SHAREDIR?=     /usr/share
                     78: SHAREGRP?=     bin
                     79: SHAREOWN?=     root
                     80: SHAREMODE?=    ${NONBINMODE}
1.1       deraadt    81:
1.105     schwarze   82: MANDIR?=       /usr/share/man/man
1.1       deraadt    83: MANGRP?=       bin
1.9       deraadt    84: MANOWN?=       root
1.1       deraadt    85: MANMODE?=      ${NONBINMODE}
                     86:
                     87: LIBDIR?=       /usr/lib
                     88: LIBGRP?=       ${BINGRP}
                     89: LIBOWN?=       ${BINOWN}
                     90: LIBMODE?=      ${NONBINMODE}
                     91:
1.119     haesbaer   92: DOCDIR?=       /usr/share/doc
1.1       deraadt    93: DOCGRP?=       bin
1.9       deraadt    94: DOCOWN?=       root
1.119     haesbaer   95: DOCMODE?=      ${NONBINMODE}
1.5       tholo      96:
                     97: LKMDIR?=       /usr/lkm
                     98: LKMGRP?=       ${BINGRP}
                     99: LKMOWN?=       ${BINOWN}
                    100: LKMMODE?=      ${NONBINMODE}
1.1       deraadt   101:
                    102: NLSDIR?=       /usr/share/nls
                    103: NLSGRP?=       bin
1.9       deraadt   104: NLSOWN?=       root
1.1       deraadt   105: NLSMODE?=      ${NONBINMODE}
1.93      espie     106:
                    107: LOCALEDIR?=    /usr/share/locale
                    108: LOCALEGRP?=    wheel
                    109: LOCALEOWN?=    root
                    110: LOCALEMODE?=   ${NONBINMODE}
1.119     haesbaer  111:
                    112: .if !defined(CDIAGFLAGS)
                    113: CDIAGFLAGS=    -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes
                    114: CDIAGFLAGS+=   -Wmissing-prototypes -Wunused -Wsign-compare -Wbounded
                    115: CDIAGFLAGS+=   -Wshadow
1.120     sthen     116: .  if ${COMPILER_VERSION} == "gcc4"
                    117: CDIAGFLAGS+=   -Wdeclaration-after-statement
                    118: .  endif
1.119     haesbaer  119: .endif
1.56      espie     120:
1.57      espie     121: # Shared files for system gnu configure, not used yet
                    122: GNUSYSTEM_AUX_DIR?=${BSDSRCDIR}/share/gnu
1.1       deraadt   123:
1.17      millert   124: INSTALL_COPY?= -c
1.13      niklas    125: .ifndef DEBUG
1.17      millert   126: INSTALL_STRIP?=        -s
1.13      niklas    127: .endif
1.12      downsj    128:
                    129: # This may be changed for _single filesystem_ configurations (such as
                    130: # routers and other embedded systems); normal systems should leave it alone!
1.11      downsj    131: STATIC?=       -static
1.1       deraadt   132:
                    133: # Define SYS_INCLUDE to indicate whether you want symbolic links to the system
                    134: # source (``symlinks''), or a separate copy (``copies''); (latter useful
                    135: # in environments where it's not possible to keep /sys publicly readable)
                    136: #SYS_INCLUDE=  symlinks
                    137:
                    138: # don't try to generate PIC versions of libraries on machines
                    139: # which don't support PIC.
1.99      drahn     140: .if ${MACHINE_ARCH} == "m88k" || ${MACHINE_ARCH} == "vax"
1.1       deraadt   141: NOPIC=
1.58      drahn     142: .endif
                    143:
1.86      pvalchev  144: # pic relocation flags.
1.96      martin    145: .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64")
1.100     deraadt   146: PICFLAG?=-fPIC
1.86      pvalchev  147: .else
1.100     deraadt   148: PICFLAG?=-fpic
1.86      pvalchev  149: . if ${MACHINE_ARCH} == "m68k"
                    150: # Function CSE makes gas -k not recognize external function calls as lazily
                    151: # resolvable symbols, thus sometimes making ld.so report undefined symbol
                    152: # errors on symbols found in shared library members that would never be
                    153: # called.  Ask niklas@openbsd.org for details.
                    154: PICFLAG+=-fno-function-cse
                    155: . endif
1.62      art       156: .endif
1.86      pvalchev  157:
1.95      brad      158: .if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
1.58      drahn     159: ASPICFLAG=-KPIC
1.95      brad      160: .elif ${ELF_TOOLCHAIN:L} == "no"
1.58      drahn     161: ASPICFLAG=-k
1.121     pascal    162: .endif
                    163:
                    164: .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64"
                    165: # big PIE
                    166: DEFAULT_PIE_DEF=-DPIE_DEFAULT=2
                    167: .else
                    168: # small pie
                    169: DEFAULT_PIE_DEF=-DPIE_DEFAULT=1
1.14      rahnds    170: .endif
                    171:
                    172: # don't try to generate PROFILED versions of libraries on machines
                    173: # which don't support profiling.
1.87      miod      174: .if 0
1.14      rahnds    175: NOPROFILE=
1.1       deraadt   176: .endif
1.31      espie     177:
                    178: BSD_OWN_MK=Done
1.41      espie     179:
                    180: .PHONY: spell clean cleandir obj manpages print all \
1.98      espie     181:        depend beforedepend afterdepend cleandepend subdirdepend \
1.115     jsg       182:        all cleanman nlsinstall cleannls includes \
1.41      espie     183:        beforeinstall realinstall maninstall afterinstall install