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

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