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

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