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