Annotation of src/share/mk/bsd.own.mk, Revision 1.108
1.108 ! miod 1: # $OpenBSD: bsd.own.mk,v 1.107 2011/07/05 00:15:03 drahn 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.23 art 22: # Set `AFS` to `yes' to build with AFS support.
1.69 deraadt 23: AFS?= yes
1.32 niklas 24: # Set `DEBUGLIBS' to `yes' to build libraries with debugging symbols
1.33 marc 25: DEBUGLIBS?= no
1.61 pvalchev 26: # Set toolchain to be able to know differences.
1.82 mickey 27: .if ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m88k" || \
28: ${MACHINE_ARCH} == "vax"
29: ELF_TOOLCHAIN?= no
30: .else
1.50 drahn 31: ELF_TOOLCHAIN?= yes
32: .endif
1.71 espie 33:
1.106 drahn 34: GCC2_ARCH=m68k m88k sparc vax
1.108 ! miod 35: GCC4_ARCH=amd64 hppa i386 mips64 mips64el powerpc sparc64
1.107 drahn 36: BINUTILS217_ARCH=ia64
1.106 drahn 37:
38: .for _arch in ${MACHINE_ARCH}
39: .if !empty(GCC2_ARCH:M${_arch})
1.92 mickey 40: USE_GCC3?=no
1.101 espie 41: COMPILER_VERSION?=gcc2
1.106 drahn 42: .elif !empty(GCC4_ARCH:M${_arch})
1.101 espie 43: COMPILER_VERSION?=gcc4
1.92 mickey 44: .else
1.72 mickey 45: USE_GCC3?=yes
1.101 espie 46: COMPILER_VERSION?=gcc3
1.107 drahn 47: .endif
48:
49: .if !empty(BINUTILS217_ARCH:M${_arch})
50: BINUTILS_VERSION=binutils-2.17
51: .else
52: BINUTILS_VERSION=binutils
1.72 mickey 53: .endif
1.106 drahn 54: .endfor
1.32 niklas 55:
1.1 deraadt 56: # where the system object and source trees are kept; can be configurable
57: # by the user in case they want them in ~/foosrc and ~/fooobj, for example
58: BSDSRCDIR?= /usr/src
59: BSDOBJDIR?= /usr/obj
60:
61: BINGRP?= bin
1.9 deraadt 62: BINOWN?= root
1.1 deraadt 63: BINMODE?= 555
64: NONBINMODE?= 444
1.28 espie 65: DIRMODE?= 755
1.1 deraadt 66:
1.18 tholo 67: SHAREDIR?= /usr/share
68: SHAREGRP?= bin
69: SHAREOWN?= root
70: SHAREMODE?= ${NONBINMODE}
1.1 deraadt 71:
1.105 schwarze 72: MANDIR?= /usr/share/man/man
1.1 deraadt 73: MANGRP?= bin
1.9 deraadt 74: MANOWN?= root
1.1 deraadt 75: MANMODE?= ${NONBINMODE}
1.38 deraadt 76:
77: PSDIR?= /usr/share/man/ps
78: PSGRP?= bin
79: PSOWN?= root
80: PSMODE?= ${NONBINMODE}
1.1 deraadt 81:
82: LIBDIR?= /usr/lib
83: LINTLIBDIR?= /usr/libdata/lint
84: LIBGRP?= ${BINGRP}
85: LIBOWN?= ${BINOWN}
86: LIBMODE?= ${NONBINMODE}
87:
88: DOCDIR?= /usr/share/doc
89: DOCGRP?= bin
1.9 deraadt 90: DOCOWN?= root
1.1 deraadt 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.56 espie 107:
1.57 espie 108: # Shared files for system gnu configure, not used yet
109: GNUSYSTEM_AUX_DIR?=${BSDSRCDIR}/share/gnu
1.1 deraadt 110:
1.17 millert 111: INSTALL_COPY?= -c
1.13 niklas 112: .ifndef DEBUG
1.17 millert 113: INSTALL_STRIP?= -s
1.13 niklas 114: .endif
1.12 downsj 115:
116: # This may be changed for _single filesystem_ configurations (such as
117: # routers and other embedded systems); normal systems should leave it alone!
1.11 downsj 118: STATIC?= -static
1.1 deraadt 119:
120: # Define SYS_INCLUDE to indicate whether you want symbolic links to the system
121: # source (``symlinks''), or a separate copy (``copies''); (latter useful
122: # in environments where it's not possible to keep /sys publicly readable)
123: #SYS_INCLUDE= symlinks
124:
125: # don't try to generate PIC versions of libraries on machines
126: # which don't support PIC.
1.99 drahn 127: .if ${MACHINE_ARCH} == "m88k" || ${MACHINE_ARCH} == "vax"
1.1 deraadt 128: NOPIC=
1.58 drahn 129: .endif
130:
1.86 pvalchev 131: # pic relocation flags.
1.96 martin 132: .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64")
1.100 deraadt 133: PICFLAG?=-fPIC
1.86 pvalchev 134: .else
1.100 deraadt 135: PICFLAG?=-fpic
1.86 pvalchev 136: . if ${MACHINE_ARCH} == "m68k"
137: # Function CSE makes gas -k not recognize external function calls as lazily
138: # resolvable symbols, thus sometimes making ld.so report undefined symbol
139: # errors on symbols found in shared library members that would never be
140: # called. Ask niklas@openbsd.org for details.
141: PICFLAG+=-fno-function-cse
142: . endif
1.62 art 143: .endif
1.86 pvalchev 144:
1.95 brad 145: .if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
1.58 drahn 146: ASPICFLAG=-KPIC
1.95 brad 147: .elif ${ELF_TOOLCHAIN:L} == "no"
1.58 drahn 148: ASPICFLAG=-k
1.14 rahnds 149: .endif
150:
151: # don't try to generate PROFILED versions of libraries on machines
152: # which don't support profiling.
1.87 miod 153: .if 0
1.14 rahnds 154: NOPROFILE=
1.1 deraadt 155: .endif
1.31 espie 156:
157: BSD_OWN_MK=Done
1.41 espie 158:
159: .PHONY: spell clean cleandir obj manpages print all \
1.98 espie 160: depend beforedepend afterdepend cleandepend subdirdepend \
1.41 espie 161: all lint cleanman nlsinstall cleannls includes \
162: beforeinstall realinstall maninstall afterinstall install