Makefile revision 5b6dcef96477ed43ad7936fe40bef1fea018b330
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd#
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# CDDL HEADER START
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd#
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd# The contents of this file are subject to the terms of the
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd# Common Development and Distribution License, Version 1.0 only
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# (the "License"). You may not use this file except in compliance
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# with the License.
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd#
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc# or http://www.opensolaris.org/os/licensing.
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# See the License for the specific language governing permissions
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# and limitations under the License.
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen#
2e545ce2450a9953665f701bb05350f0d3f26275nd# When distributing Covered Code, include this CDDL HEADER in each
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# If applicable, add the following below this CDDL HEADER, with the
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# fields enclosed by brackets "[]" replaced with your own identifying
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# information: Portions Copyright [yyyy] [name of copyright owner]
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd#
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen# CDDL HEADER END
3f08db06526d6901aa08c110b5bc7dde6bc39905nd#
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd#
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# Use is subject to license terms.
3f08db06526d6901aa08c110b5bc7dde6bc39905nd#
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# ident "%Z%%M% %I% %E% SMI"
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd#
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd# Makefile for system source
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd#
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd# include global definitions
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjunginclude Makefile.master
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd#
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluem# the Targetdirs file is the AT&T target.dirs file in a makefile format.
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluem# it defines TARGETDIRS and ROOTDIRS.
4b575a6b6704b516f22d65a3ad35696d7b9ba372rplueminclude Targetdirs
cf60fc8ad0f3a8f4b08351a2a3e346e0662af010nd
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14ndCOMMON_SUBDIRS= uts lib cmd ucblib ucbcmd
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd#
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# sparc needs to build both stand and psm, in that order
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# x86 needs to build psm and GRUB
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd#
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14ndsparc_SUBDIRS= stand psm
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14ndi386_SUBDIRS= psm grub
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14ndSUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14ndHDRSUBDIRS= uts head lib cmd ucbhead
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd
737a1f4117ce00c29a1b78b93db08e4a273ab2edtrawick# UCB headers are bug-for-bug compatible and not checkable against the header
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# standards.
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd#
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14ndCHKHDRSUBDIRS= head uts lib
b9f522ae1c0ed2bf3fc4444245bf28b2e2449a65nd
8bc4f197c0856362276580a72bb76b4a2c71f73end# The check target also causes smf(5) service manifests to be validated.
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14ndCHKMFSTSUBDIRS= cmd
44eb0fcf4ae95f4f77e97350fccf0e3a9d0b098bnd
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14ndMSGSUBDIRS= cmd ucbcmd lib
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14ndDOMAINS= \
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd SUNW_OST_ADMIN \
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd SUNW_OST_NETRPC \
8bc4f197c0856362276580a72bb76b4a2c71f73end SUNW_OST_OSCMD \
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd SUNW_OST_OSLIB \
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh SUNW_OST_UCBCMD \
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd SUNW_OST_ZONEINFO
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd
3b3b7fc78d1f5bfc2769903375050048ff41ff26ndMSGDDIRS= $(DOMAINS:%=$(MSGROOT)/%)
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7ndMSGDIRS= $(MSGROOT) $(MSGDDIRS) $(MSGROOT)/LC_TIME
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjungall all_xmod := TARGET= all
727872d18412fc021f03969b8641810d8896820bhumbedoohinstall install_xmod := TARGET= install
0d0ba3a410038e179b695446bb149cce6264e0abndinstall_h := TARGET= install_h
727872d18412fc021f03969b8641810d8896820bhumbedoohclean := TARGET= clean
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedoohclobber := TARGET= clobber
0d0ba3a410038e179b695446bb149cce6264e0abndcheck := TARGET= check
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh_msg := TARGET= _msg
727872d18412fc021f03969b8641810d8896820bhumbedooh
0d0ba3a410038e179b695446bb149cce6264e0abnd
0d0ba3a410038e179b695446bb149cce6264e0abnd.KEEP_STATE:
0d0ba3a410038e179b695446bb149cce6264e0abnd
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh#
0d0ba3a410038e179b695446bb149cce6264e0abnd# Note: install only builds the all target for the pkgdefs
0d0ba3a410038e179b695446bb149cce6264e0abnd# directory. We are not yet ready to have an install
0d0ba3a410038e179b695446bb149cce6264e0abnd# build create 'packages' also. To build packages
727872d18412fc021f03969b8641810d8896820bhumbedooh# cd pkgdefs and do a 'make install'
0d0ba3a410038e179b695446bb149cce6264e0abnd#
0d0ba3a410038e179b695446bb149cce6264e0abndall: sgs .WAIT $(SUBDIRS) pkg_all
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedoohinstall: sgs .WAIT $(SUBDIRS) pkg_all .WAIT _msg
205f749042ed530040a4f0080dbcb47ceae8a374rjung @cd pkgdefs/SUNW0on; pwd; $(MAKE) _msg
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen @rm -rf "$(ROOT)/catalog"
0d0ba3a410038e179b695446bb149cce6264e0abnd
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndclean clobber: $(SUBDIRS) head pkgdefs
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd_msg: _msgdirs rootdirs $(MSGSUBDIRS)
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd
eac1d56b0c6d54ddf717d035f808bdfa61e8bd14nd# for a complete build from scratch
crankturn: sgs uts pkg_all
@cd lib; pwd; $(MAKE) install
@cd cmd; pwd; $(MAKE) all
@cd ucblib; pwd; $(MAKE) install
@cd ucbcmd; pwd; $(MAKE) all
pkg_all:
@cd pkgdefs; pwd; $(MAKE) all
#
# target for building a proto area for reference via the ROOT macro
#
protolibs: rootlibs ucblibs
# build all ucb libraries
#
ucblibs:
@cd ucblib; pwd; $(MAKE) install
# Base subset of rootproto, excluding ucb libraries
#
rootlibs: sgs
@cd lib; pwd; $(MAKE) install
$(SUBDIRS) head ucbhead pkgdefs: FRC
@cd $@; pwd; $(MAKE) $(TARGET)
.PARALLEL: sysheaders userheaders libheaders ucbheaders cmdheaders \
commonheaders
# librpcsvc has a dependency on headers installed by
# userheaders, hence the .WAIT before libheaders.
sgs: rootdirs .WAIT sysheaders userheaders .WAIT \
libheaders ucbheaders cmdheaders commonheaders
#
# top-level setup target (headers/tools)
setup: sgs
@cd tools; pwd; $(MAKE) install
# /var/mail/:saved is a special case because of the colon in the name.
#
rootdirs: $(ROOTDIRS)
$(INS) -d -m 775 $(ROOT)/var/mail/:saved
$(CH)$(CHOWN) root $(ROOT)/var/mail/:saved
$(CH)$(CHGRP) mail $(ROOT)/var/mail/:saved
lint: FRC
$(MAKE) -f Makefile.lint
_msgdirs: $(MSGDIRS)
$(ROOTDIRS) $(MSGDIRS):
$(INS.dir)
userheaders: FRC
@cd head; pwd; $(MAKE) install_h
libheaders: FRC
@cd lib; pwd; $(MAKE) install_h
sysheaders: FRC
@cd uts; pwd; $(MAKE) install_h
ucbheaders: FRC
@cd ucbhead; pwd; $(MAKE) install_h
cmdheaders: FRC
@cd cmd/fm; pwd; $(MAKE) install_h
@cd cmd/mdb; pwd; $(MAKE) install_h
commonheaders: FRC
@cd common/ipf; pwd; $(MAKE) install_h
# each xmod target depends on a corresponding MACH-specific pseudotarget
# before doing common xmod work
#
all_xmod install_xmod: $$@_$(MACH)
@cd uts/common/sys; pwd; $(MAKE) svvs_h
all_xmod_sparc install_xmod_sparc: FRC
@cd uts/sparc; pwd; \
$(MAKE) TARGET=$(TARGET) svvs pm wsdrv
all_xmod_i386 install_xmod_i386: FRC
@cd uts/i86; pwd; $(MAKE) TARGET=$(TARGET) svvs
check: $(CHKHDRSUBDIRS) $(CHKMFSTSUBDIRS)
#
# Cross-reference customization: skip all of the subdirectories that
# don't contain actual source code.
#
XRPRUNE = spec pkgdefs prototypes xmod
XRINCDIRS = uts/common head ucbhead
cscope.out tags: FRC
$(XREF) -f -x $@
FRC:
# EXPORT DELETE START
XMOD_DELETE_FILES:sh = cat xmod/xmod_files
EXPORT_SRC:
@cd cmd/cmd-inet/usr.lib/in.iked; pwd; $(MAKE) EXPORT_SRC
@cd cmd/cmd-inet/usr.lib/ike-certutils; pwd; $(MAKE) EXPORT_SRC
@cd cmd/cmd-inet/usr.sbin; pwd; $(MAKE) EXPORT_SRC
@cd cmd/cmd-crypto/etc; pwd; $(MAKE) EXPORT_SRC
@cd cmd/crypt; pwd; $(MAKE) EXPORT_SRC
@cd cmd/gss/gssd; pwd; $(MAKE) EXPORT_SRC
@cd cmd/krb5/kadmin; pwd; $(MAKE) EXPORT_SRC
@cd cmd/sendmail/src; pwd; $(MAKE) EXPORT_SRC
@cd cmd/xntpd; pwd; $(MAKE) EXPORT_SRC
@cd common/crypto/aes; pwd; $(MAKE) EXPORT_SRC
@cd common/crypto/arcfour; pwd; $(MAKE) EXPORT_SRC
@cd common/crypto/blowfish; pwd; $(MAKE) EXPORT_SRC
@cd common/crypto/des; pwd; $(MAKE) EXPORT_SRC
@cd common/crypto/rsa; pwd; $(MAKE) EXPORT_SRC
@cd lib/crypt_modules/bsdbf; pwd ; $(MAKE) EXPORT_SRC
@cd lib/gss_mechs/mech_dummy; pwd; $(MAKE) EXPORT_SRC
@cd lib/gss_mechs/mech_dh/backend; pwd; $(MAKE) EXPORT_SRC
@cd lib/gss_mechs/mech_krb5; pwd; $(MAKE) EXPORT_SRC
@cd lib/gss_mechs/mech_spnego; pwd; $(MAKE) EXPORT_SRC
@cd lib/libcrypt; pwd; $(MAKE) EXPORT_SRC
@cd lib/libelfsign; pwd; $(MAKE) EXPORT_SRC
@cd lib/libgss; pwd; $(MAKE) EXPORT_SRC
@cd lib/libike; pwd; $(MAKE) EXPORT_SRC
@cd lib/libnsl; pwd; $(MAKE) EXPORT_SRC
@cd lib/openssl; pwd; $(MAKE) EXPORT_SRC
@cd lib/pkcs11/pkcs11_softtoken/common; pwd; $(MAKE) EXPORT_SRC
@cd lib/pkcs11/libpkcs11; pwd; $(MAKE) EXPORT_SRC
@cd lib/pkcs11; pwd; $(MAKE) EXPORT_SRC
@cd lib/libsldap; pwd; $(MAKE) EXPORT_SRC
@cd lib/libsasl; pwd; $(MAKE) EXPORT_SRC
@cd lib/sasl_plugins; pwd; $(MAKE) EXPORT_SRC
@cd lib/smartcard; pwd; $(MAKE) EXPORT_SRC
@cd lib/pam_modules/krb5; pwd; $(MAKE) EXPORT_SRC
@cd lib/udapl; pwd; $(MAKE) EXPORT_SRC
@cd lib/libresolv2; pwd; $(MAKE) EXPORT_SRC
@cd tools/elfsign; pwd; $(MAKE) EXPORT_SRC
@cd uts/common/crypto/io; pwd; $(MAKE) EXPORT_SRC
@cd uts/common/des; pwd; $(MAKE) EXPORT_SRC
@cd uts/common/rpc; pwd; $(MAKE) EXPORT_SRC
@cd uts/common/sys; pwd; $(MAKE) EXPORT_SRC
@cd uts/common/gssapi/include; pwd; $(MAKE) EXPORT_SRC
@cd uts/common/gssapi; pwd; $(MAKE) EXPORT_SRC
@cd uts/common/gssapi/mechs/dummy; pwd; $(MAKE) EXPORT_SRC
@cd uts/common/gssapi/mechs/krb5; pwd; $(MAKE) EXPORT_SRC
@cd uts/common; pwd; $(MAKE) EXPORT_SRC
@cd uts/sparc; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/forthdebug; pwd; $(MAKE) EXPORT_SRC
@cd uts/intel; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/chalupa; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/cherrystone; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/daktari; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/enchilada; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/ents; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/excalibur; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/chicago; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/littleneck; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/lw2plus; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/lw8; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/mpxu; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/serengeti; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/starcat; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/taco; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4v/io/ncp; pwd; $(MAKE) EXPORT_SRC
@cd pkgdefs; pwd; $(MAKE) EXPORT_SRC
$(RM) -r $(XMOD_DELETE_FILES)
$(RM) Targetdirs+
sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
< Targetdirs > Targetdirs+
$(MV) Targetdirs+ Targetdirs
$(CHMOD) 444 Targetdirs
$(RM) Makefile+
sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
< Makefile > Makefile+
$(MV) Makefile+ Makefile
$(CHMOD) 444 Makefile
$(RM) Makefile.master+
sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
< Makefile.master > Makefile.master+
$(MV) Makefile.master+ Makefile.master
$(CHMOD) 444 Makefile.master
CRYPT_SRC:
@cd cmd/cmd-inet/usr.lib/in.iked; pwd; $(MAKE) CRYPT_SRC
@cd cmd/cmd-inet/usr.lib/ike-certutils; pwd; $(MAKE) CRYPT_SRC
@cd lib/crypt_modules/bsdbf; pwd ; $(MAKE) CRYPT_SRC
@cd lib/gss_mechs/mech_dummy; pwd; $(MAKE) CRYPT_SRC
@cd lib/gss_mechs/mech_dh/backend; pwd; $(MAKE) CRYPT_SRC
@cd lib/gss_mechs/mech_krb5; pwd; $(MAKE) CRYPT_SRC
@cd lib/gss_mechs/mech_spnego; pwd; $(MAKE) CRYPT_SRC
@cd lib/libelfsign; pwd; $(MAKE) CRYPT_SRC
@cd lib/libike; pwd; $(MAKE) CRYPT_SRC
@cd lib/libnsl; pwd; $(MAKE) CRYPT_SRC
@cd lib/libsasl; pwd; $(MAKE) CRYPT_SRC
@cd lib/libresolv2; pwd; $(MAKE) CRYPT_SRC
@cd lib/sasl_plugins; pwd; $(MAKE) CRYPT_SRC
@cd lib/pam_modules/krb5; pwd; $(MAKE) CRYPT_SRC
@cd tools/elfsign; pwd; $(MAKE) CRYPT_SRC
@cd uts/common/gssapi; pwd; $(MAKE) CRYPT_SRC
@cd uts/common/gssapi/include; pwd; $(MAKE) CRYPT_SRC
@cd uts/common/gssapi/mechs/dummy; pwd; $(MAKE) CRYPT_SRC
@cd uts/common/gssapi/mechs/krb5; pwd; $(MAKE) CRYPT_SRC
$(RM) Makefile+
sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
< Makefile > Makefile+
$(MV) Makefile+ Makefile
$(CHMOD) 444 Makefile
$(RM) Makefile.master+
sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
< Makefile.master > Makefile.master+
$(MV) Makefile.master+ Makefile.master
$(CHMOD) 444 Makefile.master
# EXPORT DELETE END
ONC_PLUS:
@cd cmd/login; pwd; $(MAKE) ONC_PLUS
@cd uts; pwd; $(MAKE) ONC_PLUS
#
# Targets for reporting compiler versions; nightly uses these.
#
cc-version:
@if [ -x "$($(MACH)_CC)" ]; then \
$(ECHO) 32-bit compiler; \
$(ECHO) $($(MACH)_CC); \
$($(MACH)_CC) -V 2>&1 | head -1; \
else \
__COMPILER=`$($(MACH)_CC) -_compiler 2>/dev/null || $(TRUE)`;\
if [ -z "$$__COMPILER" ]; then \
$(ECHO) No 32-bit compiler found; \
exit 1; \
else \
$(ECHO) 32-bit compiler; \
$(ECHO) $($(MACH)_CC); \
$(ECHO) $$__COMPILER; \
$($(MACH)_CC) -V 2>&1 | head -1; \
fi; \
fi
cc64-version:
@if [ -x "$($(MACH64)_CC)" ]; then \
$(ECHO) 64-bit compiler; \
$(ECHO) $($(MACH64)_CC); \
$($(MACH64)_CC) -V 2>&1 | head -1; \
else \
__COMPILER=`$($(MACH64)_CC) -_compiler 2>/dev/null || $(TRUE)`;\
if [ -z "$$__COMPILER" ]; then \
$(ECHO) No 64-bit compiler found; \
exit 1; \
else \
$(ECHO) 64-bit compiler; \
$(ECHO) $($(MACH64)_CC); \
$(ECHO) $$__COMPILER; \
$($(MACH64)_CC) -V 2>&1 | head -1; \
fi; \
fi
java-version:
@if [ -x "$(JAVAC)" ]; then \
$(ECHO) $(JAVAC); \
$(JAVA_ROOT)/bin/java -fullversion 2>&1 | head -1; \
else \
$(ECHO) No Java compiler found; \
exit 1; \
fi