Makefile revision f4b3ec61df05330d25f55a36b975b4d7519fdeb1
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# CDDL HEADER START
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License (the "License").
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You may not use this file except in compliance with the License.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# If applicable, add the following below this CDDL HEADER, with the
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# CDDL HEADER END
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Use is subject to license terms.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# ident "%Z%%M% %I% %E% SMI"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Makefile for system source
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# include global definitions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# the Targetdirs file is the AT&T target.dirs file in a makefile format.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# it defines TARGETDIRS and ROOTDIRS.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# sparc needs to build both stand and psm, in that order
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# x86 needs to build psm and GRUB
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# UCB headers are bug-for-bug compatible and not checkable against the header
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The check target also causes smf(5) service manifests to be validated.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserMSGDIRS= $(MSGROOT) $(MSGDDIRS) $(MSGROOT)/LC_TIME
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Note: install only builds the all target for the pkgdefs
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# directory. We are not yet ready to have an install
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# build create 'packages' also. To build packages
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# cd pkgdefs and do a 'make install'
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininstall: closedbins sgs .WAIT $(SUBDIRS) pkg_all .WAIT _msg
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson# for a complete build from scratch
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# target for building a proto area for reference via the ROOT macro
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# build all ucb libraries
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Base subset of rootproto, excluding ucb libraries
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson @CLOSED_ROOT="$$ON_CLOSED_BINS/root_$(MACH)$${RELEASE_BUILD+-nd}"; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein if [ ! -d "$$CLOSED_ROOT" ]; then \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(ECHO) "Error: if closed sources are not present," \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein "ON_CLOSED_BINS must point to closed binaries."; \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(ECHO) "root_$(MACH)$${RELEASE_BUILD+-nd} is not" \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein "present in $$ON_CLOSED_BINS."; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(ECHO) "Copying closed binaries from $$CLOSED_ROOT"; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (cd $$CLOSED_ROOT; tar cf - .) | \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein.PARALLEL: sysheaders userheaders libheaders ucbheaders cmdheaders
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# librpcsvc has a dependency on headers installed by
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# userheaders, hence the .WAIT before libheaders.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinsgs: rootdirs .WAIT sysheaders userheaders .WAIT \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# top-level setup target to setup the development environment
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# this includes headers and tools. for open-only builds (i.e.:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# source trees w/o usr/closed), this also depends on the closedbins
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# target (above) in order to properly seed the proto area
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# /var/mail/:saved is a special case because of the colon in the name.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# each xmod target depends on a corresponding MACH-specific pseudotarget
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# before doing common xmod work
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @cd uts/i86; pwd; $(MAKE) TARGET=$(TARGET) svvs
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Cross-reference customization: skip all of the subdirectories that
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# don't contain actual source code.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein$(CLOSED_BUILD)XRINCDIRS = uts/common ../closed/uts/common head ucbhead
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# EXPORT DELETE START
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @cd $(CLOSED)/cmd/cmd-inet/usr.lib/in.iked; pwd; $(MAKE) EXPORT_SRC
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @cd $(CLOSED)/cmd/cmd-inet/usr.lib/ike-certutils; pwd; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @cd cmd/cmd-inet/usr.sbin; pwd; $(MAKE) EXPORT_SRC
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @cd $(CLOSED)/cmd/cmd-crypto/etc; pwd; $(MAKE) EXPORT_SRC
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @cd cmd/sendmail/src; pwd; $(MAKE) EXPORT_SRC
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @cd common/crypto/aes; pwd; $(MAKE) EXPORT_SRC
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @cd common/crypto/arcfour; pwd; $(MAKE) EXPORT_SRC
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @cd common/crypto/blowfish; pwd; $(MAKE) EXPORT_SRC
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @cd common/crypto/des; pwd; $(MAKE) EXPORT_SRC
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @cd lib/crypt_modules/bsdbf; pwd ; $(MAKE) EXPORT_SRC
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @cd lib/gss_mechs/mech_dummy; pwd; $(MAKE) EXPORT_SRC
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @cd lib/gss_mechs/mech_dh/backend; pwd; $(MAKE) EXPORT_SRC
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @cd lib/gss_mechs/mech_krb5; pwd; $(MAKE) EXPORT_SRC
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @cd lib/gss_mechs/mech_spnego; pwd; $(MAKE) EXPORT_SRC
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @cd $(CLOSED)/lib/libelfsign; pwd; $(MAKE) EXPORT_SRC
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @cd $(CLOSED)/lib/libike; pwd; $(MAKE) EXPORT_SRC
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson @cd lib/pkcs11/pkcs11_softtoken/common; pwd; $(MAKE) EXPORT_SRC
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @cd lib/pkcs11/libpkcs11; pwd; $(MAKE) EXPORT_SRC
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @cd lib/sasl_plugins; pwd; $(MAKE) EXPORT_SRC
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson @cd $(CLOSED)/lib/smartcard; pwd; $(MAKE) EXPORT_SRC
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @cd lib/pam_modules/krb5; pwd; $(MAKE) EXPORT_SRC
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @cd $(CLOSED)/tools/elfsign; pwd; $(MAKE) EXPORT_SRC
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @cd uts/common/crypto/io; pwd; $(MAKE) EXPORT_SRC
if [ -z "$$__COMPILER" ]; then \
if [ -z "$$__COMPILER" ]; then \