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