Annotation of src/share/mk/bsd.own.mk, Revision 1.173
1.173 ! deraadt 1: # $OpenBSD: bsd.own.mk,v 1.172 2015/10/26 10:43:42 bluhm 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
1.19 downsj 15: # Set `YP' to `yes' to build with support for NIS/YP.
1.15 millert 16: YP?= yes
1.32 niklas 17: # Set `DEBUGLIBS' to `yes' to build libraries with debugging symbols
1.33 marc 18: DEBUGLIBS?= no
1.71 espie 19:
1.173 ! deraadt 20: GCC3_ARCH=m88k
1.127 deraadt 21:
1.171 deraadt 22: # arm: needs to switch away from SJLJ exceptions
23: # m88k: ?
1.169 miod 24: PIE_ARCH=alpha amd64 hppa i386 mips64 mips64el powerpc sh sparc sparc64
1.170 miod 25: STATICPIE_ARCH=alpha amd64 hppa i386 mips64 mips64el powerpc sh sparc sparc64
1.106 drahn 26:
27: .for _arch in ${MACHINE_ARCH}
1.141 miod 28: .if !empty(GCC3_ARCH:M${_arch})
29: COMPILER_VERSION?=gcc3
30: .else
1.101 espie 31: COMPILER_VERSION?=gcc4
1.72 mickey 32: .endif
1.121 pascal 33:
1.151 deraadt 34: .if !empty(STATICPIE_ARCH:M${_arch})
1.154 kettenis 35: STATICPIE?=-pie
1.151 deraadt 36: .endif
37:
1.121 pascal 38: .if !empty(PIE_ARCH:M${_arch})
1.137 miod 39: NOPIE_FLAGS?=-fno-pie
40: NOPIE_LDFLAGS?=-nopie
41: PIE_DEFAULT?=${DEFAULT_PIE_DEF}
1.121 pascal 42: .else
1.137 miod 43: NOPIE_FLAGS?=
44: PIE_DEFAULT?=
1.121 pascal 45: .endif
1.106 drahn 46: .endfor
1.117 matthew 47:
48: .if ${COMPILER_VERSION} == "gcc4"
49: VISIBILITY_HIDDEN?=-fvisibility=hidden
50: .endif
1.32 niklas 51:
1.1 deraadt 52: # where the system object and source trees are kept; can be configurable
53: # by the user in case they want them in ~/foosrc and ~/fooobj, for example
54: BSDSRCDIR?= /usr/src
55: BSDOBJDIR?= /usr/obj
56:
57: BINGRP?= bin
1.9 deraadt 58: BINOWN?= root
1.1 deraadt 59: BINMODE?= 555
60: NONBINMODE?= 444
1.28 espie 61: DIRMODE?= 755
1.1 deraadt 62:
1.18 tholo 63: SHAREDIR?= /usr/share
64: SHAREGRP?= bin
65: SHAREOWN?= root
66: SHAREMODE?= ${NONBINMODE}
1.1 deraadt 67:
1.105 schwarze 68: MANDIR?= /usr/share/man/man
1.1 deraadt 69: MANGRP?= bin
1.9 deraadt 70: MANOWN?= root
1.1 deraadt 71: MANMODE?= ${NONBINMODE}
72:
73: LIBDIR?= /usr/lib
74: LIBGRP?= ${BINGRP}
75: LIBOWN?= ${BINOWN}
76: LIBMODE?= ${NONBINMODE}
77:
1.119 haesbaer 78: DOCDIR?= /usr/share/doc
1.1 deraadt 79: DOCGRP?= bin
1.9 deraadt 80: DOCOWN?= root
1.119 haesbaer 81: DOCMODE?= ${NONBINMODE}
1.5 tholo 82:
83: LKMDIR?= /usr/lkm
84: LKMGRP?= ${BINGRP}
85: LKMOWN?= ${BINOWN}
86: LKMMODE?= ${NONBINMODE}
1.1 deraadt 87:
1.93 espie 88: LOCALEDIR?= /usr/share/locale
89: LOCALEGRP?= wheel
90: LOCALEOWN?= root
91: LOCALEMODE?= ${NONBINMODE}
1.119 haesbaer 92:
93: .if !defined(CDIAGFLAGS)
94: CDIAGFLAGS= -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes
1.143 martynas 95: CDIAGFLAGS+= -Wmissing-prototypes -Wunused -Wsign-compare
1.119 haesbaer 96: CDIAGFLAGS+= -Wshadow
1.120 sthen 97: . if ${COMPILER_VERSION} == "gcc4"
98: CDIAGFLAGS+= -Wdeclaration-after-statement
99: . endif
1.119 haesbaer 100: .endif
1.56 espie 101:
1.57 espie 102: # Shared files for system gnu configure, not used yet
103: GNUSYSTEM_AUX_DIR?=${BSDSRCDIR}/share/gnu
1.1 deraadt 104:
1.17 millert 105: INSTALL_COPY?= -c
1.13 niklas 106: .ifndef DEBUG
1.17 millert 107: INSTALL_STRIP?= -s
1.13 niklas 108: .endif
1.12 downsj 109:
1.151 deraadt 110: STATIC?= -static ${STATICPIE}
1.1 deraadt 111:
112: # Define SYS_INCLUDE to indicate whether you want symbolic links to the system
113: # source (``symlinks''), or a separate copy (``copies''); (latter useful
114: # in environments where it's not possible to keep /sys publicly readable)
115: #SYS_INCLUDE= symlinks
1.58 drahn 116:
1.86 pvalchev 117: # pic relocation flags.
1.96 martin 118: .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64")
1.100 deraadt 119: PICFLAG?=-fPIC
1.86 pvalchev 120: .else
1.100 deraadt 121: PICFLAG?=-fpic
1.62 art 122: .endif
1.86 pvalchev 123:
1.95 brad 124: .if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
1.58 drahn 125: ASPICFLAG=-KPIC
1.121 pascal 126: .endif
127:
1.129 kettenis 128: .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "powerpc" || \
1.169 miod 129: ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
1.121 pascal 130: # big PIE
131: DEFAULT_PIE_DEF=-DPIE_DEFAULT=2
132: .else
133: # small pie
134: DEFAULT_PIE_DEF=-DPIE_DEFAULT=1
1.14 rahnds 135: .endif
136:
137: # don't try to generate PROFILED versions of libraries on machines
138: # which don't support profiling.
1.87 miod 139: .if 0
1.14 rahnds 140: NOPROFILE=
1.1 deraadt 141: .endif
1.31 espie 142:
143: BSD_OWN_MK=Done
1.41 espie 144:
145: .PHONY: spell clean cleandir obj manpages print all \
1.98 espie 146: depend beforedepend afterdepend cleandepend subdirdepend \
1.172 bluhm 147: all cleanman includes \
1.41 espie 148: beforeinstall realinstall maninstall afterinstall install