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

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