1 # $NetBSD: bsd.prefs.mk,v 1.14 2000/01/24 07:04:28 itojun Exp $
3 # Make file, included to get the site preferences, if any. Should
4 # only be included by package Makefiles before any .if defined()
5 # statements or modifications to "passed" variables (CFLAGS, LDFLAGS, ...),
6 # to make sure any variables defined in /etc/mk.conf, $MAKECONF, or
7 # the system defaults (sys.mk and bsd.own.mk) are used.
9 # Do not recursively include mk.conf, redefine OPSYS, include bsd.own.mk, etc.
12 # Let mk.conf know that this is pkgsrc.
14 __PREFIX_SET__:=${PREFIX}
16 .if exists(/usr/bin/uname)
18 .elif exists(/bin/uname)
28 OS_VERSION!= ${UNAME} -r
31 # Preload these for architectures not in all variations of bsd.own.mk.
32 GNU_ARCH.alpha?= alpha
39 GNU_ARCH.mips?= mipsel
40 GNU_ARCH.ns32k?= ns32k
41 GNU_ARCH.sparc?= sparc
43 MACHINE_GNU_ARCH?= ${GNU_ARCH.${MACHINE_ARCH}}
45 .if ${OPSYS} == "NetBSD"
47 .elif ${OPSYS} == "SunOS"
48 .if ${MACHINE_ARCH} == "unknown"
49 LOWER_ARCH!= ${UNAME} -p
53 .elif ${OPSYS} == "Linux"
55 .if ${MACHINE_ARCH} == "unknown"
56 LOWER_ARCH!= ${UNAME} -m | sed -e 's/[456]86/386/'
57 .if ${LOWER_ARCH} == "i386"
60 LOWER_VENDOR?= unknown
64 .elif !defined(LOWER_OPSYS)
65 LOWER_OPSYS!= echo ${OPSYS} | tr A-Z a-z
69 LOWER_ARCH?= ${MACHINE_GNU_ARCH}
71 MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH}
72 MACHINE_GNU_PLATFORM?= ${LOWER_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS}
74 # Needed on NetBSD and SunOS (zoularis) to prevent an "install:" target
75 # from being created in bsd.own.mk.
76 NEED_OWN_INSTALL_TARGET=no
80 .if (${OPSYS} == "NetBSD") || (${OPSYS} == "SunOS") || (${OPSYS} == "Linux")
83 SHAREMODE?= ${DOCMODE}
84 .elif (${OPSYS} == "OpenBSD")
85 MAKE_ENV+= EXTRA_SYS_MK_INCLUDES="<bsd.own.mk>"
88 .if defined(PREFIX) && (${PREFIX} != ${__PREFIX_SET__})
90 @${ECHO_MSG} "You can NOT set PREFIX manually or in mk.conf. Set LOCALBASE or X11BASE"
91 @${ECHO_MSG} "depending on your needs. See the pkg system documentation for more info."
95 # if the system is IPv6-ready NetBSD, compile with IPv6 support turned on.
96 .if (${OPSYS} == "NetBSD") && !defined(USE_SOCKS) && \
97 exists(/usr/include/netinet6)
101 # Preload all default values for CFLAGS, LDFLAGS, etc. before bsd.pkg.mk
102 # or a pkg Makefile modifies them.