summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkupfer <none@none>2005-12-21 19:47:57 -0800
committerkupfer <none@none>2005-12-21 19:47:57 -0800
commitfb9f9b975cb9214fec5dab37d461199adab9b964 (patch)
tree225906767e6b4b8460661d5665512ca553bd4171
parentcf8f45c7690afabe63bdb8066b11db58d708ad09 (diff)
downloadillumos-joyent-fb9f9b975cb9214fec5dab37d461199adab9b964.tar.gz
6289535 build_cscope complains a bit on x86
6303550 xencrypt, xdecrypt no longer mangled 6316770 split the tree into open and closed trees 6321333 Install.sh is over-zealous looking for kmods
-rw-r--r--usr/src/Makefile61
-rw-r--r--usr/src/Makefile.lint23
-rw-r--r--usr/src/Makefile.master47
-rw-r--r--usr/src/cmd/Makefile76
-rw-r--r--usr/src/cmd/agents/Makefile46
-rw-r--r--usr/src/cmd/cmd-crypto/Makefile13
-rw-r--r--usr/src/cmd/cmd-crypto/etc/Makefile23
-rw-r--r--usr/src/cmd/cmd-inet/usr.lib/Makefile13
-rw-r--r--usr/src/cmd/fs.d/nfs/Makefile14
-rw-r--r--usr/src/cmd/man/src/util/Makefile12
-rw-r--r--usr/src/cmd/mdb/Makefile.common6
-rw-r--r--usr/src/cmd/mdb/intel/amd64/Makefile5
-rw-r--r--usr/src/cmd/mdb/intel/ia32/Makefile5
-rw-r--r--usr/src/cmd/mdb/sparc/v7/Makefile5
-rw-r--r--usr/src/cmd/mdb/sparc/v9/Makefile8
-rw-r--r--usr/src/cmd/mdb/sun4u/modules/Makefile14
-rw-r--r--usr/src/cmd/perl/5.6.1/contrib/Makefile24
-rw-r--r--usr/src/cmd/perl/5.6.1/req.flg5
-rw-r--r--usr/src/cmd/perl/5.8.4/contrib/Makefile24
-rw-r--r--usr/src/cmd/perl/5.8.4/req.flg3
-rw-r--r--usr/src/cmd/picl/plugins/sun4u/Makefile12
-rw-r--r--usr/src/cmd/prtdiag/Makefile.com2
-rw-r--r--usr/src/cmd/prtdiag/Makefile.targ3
-rw-r--r--usr/src/cmd/prtdiag/sparc/sun4u/Makefile7
-rw-r--r--usr/src/cmd/prtdiag/sparc/sun4v/Makefile5
-rw-r--r--usr/src/cmd/sgs/Makefile3
-rw-r--r--usr/src/cmd/sgs/packages/inc.flg1
-rw-r--r--usr/src/lib/Makefile78
-rw-r--r--usr/src/lib/cfgadm_plugins/Makefile14
-rw-r--r--usr/src/lib/cfgadm_plugins/Makefile.com4
-rw-r--r--usr/src/lib/gss_mechs/mech_dh/backend/Makefile.com5
-rw-r--r--usr/src/lib/gss_mechs/mech_dh/dh1024/Makefile.com5
-rw-r--r--usr/src/lib/gss_mechs/mech_dh/dh192/Makefile.com5
-rw-r--r--usr/src/lib/gss_mechs/mech_dh/dh640/Makefile.com5
-rw-r--r--usr/src/lib/gss_mechs/mech_dummy/Makefile.com3
-rw-r--r--usr/src/lib/gss_mechs/mech_krb5/Makefile.com2
-rw-r--r--usr/src/lib/gss_mechs/mech_krb5/spec/Makefile.targ2
-rw-r--r--usr/src/lib/gss_mechs/mech_spnego/Makefile.com3
-rw-r--r--usr/src/lib/gss_mechs/mech_spnego/spec/Makefile.targ2
-rw-r--r--usr/src/lib/libc/Makefile17
-rw-r--r--usr/src/lib/libc/req.flg2
-rw-r--r--usr/src/lib/libgss/Makefile.com2
-rw-r--r--usr/src/lib/pam_modules/Makefile6
-rw-r--r--usr/src/lib/pam_modules/krb5/Makefile.com11
-rw-r--r--usr/src/lib/pkcs11/Makefile16
-rw-r--r--usr/src/lib/pkcs11/inc.flg6
-rw-r--r--usr/src/lib/udapl/Makefile10
-rw-r--r--usr/src/psm/stand/boot/Makefile24
-rw-r--r--usr/src/psm/stand/boot/i386/Makefile3
-rw-r--r--usr/src/psm/stand/boot/inc.flg3
-rw-r--r--usr/src/psm/stand/boot/sparcv9/Makefile4
-rw-r--r--usr/src/psm/stand/boot/sparcv9/sun4u/Makefile2
-rw-r--r--usr/src/psm/stand/boot/sparcv9/sun4v/Makefile2
-rw-r--r--usr/src/req.flg10
-rw-r--r--usr/src/stand/lib/req.flg1
-rw-r--r--usr/src/tools/Makefile21
-rw-r--r--usr/src/tools/env/Makefile7
-rw-r--r--usr/src/tools/env/developer.sh9
-rw-r--r--usr/src/tools/env/gatekeeper.sh9
-rw-r--r--usr/src/tools/env/opensolaris.sh191
-rw-r--r--usr/src/tools/findunref/exception_list8
-rw-r--r--usr/src/tools/scripts/Install.123
-rw-r--r--usr/src/tools/scripts/Install.sh799
-rw-r--r--usr/src/tools/scripts/bldenv.sh9
-rw-r--r--usr/src/tools/scripts/build_osnet.sh6
-rw-r--r--usr/src/tools/scripts/checkproto.sh6
-rw-r--r--usr/src/tools/scripts/makebfu.sh8
-rw-r--r--usr/src/tools/scripts/mkacr.sh4
-rw-r--r--usr/src/tools/scripts/nightly.sh41
-rw-r--r--usr/src/tools/scripts/validate_flg.pl4
-rw-r--r--usr/src/uts/Makefile17
-rw-r--r--usr/src/uts/Makefile.targ101
-rw-r--r--usr/src/uts/Makefile.uts8
-rw-r--r--usr/src/uts/README6
-rw-r--r--usr/src/uts/common/Makefile.files84
-rw-r--r--usr/src/uts/common/Makefile.rules102
-rw-r--r--usr/src/uts/common/io/1394/inc.flg20
-rw-r--r--usr/src/uts/common/io/audio/inc.flg46
-rw-r--r--usr/src/uts/common/io/ib/inc.flg47
-rw-r--r--usr/src/uts/common/io/usb/inc.flg57
-rw-r--r--usr/src/uts/common/nfs/Makefile15
-rw-r--r--usr/src/uts/common/sys/Makefile375
-rw-r--r--usr/src/uts/common/sys/Makefile.syshdrs339
-rw-r--r--usr/src/uts/i86pc/Makefile42
-rw-r--r--usr/src/uts/i86pc/Makefile.files17
-rw-r--r--usr/src/uts/i86pc/Makefile.i86pc296
-rw-r--r--usr/src/uts/i86pc/Makefile.i86pc.shared321
-rw-r--r--usr/src/uts/i86pc/Makefile.rules56
-rw-r--r--usr/src/uts/i86pc/Makefile.targ25
-rw-r--r--usr/src/uts/i86pc/Makefile.targ.shared46
-rw-r--r--usr/src/uts/intel/Makefile50
-rw-r--r--usr/src/uts/intel/Makefile.files15
-rw-r--r--usr/src/uts/intel/Makefile.intel524
-rw-r--r--usr/src/uts/intel/Makefile.intel.shared566
-rw-r--r--usr/src/uts/intel/Makefile.rules24
-rw-r--r--usr/src/uts/intel/Makefile.targ25
-rw-r--r--usr/src/uts/intel/Makefile.targ.shared44
-rw-r--r--usr/src/uts/intel/kmech_krb5/inc.flg5
-rw-r--r--usr/src/uts/intel/kmech_krb5/req.flg10
-rw-r--r--usr/src/uts/intel/sys/Makefile12
-rw-r--r--usr/src/uts/req.flg6
-rw-r--r--usr/src/uts/sparc/Makefile44
-rw-r--r--usr/src/uts/sparc/Makefile.sparc368
-rw-r--r--usr/src/uts/sparc/Makefile.sparc.shared424
-rw-r--r--usr/src/uts/sparc/Makefile.targ23
-rw-r--r--usr/src/uts/sparc/Makefile.targ.shared46
-rw-r--r--usr/src/uts/sparc/audiocs/Makefile10
-rw-r--r--usr/src/uts/sparc/kmech_krb5/inc.flg4
-rw-r--r--usr/src/uts/sparc/kmech_krb5/req.flg8
-rw-r--r--usr/src/uts/sparc/mixer/Makefile6
-rw-r--r--usr/src/uts/sparc/nfs/inc.flg7
-rw-r--r--usr/src/uts/sparc/nfssrv/inc.flg7
-rw-r--r--usr/src/uts/sparc/req.flg13
-rw-r--r--usr/src/uts/sparc/sd/Makefile21
-rw-r--r--usr/src/uts/sparc/ses/Makefile10
-rw-r--r--usr/src/uts/sparc/st/Makefile13
-rw-r--r--usr/src/uts/sparc/usb_ac/Makefile12
-rw-r--r--usr/src/uts/sparc/usb_as/Makefile12
-rw-r--r--usr/src/uts/sparc/warlock/Makefile22
-rw-r--r--usr/src/uts/sun/Makefile.files20
-rw-r--r--usr/src/uts/sun/Makefile.rules23
-rw-r--r--usr/src/uts/sun/io/scsi/inc.flg41
-rw-r--r--usr/src/uts/sun/sys/Makefile29
-rw-r--r--usr/src/uts/sun4u/Makefile71
-rw-r--r--usr/src/uts/sun4u/Makefile.files27
-rw-r--r--usr/src/uts/sun4u/Makefile.rules39
-rw-r--r--usr/src/uts/sun4u/Makefile.sun4u444
-rw-r--r--usr/src/uts/sun4u/Makefile.sun4u.shared480
-rw-r--r--usr/src/uts/sun4u/Makefile.targ29
-rw-r--r--usr/src/uts/sun4u/Makefile.targ.shared50
-rw-r--r--usr/src/uts/sun4u/blade/Makefile20
-rw-r--r--usr/src/uts/sun4u/blade/Makefile.blade91
-rw-r--r--usr/src/uts/sun4u/blade/Makefile.blade.shared112
-rw-r--r--usr/src/uts/sun4u/blade/Makefile.files6
-rw-r--r--usr/src/uts/sun4u/blade/Makefile.targ60
-rw-r--r--usr/src/uts/sun4u/blade/Makefile.targ.shared81
-rw-r--r--usr/src/uts/sun4u/blade/options/Makefile5
-rw-r--r--usr/src/uts/sun4u/boston/Makefile7
-rw-r--r--usr/src/uts/sun4u/cherrystone/Makefile9
-rw-r--r--usr/src/uts/sun4u/chicago/Makefile7
-rw-r--r--usr/src/uts/sun4u/daktari/Makefile9
-rw-r--r--usr/src/uts/sun4u/darwin/Makefile10
-rw-r--r--usr/src/uts/sun4u/enchilada/Makefile9
-rw-r--r--usr/src/uts/sun4u/excalibur/Makefile9
-rw-r--r--usr/src/uts/sun4u/fjlite/Makefile11
-rw-r--r--usr/src/uts/sun4u/grover/Makefile20
-rw-r--r--usr/src/uts/sun4u/grover/Makefile.files3
-rw-r--r--usr/src/uts/sun4u/grover/Makefile.grover55
-rw-r--r--usr/src/uts/sun4u/grover/Makefile.grover.shared76
-rw-r--r--usr/src/uts/sun4u/grover/Makefile.targ66
-rw-r--r--usr/src/uts/sun4u/grover/Makefile.targ.shared85
-rw-r--r--usr/src/uts/sun4u/javelin/Makefile19
-rw-r--r--usr/src/uts/sun4u/javelin/Makefile.files5
-rw-r--r--usr/src/uts/sun4u/javelin/Makefile.javelin58
-rw-r--r--usr/src/uts/sun4u/javelin/Makefile.javelin.shared78
-rw-r--r--usr/src/uts/sun4u/javelin/Makefile.targ62
-rw-r--r--usr/src/uts/sun4u/javelin/Makefile.targ.shared83
-rw-r--r--usr/src/uts/sun4u/kmech_krb5/inc.flg5
-rw-r--r--usr/src/uts/sun4u/kmech_krb5/req.flg12
-rw-r--r--usr/src/uts/sun4u/littleneck/Makefile9
-rw-r--r--usr/src/uts/sun4u/montecarlo/Makefile20
-rw-r--r--usr/src/uts/sun4u/montecarlo/Makefile.files8
-rw-r--r--usr/src/uts/sun4u/montecarlo/Makefile.montecarlo72
-rw-r--r--usr/src/uts/sun4u/montecarlo/Makefile.montecarlo.shared92
-rw-r--r--usr/src/uts/sun4u/montecarlo/Makefile.targ72
-rw-r--r--usr/src/uts/sun4u/montecarlo/Makefile.targ.shared93
-rw-r--r--usr/src/uts/sun4u/montecarlo/sys/Makefile15
-rw-r--r--usr/src/uts/sun4u/mpxu/Makefile15
-rw-r--r--usr/src/uts/sun4u/mpxu/Makefile.files4
-rw-r--r--usr/src/uts/sun4u/mpxu/Makefile.mpxu98
-rw-r--r--usr/src/uts/sun4u/mpxu/Makefile.mpxu.shared121
-rw-r--r--usr/src/uts/sun4u/mpxu/Makefile.targ84
-rw-r--r--usr/src/uts/sun4u/mpxu/Makefile.targ.shared105
-rw-r--r--usr/src/uts/sun4u/quasar/Makefile10
-rw-r--r--usr/src/uts/sun4u/schumacher/Makefile7
-rw-r--r--usr/src/uts/sun4u/seattle/Makefile7
-rw-r--r--usr/src/uts/sun4u/serengeti/Makefile22
-rw-r--r--usr/src/uts/sun4u/serengeti/Makefile.files9
-rw-r--r--usr/src/uts/sun4u/serengeti/Makefile.rules32
-rw-r--r--usr/src/uts/sun4u/serengeti/Makefile.serengeti114
-rw-r--r--usr/src/uts/sun4u/serengeti/Makefile.serengeti.shared140
-rw-r--r--usr/src/uts/sun4u/serengeti/Makefile.targ76
-rw-r--r--usr/src/uts/sun4u/serengeti/Makefile.targ.shared97
-rw-r--r--usr/src/uts/sun4u/snowbird/Makefile9
-rw-r--r--usr/src/uts/sun4u/starcat/Makefile25
-rw-r--r--usr/src/uts/sun4u/starcat/Makefile.files25
-rw-r--r--usr/src/uts/sun4u/starcat/Makefile.rules26
-rw-r--r--usr/src/uts/sun4u/starcat/Makefile.starcat130
-rw-r--r--usr/src/uts/sun4u/starcat/Makefile.starcat.shared155
-rw-r--r--usr/src/uts/sun4u/starcat/Makefile.targ77
-rw-r--r--usr/src/uts/sun4u/starcat/Makefile.targ.shared98
-rw-r--r--usr/src/uts/sun4u/starcat/sys/Makefile14
-rw-r--r--usr/src/uts/sun4u/starfire/Makefile15
-rw-r--r--usr/src/uts/sun4u/sys/Makefile51
-rw-r--r--usr/src/uts/sun4u/taco/Makefile9
-rw-r--r--usr/src/uts/sun4u/tazmo/Makefile21
-rw-r--r--usr/src/uts/sun4u/tazmo/Makefile.targ63
-rw-r--r--usr/src/uts/sun4u/tazmo/Makefile.targ.shared84
-rw-r--r--usr/src/uts/sun4u/tazmo/Makefile.tazmo58
-rw-r--r--usr/src/uts/sun4u/tazmo/Makefile.tazmo.shared78
-rw-r--r--usr/src/uts/sun4v/Makefile55
-rw-r--r--usr/src/uts/sun4v/Makefile.files2
-rw-r--r--usr/src/uts/sun4v/Makefile.rules33
-rw-r--r--usr/src/uts/sun4v/Makefile.sun4v372
-rw-r--r--usr/src/uts/sun4v/Makefile.sun4v.shared399
-rw-r--r--usr/src/uts/sun4v/Makefile.targ27
-rw-r--r--usr/src/uts/sun4v/Makefile.targ.shared50
-rw-r--r--usr/src/uts/sun4v/ontario/Makefile7
-rw-r--r--usr/src/uts/sun4v/sys/Makefile26
-rw-r--r--usr/src/xmod/cry_files8
-rw-r--r--usr/src/xmod/xmod_files144
211 files changed, 6492 insertions, 5420 deletions
diff --git a/usr/src/Makefile b/usr/src/Makefile
index ad48a1f320..618339d9ad 100644
--- a/usr/src/Makefile
+++ b/usr/src/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -84,8 +83,8 @@ _msg := TARGET= _msg
# build create 'packages' also. To build packages
# cd pkgdefs and do a 'make install'
#
-all: sgs .WAIT $(SUBDIRS) pkg_all
-install: sgs .WAIT $(SUBDIRS) pkg_all .WAIT _msg
+all: closedbins sgs .WAIT $(SUBDIRS) pkg_all
+install: closedbins sgs .WAIT $(SUBDIRS) pkg_all .WAIT _msg
@cd pkgdefs/SUNW0on; pwd; $(MAKE) _msg
@rm -rf "$(ROOT)/catalog"
@@ -117,6 +116,18 @@ ucblibs:
rootlibs: sgs
@cd lib; pwd; $(MAKE) install
+closedbins: FRC $(ROOTDIRS)
+ @if [ "$$CLOSED_IS_PRESENT" = no ]; then \
+ if [ ! -d "$$ON_CLOSED_BINS/root_$(MACH)" ]; then \
+ $(ECHO) "Error: if closed sources are not present," \
+ "ON_CLOSED_BINS must point to closed binaries."; \
+ exit 1; \
+ fi; \
+ $(ECHO) "Copying closed binaries from $$ON_CLOSED_BINS"; \
+ (cd $$ON_CLOSED_BINS/root_$(MACH); tar cf - .) | \
+ (cd $(ROOT); tar xBf -); \
+ fi
+
$(SUBDIRS) head ucbhead pkgdefs: FRC
@cd $@; pwd; $(MAKE) $(TARGET)
@@ -186,8 +197,10 @@ check: $(CHKHDRSUBDIRS) $(CHKMFSTSUBDIRS)
# Cross-reference customization: skip all of the subdirectories that
# don't contain actual source code.
#
+$(CLOSED_BUILD)XRDIRS += ../closed
XRPRUNE = spec pkgdefs prototypes xmod
XRINCDIRS = uts/common head ucbhead
+$(CLOSED_BUILD)XRINCDIRS = uts/common ../closed/uts/common head ucbhead
cscope.out tags: FRC
$(XREF) -f -x $@
@@ -199,10 +212,11 @@ FRC:
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 $(CLOSED)/cmd/cmd-inet/usr.lib/in.iked; pwd; $(MAKE) EXPORT_SRC
+ @cd $(CLOSED)/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 $(CLOSED)/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
@@ -219,9 +233,9 @@ 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 $(CLOSED)/lib/libelfsign; pwd; $(MAKE) EXPORT_SRC
@cd lib/libgss; pwd; $(MAKE) EXPORT_SRC
- @cd lib/libike; pwd; $(MAKE) EXPORT_SRC
+ @cd $(CLOSED)/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
@@ -230,11 +244,11 @@ 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 $(CLOSED)/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 $(CLOSED)/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
@@ -245,26 +259,26 @@ 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 $(CLOSED)/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 $(CLOSED)/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 $(CLOSED)/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/boston; pwd; $(MAKE) EXPORT_SRC
@cd uts/sun4u/seattle; 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 $(CLOSED)/uts/sun4u/lw2plus; pwd; $(MAKE) EXPORT_SRC
+ @cd $(CLOSED)/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 $(CLOSED)/uts/sun4v/io/ncp; pwd; $(MAKE) EXPORT_SRC
@cd pkgdefs; pwd; $(MAKE) EXPORT_SRC
$(RM) -r $(XMOD_DELETE_FILES)
$(RM) Targetdirs+
@@ -284,21 +298,22 @@ EXPORT_SRC:
$(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 $(CLOSED)/cmd/cmd-inet/usr.lib/in.iked; pwd; $(MAKE) CRYPT_SRC
+ @cd $(CLOSED)/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 $(CLOSED)/lib/libelfsign; pwd; $(MAKE) CRYPT_SRC
+ @cd $(CLOSED)/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 $(CLOSED)/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
diff --git a/usr/src/Makefile.lint b/usr/src/Makefile.lint
index 9f650e4a01..7d3743a70b 100644
--- a/usr/src/Makefile.lint
+++ b/usr/src/Makefile.lint
@@ -72,7 +72,6 @@ COMMON_SUBDIRS = \
cmd/cmd-inet/usr.bin \
cmd/cmd-inet/usr.lib/dsvclockd \
cmd/cmd-inet/usr.lib/in.dhcpd \
- cmd/cmd-inet/usr.lib/in.iked \
cmd/cmd-inet/usr.lib/in.mpathd \
cmd/cmd-inet/usr.lib/inetd \
cmd/cmd-inet/usr.lib/mipagent \
@@ -194,7 +193,6 @@ COMMON_SUBDIRS = \
cmd/pagesize \
cmd/passwd \
cmd/pathchk \
- cmd/pax \
cmd/pbind \
cmd/pcidr \
cmd/pfexec \
@@ -233,9 +231,7 @@ COMMON_SUBDIRS = \
cmd/rpcgen \
cmd/rpcsvc/rpc.bootparamd \
cmd/runat \
- cmd/sed_xpg4 \
cmd/setpgrp \
- cmd/smartcard \
cmd/smbios \
cmd/smserverd \
cmd/sort \
@@ -253,12 +249,10 @@ COMMON_SUBDIRS = \
cmd/syseventadm \
cmd/syseventd \
cmd/tabs \
- cmd/tail \
cmd/tee \
cmd/th_tools \
cmd/tip \
cmd/touch \
- cmd/tr \
cmd/truss \
cmd/tty \
cmd/uadmin \
@@ -296,7 +290,6 @@ COMMON_SUBDIRS = \
lib/libbsm \
lib/libc \
lib/libc_db \
- lib/libc_i18n \
lib/libcfgadm \
lib/libcmdutils \
lib/libcontract \
@@ -315,7 +308,6 @@ COMMON_SUBDIRS = \
lib/libdoor \
lib/libdtrace \
lib/libefi \
- lib/libelfsign \
lib/libexacct \
lib/libgen \
lib/libgss \
@@ -371,7 +363,6 @@ COMMON_SUBDIRS = \
lib/pam_modules \
lib/passwdutil \
lib/pkcs11 \
- lib/smartcard \
lib/fm \
lib/udapl \
psm \
@@ -386,6 +377,17 @@ COMMON_SUBDIRS = \
ucbcmd/users \
ucbcmd/whoami
+$(CLOSED_BUILD)COMMON_SUBDIRS += \
+ $(CLOSED)/cmd/cmd-inet/usr.lib/in.iked \
+ $(CLOSED)/cmd/pax \
+ $(CLOSED)/cmd/sed_xpg4 \
+ $(CLOSED)/cmd/smartcard \
+ $(CLOSED)/cmd/tail \
+ $(CLOSED)/cmd/tr \
+ $(CLOSED)/lib/libc_i18n \
+ $(CLOSED)/lib/libelfsign \
+ $(CLOSED)/lib/smartcard
+
i386_SUBDIRS= \
cmd/biosdev \
cmd/rtc \
@@ -395,7 +397,6 @@ sparc_SUBDIRS= \
cmd/datadm \
cmd/dcs \
cmd/fruadm \
- cmd/mtst \
cmd/prtfru \
cmd/sckmd \
cmd/wrsmconf \
@@ -404,6 +405,8 @@ sparc_SUBDIRS= \
lib/wrsm \
stand
+$(CLOSED_BUILD)sparc_SUBDIRS += $(CLOSED)/cmd/mtst
+
LINTSUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
.PARALLEL: $(LINTSUBDIRS)
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index 138c03e677..e09c244849 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -52,7 +52,13 @@ ROOT= /proto
#
# EXPORT_RELEASE_BUILD controls whether binaries are built in a form that
# can be released for export under a binary license. It is orthogonal to
-# the other *RELEASE_BUILD settings.
+# the other *RELEASE_BUILD settings. ("#" means do an export release
+# build, "" means do a normal build.)
+#
+# CLOSED_BUILD controls whether we try to build files under
+# usr/closed. ("" means to build closed code, "#" means don't try to
+# build it.) Skipping the closed code implies doing an export release
+# build.
#
# STRIP_COMMENTS toggles comment section striping. Generally the same setting
# as INTERNAL_RELEASE_BUILD.
@@ -73,11 +79,17 @@ CH= $(POUND_SIGN)
NOT_RELEASE_BUILD=
INTERNAL_RELEASE_BUILD= $(POUND_SIGN)
RELEASE_BUILD= $(POUND_SIGN)
-EXPORT_RELEASE_BUILD=
$(RELEASE_BUILD)NOT_RELEASE_BUILD= $(POUND_SIGN)
$(RELEASE_BUILD)INTERNAL_RELEASE_BUILD=
PATCH_BUILD= $(POUND_SIGN)
+# If CLOSED_IS_PRESENT is not set, assume the closed tree is present.
+CLOSED_BUILD_1= $(CLOSED_IS_PRESENT:yes=)
+CLOSED_BUILD= $(CLOSED_BUILD_1:no=$(POUND_SIGN))
+
+EXPORT_RELEASE_BUILD= $(POUND_SIGN)
+$(CLOSED_BUILD)EXPORT_RELEASE_BUILD=
+
# SPARC_BLD is '#' for an Intel build.
# INTEL_BLD is '#' for a Sparc build.
SPARC_BLD_1= $(MACH:i386=$(POUND_SIGN))
@@ -96,6 +108,10 @@ __GNUC= $(POUND_SIGN)
# setting.
__GNUC64= $(__GNUC)
+# CLOSED is the root of the tree that contains source which isn't released
+# as open source
+CLOSED= $(SRC)/../closed
+
# BUILD_TOOLS is the root of all tools including compilers.
# ONBLD_TOOLS is the root of all the tools that are part of SUNWonbld.
@@ -702,22 +718,21 @@ CTFCONVERT_O = $(CTFCONVERT) $(CTFCVTFLAGS) $@
ELFSIGN_O= $(TRUE)
ELFSIGN_CRYPTO= $(ELFSIGN_O)
ELFSIGN_OBJECT= $(ELFSIGN_O)
-# EXPORT DELETE START
-# Note: The setting of ELFSIGN_O, etc. to $(TRUE) above must stay outside
-# of the export src markers. The real setting for non source product builds
-# is inside the markers.
-# This is needed to reduce the amount of changes to Makefiles elsewhere
-# in the source tree (particularly in uts/{sparc,intel})
-ELFSIGN_O = $(ELFSIGN)
-ELFSIGN_KEY = $(SRC)/cmd/cmd-crypto/etc/keys/SUNWosnet
-ELFSIGN_CERT= $(SRC)/cmd/cmd-crypto/etc/certs/SUNWosnet
-ELFSIGN_SEKEY = $(SRC)/cmd/cmd-crypto/etc/keys/SUNWosnetSolaris
-ELFSIGN_SECERT= $(SRC)/cmd/cmd-crypto/etc/certs/SUNWosnetSolaris
-ELFSIGN_CRYPTO= $(ELFSIGN_O) sign $(ELFSIGN_FORMAT_OPTION) \
+$(EXPORT_RELEASE_BUILD)ELFSIGN_O = $(ELFSIGN)
+$(EXPORT_RELEASE_BUILD)ELFSIGN_KEY = \
+ $(CLOSED)/cmd/cmd-crypto/etc/keys/SUNWosnet
+$(EXPORT_RELEASE_BUILD)ELFSIGN_CERT= \
+ $(CLOSED)/cmd/cmd-crypto/etc/certs/SUNWosnet
+$(EXPORT_RELEASE_BUILD)ELFSIGN_SEKEY = \
+ $(CLOSED)/cmd/cmd-crypto/etc/keys/SUNWosnetSolaris
+$(EXPORT_RELEASE_BUILD)ELFSIGN_SECERT= \
+ $(CLOSED)/cmd/cmd-crypto/etc/certs/SUNWosnetSolaris
+$(EXPORT_RELEASE_BUILD)ELFSIGN_CRYPTO= $(ELFSIGN_O) sign \
+ $(ELFSIGN_FORMAT_OPTION) \
-k $(ELFSIGN_KEY) -c $(ELFSIGN_CERT) -e $@
-ELFSIGN_OBJECT= $(ELFSIGN_O) sign $(ELFSIGN_FORMAT_OPTION) \
+$(EXPORT_RELEASE_BUILD)ELFSIGN_OBJECT= $(ELFSIGN_O) sign \
+ $(ELFSIGN_FORMAT_OPTION) \
-k $(ELFSIGN_SEKEY) -c $(ELFSIGN_SECERT) -e $@
-# EXPORT DELETE END
# Rules (normally from make.rules) and macros which are used for post
# processing files. Normally, these do stripping of the comment section
diff --git a/usr/src/cmd/Makefile b/usr/src/cmd/Makefile
index fdfdf99d31..782f634907 100644
--- a/usr/src/cmd/Makefile
+++ b/usr/src/cmd/Makefile
@@ -130,7 +130,6 @@ COMMON_SUBDIRS= \
dispadmin \
dladm \
dmesg \
- dodatadm \
dtrace \
du \
dumpadm \
@@ -187,7 +186,6 @@ COMMON_SUBDIRS= \
head \
hostid \
hostname \
- iconv \
id \
infocmp \
init \
@@ -206,7 +204,6 @@ COMMON_SUBDIRS= \
keyserv \
killall \
krb5 \
- ksh \
kstat \
last \
lastcomm \
@@ -215,10 +212,8 @@ COMMON_SUBDIRS= \
line \
link \
listen \
- llc2 \
loadkeys \
locale \
- localedef \
lockstat \
locator \
lofiadm \
@@ -246,7 +241,6 @@ COMMON_SUBDIRS= \
mktemp \
modload \
more \
- more_xpg4 \
msgfmt \
msgid \
mt \
@@ -267,19 +261,15 @@ COMMON_SUBDIRS= \
nscd \
oamuser \
oawk \
- od \
openssl \
pack \
pagesize \
passmgmt \
passwd \
paste \
- patch \
pathchk \
- pax \
pbind \
pcidr \
- pcitool \
pcmciad \
pfexec \
pgrep \
@@ -293,7 +283,6 @@ COMMON_SUBDIRS= \
pr \
prctl \
print \
- printf \
priocntl \
profiles \
projadd \
@@ -336,8 +325,6 @@ COMMON_SUBDIRS= \
savecore \
script \
sdiff \
- sed \
- sed_xpg4 \
sendmail \
setfacl \
setmnt \
@@ -346,7 +333,6 @@ COMMON_SUBDIRS= \
sgs \
sh \
sleep \
- smartcard \
smbios \
smserverd \
soelim \
@@ -370,7 +356,6 @@ COMMON_SUBDIRS= \
syseventadm \
syslogd \
tabs \
- tail \
tar \
tbl \
tcopy \
@@ -385,8 +370,6 @@ COMMON_SUBDIRS= \
touch \
tplot \
tput \
- tr \
- tr_xpg4 \
trapstat \
troff \
true \
@@ -434,6 +417,25 @@ COMMON_SUBDIRS= \
zpool \
ztest
+$(CLOSED_BUILD)COMMON_SUBDIRS += \
+ $(CLOSED)/cmd/dodatadm \
+ $(CLOSED)/cmd/iconv \
+ $(CLOSED)/cmd/ksh \
+ $(CLOSED)/cmd/llc2 \
+ $(CLOSED)/cmd/localedef \
+ $(CLOSED)/cmd/more_xpg4 \
+ $(CLOSED)/cmd/od \
+ $(CLOSED)/cmd/patch \
+ $(CLOSED)/cmd/pax \
+ $(CLOSED)/cmd/pcitool \
+ $(CLOSED)/cmd/printf \
+ $(CLOSED)/cmd/sed \
+ $(CLOSED)/cmd/sed_xpg4 \
+ $(CLOSED)/cmd/smartcard \
+ $(CLOSED)/cmd/tail \
+ $(CLOSED)/cmd/tr \
+ $(CLOSED)/cmd/tr_xpg4
+
i386_SUBDIRS= \
addbadsec \
biosdev \
@@ -445,9 +447,9 @@ sparc_SUBDIRS= \
cvcd \
dcs \
fruadm \
- mtst \
+ $(CLOSED)/cmd/mtst \
prtfru \
- scadm \
+ $(CLOSED)/cmd/scadm \
sckmd \
sf880drd \
stmsboot \
@@ -545,19 +547,15 @@ MSGSUBDIRS= \
halt \
head \
hostname \
- iconv \
id \
isaexec \
join \
krb5 \
- ksh \
kstat \
last \
ldap \
ldapcachemgr \
- llc2 \
locale \
- localedef \
lofiadm \
logadm \
logger \
@@ -571,7 +569,6 @@ MSGSUBDIRS= \
mkpwdict \
mktemp \
more \
- more_xpg4 \
msgfmt \
mv \
newgrp \
@@ -580,14 +577,11 @@ MSGSUBDIRS= \
nispasswd \
nohup \
oawk \
- od \
pack \
passwd \
passmgmt \
paste \
- patch \
pathchk \
- pax \
pfexec \
pg \
pgrep \
@@ -597,7 +591,6 @@ MSGSUBDIRS= \
pr \
praudit \
print \
- printf \
profiles \
projadd \
projects \
@@ -618,11 +611,8 @@ MSGSUBDIRS= \
rm \
rmdir \
rmformat \
- scadm \
script \
sdiff \
- sed \
- sed_xpg4 \
sgs \
sh \
sleep \
@@ -637,7 +627,6 @@ MSGSUBDIRS= \
syseventadm \
syseventd \
tabs \
- tail \
tar \
tbl \
tee \
@@ -645,8 +634,6 @@ MSGSUBDIRS= \
tnf \
touch \
tput \
- tr \
- tr_xpg4 \
troff \
tty \
ttymon \
@@ -679,6 +666,23 @@ MSGSUBDIRS= \
zonename \
zpool
+$(CLOSED_BUILD)MSGSUBDIRS += \
+ $(CLOSED)/cmd/iconv \
+ $(CLOSED)/cmd/ksh \
+ $(CLOSED)/cmd/llc2 \
+ $(CLOSED)/cmd/localedef \
+ $(CLOSED)/cmd/more_xpg4 \
+ $(CLOSED)/cmd/od \
+ $(CLOSED)/cmd/patch \
+ $(CLOSED)/cmd/pax \
+ $(CLOSED)/cmd/printf \
+ $(CLOSED)/cmd/scadm \
+ $(CLOSED)/cmd/sed \
+ $(CLOSED)/cmd/sed_xpg4 \
+ $(CLOSED)/cmd/tail \
+ $(CLOSED)/cmd/tr \
+ $(CLOSED)/cmd/tr_xpg4
+
sparc_MSGSUBDIRS= \
fruadm \
prtfru \
@@ -694,7 +698,6 @@ DCSUBDIRS= \
cfgadm \
diff \
ls \
- pax \
pr \
tar \
w \
@@ -702,6 +705,9 @@ DCSUBDIRS= \
whodo \
write
+$(CLOSED_BUILD)DCSUBDIRS += \
+ $(CLOSED)/cmd/pax
+
#
# commands that belong only to the basic security module
#
diff --git a/usr/src/cmd/agents/Makefile b/usr/src/cmd/agents/Makefile
index b695e9d803..b1ef20e22a 100644
--- a/usr/src/cmd/agents/Makefile
+++ b/usr/src/cmd/agents/Makefile
@@ -20,8 +20,8 @@
# CDDL HEADER END
#
#
-# Copyright (c) 1998, 2001 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -65,14 +65,27 @@ TARG_SYS:sh = \
ROOTDIR : sh=echo ${ROOTDIR:-"`pwd`"}
PKGLOC : sh=echo ${PKGLOC:-'${ROOTDIR}/PACKAGES.`uname -p`'}
+$(CLOSED_BUILD)DMI= $(CLOSED)/cmd/agents/dmi2.0
+$(CLOSED_BUILD)AGENTS= $(CLOSED)/cmd/agents/agents
+
+all := TARGET = all
+clean := TARGET = clean
+install := TARGET = install
+lint := TARGET = lint
+realclobber := TARGET = realclobber
+
+SUBDIRS = snmp $(DMI) $(AGENTS)
+
#
# all
#
-all:
- cd snmp; $(MAKE) all
- cd dmi2.0; $(MAKE) all
- cd agents; $(MAKE) all
+all: $(SUBDIRS)
+
+$(SUBDIRS): FRC
+ @cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
DIRMODE= 0755
OWNER= root
@@ -101,34 +114,21 @@ $(ROOTDIRS):
# Need a "make install" target for integrating into Solaris 2.6.
#
-install: $(ROOTDIRS)
- cd snmp; $(MAKE) install
- cd dmi2.0; $(MAKE) install
- cd agents; $(MAKE) install
-
+install: $(ROOTDIRS) $(SUBDIRS)
#
# clean
#
-clean:
- cd snmp; $(MAKE) clean
- cd dmi2.0; $(MAKE) clean
- cd agents; $(MAKE) clean
+clean: $(SUBDIRS)
# Need a lint target for Solaris2.6 integration.
-lint:
- cd snmp; $(MAKE) lint
- cd dmi2.0; $(MAKE) lint
- cd agents; $(MAKE) lint
+lint: $(SUBDIRS)
# We need a real make clobber with sccs clean.
-realclobber:
- cd snmp; $(MAKE) realclobber
- cd dmi2.0; $(MAKE) realclobber
- cd agents; $(MAKE) realclobber
+realclobber: $(SUBDIRS)
package:
cd ../../pkgdefs; pwd; $(MAKE) awk_pkginfo
diff --git a/usr/src/cmd/cmd-crypto/Makefile b/usr/src/cmd/cmd-crypto/Makefile
index 0910f37fe1..f02549ce64 100644
--- a/usr/src/cmd/cmd-crypto/Makefile
+++ b/usr/src/cmd/cmd-crypto/Makefile
@@ -20,25 +20,30 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
+include ../Makefile.cmd
+
SUBDIRS1 = \
cryptoadm \
decrypt \
digest \
- elfsign \
- kcfd \
pktool
+$(CLOSED_BUILD)SUBDIRS1 += \
+ $(CLOSED)/cmd/cmd-crypto/elfsign \
+ $(CLOSED)/cmd/cmd-crypto/kcfd
+
SUBDIRS2 = \
etc \
scripts
-include ../Makefile.cmd
+$(CLOSED_BUILD)SUBDIRS2 += \
+ $(CLOSED)/cmd/cmd-crypto/etc
all:= TARGET= all
install:= TARGET= install
diff --git a/usr/src/cmd/cmd-crypto/etc/Makefile b/usr/src/cmd/cmd-crypto/etc/Makefile
index f3d9a1ddd0..76cdfbd320 100644
--- a/usr/src/cmd/cmd-crypto/etc/Makefile
+++ b/usr/src/cmd/cmd-crypto/etc/Makefile
@@ -38,22 +38,12 @@ ETCCERTSFILES = \
$(RELEASECERTS) \
SUNWSolarisCA
-# EXPORT DELETE START
-# CRYPT DELETE START
-
-ETCCRYPTOFILES += certs/SUNWosnet
-ETCCERTSFILES += SUNWosnetSolaris
-
-# CRYPT DELETE END
-# EXPORT DELETE END
-
include ../../Makefile.cmd
.KEEP_STATE:
ROOTCRYPTODIR= $(ROOT)/etc/crypto
ROOTCRYPTOCERTSDIR= $(ROOTCRYPTODIR)/certs
-ROOTCRYPTOCRLSDIR= $(ROOTCRYPTODIR)/crls
ROOTETCCERTSDIR= $(ROOT)/etc/certs
@@ -73,7 +63,7 @@ $(RELEASECERTS:%=$(ROOTCRYPTODIR)/certs/%): \
$(INS) -s -m $(FILEMODE) -f $(@D) \
certs/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%)
$(MV) $(@D)/$(@F:SUNW_SunOS_5.%=SUNWCryptographic%) $@
-
+
$(ROOTETCCERTSDIR)/%: certs/%
$(INS.file)
$(RELEASECERTS:%=$(ROOTETCCERTSDIR)/%): \
@@ -91,14 +81,3 @@ $(IETCCERTSFILES):= OWNER= root
$(IETCCERTSFILES):= GROUP= sys
install: $(IETCCRYPTOFILES) $(IETCCERTSFILES)
-
-# EXPORT DELETE START
-
-EXPORT_SRC:
- $(RM) Makefile+
- $(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
- < Makefile > Makefile+
- $(MV) -f Makefile+ Makefile
- $(CHMOD) 444 Makefile
-
-# EXPORT DELETE END
diff --git a/usr/src/cmd/cmd-inet/usr.lib/Makefile b/usr/src/cmd/cmd-inet/usr.lib/Makefile
index 11a80bfa6b..7b4051f68c 100644
--- a/usr/src/cmd/cmd-inet/usr.lib/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.lib/Makefile
@@ -20,19 +20,24 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
-SUBDIRS= dhcp dsvclockd ike-certutils in.chargend in.daytimed \
- in.discardd in.echod in.dhcpd in.iked in.mpathd in.ndpd \
+SUBDIRS= dhcp dsvclockd in.chargend in.daytimed \
+ in.discardd in.echod in.dhcpd in.mpathd in.ndpd \
in.ripngd in.timed inetd mipagent ncaconfd pppoe slpd wanboot
+
MSGSUBDIRS= dsvclockd in.dhcpd inetd ncaconfd wanboot
include ../../Makefile.cmd
+$(CLOSED_BUILD)SUBDIRS += \
+ $(CLOSED)/cmd/cmd-inet/usr.lib/ike-certutils \
+ $(CLOSED)/cmd/cmd-inet/usr.lib/in.iked \
+
POFILES= dsvclockd/dsvclockd.po in.dhcpd/in.dhcpd.po \
inetd/inetd.po ncaconfd/ncaconfd.po \
wanboot/wanboot.po
@@ -54,7 +59,7 @@ _msg: $(MSGSUBDIRS)
#
# The reason this rule checks for the existence of the
# Makefile is that some of the directories do not exist
-# in our exportable source builds.
+# in our exportable source builds or in OpenSolaris.
#
$(SUBDIRS): FRC
@if [ -f $@/Makefile ]; then \
diff --git a/usr/src/cmd/fs.d/nfs/Makefile b/usr/src/cmd/fs.d/nfs/Makefile
index bb1734b14c..13dcc0d5b4 100644
--- a/usr/src/cmd/fs.d/nfs/Makefile
+++ b/usr/src/cmd/fs.d/nfs/Makefile
@@ -22,7 +22,7 @@
#
#ident "%Z%%M% %I% %E% SMI"
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# cmd/fs.d/nfs/Makefile
@@ -31,12 +31,15 @@
# whose executable reside in $(INSDIR1) and $(INSDIR2).
#
+include $(SRC)/Makefile.master
+
SUBDIR1= exportfs nfsd rquotad unshare \
statd nfsstat mountd dfshares \
nfsfind nfs4cbd
-SUBDIR2= clear_locks lockd umount showmount \
+SUBDIR2= clear_locks umount showmount \
share mount dfmounts nfslog nfsmapid \
sysidnfs4
+
SUBDIR3= etc svc
SUBDIRS= $(SUBDIR1) $(SUBDIR2) $(SUBDIR3)
@@ -45,6 +48,11 @@ SUBDIRS= $(SUBDIR1) $(SUBDIR2) $(SUBDIR3)
POFILES= $(SUBDIR2:%=%/%.po)
POFILE= nfs.po
+LOCKD= $(CLOSED)/cmd/fs.d/nfs/lockd
+$(CLOSED_BUILD)CLOSED_SUBDIR2= $(LOCKD)
+$(CLOSED_BUILD)POFILES += $(LOCKD)/lockd.po
+$(CLOSED_BUILD)SUBDIRS += $(CLOSED_SUBDIR2)
+
all:= TARGET= all
install:= TARGET= install
clean:= TARGET= clean
@@ -58,7 +66,7 @@ catalog:= TARGET= catalog
all install clean clobber lint: $(SUBDIRS)
-catalog: $(SUBDIR2)
+catalog: $(SUBDIR2) $(CLOSED_SUBDIR2)
$(RM) $(POFILE)
cat $(POFILES) > $(POFILE)
diff --git a/usr/src/cmd/man/src/util/Makefile b/usr/src/cmd/man/src/util/Makefile
index 101f539179..c69a94dcdb 100644
--- a/usr/src/cmd/man/src/util/Makefile
+++ b/usr/src/cmd/man/src/util/Makefile
@@ -22,16 +22,16 @@
#
# ident "%Z%%M% %I% %E% SMI"
#
-# Copyright (c) 1989,1998,2001 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
include ../../../Makefile.cmd
BINPROG = nsgmls instant
-SGMLUTILDOCBOOKDIR = docbook
-SGMLUTILSOLBOOKV1DIR = solbookv1
+SGMLUTILDOCBOOKDIR = $(CLOSED)/cmd/man/src/util/docbook
+SGMLUTILSOLBOOKV1DIR = $(CLOSED)/cmd/man/src/util/solbookv1
SGMLUTILSOLBOOKV2DIR = solbookv2
LIBSHELL = sgml2roff
@@ -100,8 +100,8 @@ TPTDIR = $(ROOTSHLIB)/sgml/locale/C/transpec
ROOTPROG = $(BINPROG:%=$(PROGDIR)/%)
ROOTLIBSHELL = $(LIBSHELL:%=$(PROGDIR)/%)
ROOTENTS = $(SGMLENTS:%=$(SGMLENTSDIR)/%)
-ROOTDOCBOOK = $(DOCBOOKDTD:%=$(DOCBOOKDIR)/%)
-ROOTSOLBOOKV1 = $(SOLBOOKV1:%=$(SOLBOOKV1DIR)/%)
+$(CLOSED_BUILD)ROOTDOCBOOK = $(DOCBOOKDTD:%=$(DOCBOOKDIR)/%)
+$(CLOSED_BUILD)ROOTSOLBOOKV1 = $(SOLBOOKV1:%=$(SOLBOOKV1DIR)/%)
ROOTSOLBOOKV2 = $(SOLBOOKV2:%=$(SOLBOOKV2DIR)/%)
ROOTCATALOG = $(CATALOG:%=$(SGMLDTDDIR)/%)
ROOTTPT = $(TPTFILES:%=$(TPTDIR)/%)
diff --git a/usr/src/cmd/mdb/Makefile.common b/usr/src/cmd/mdb/Makefile.common
index 7befb7e3a2..01dbdd391a 100644
--- a/usr/src/cmd/mdb/Makefile.common
+++ b/usr/src/cmd/mdb/Makefile.common
@@ -65,7 +65,6 @@ COMMON_MODULES_KVM = \
md \
mpxio \
nca \
- nfs \
ptm \
random \
s1394 \
@@ -76,3 +75,8 @@ COMMON_MODULES_KVM = \
ufs_log \
usba \
zfs
+
+CLOSED_COMMON_MODULES_KVM = \
+ nfs
+
+include $(SRC)/Makefile.master
diff --git a/usr/src/cmd/mdb/intel/amd64/Makefile b/usr/src/cmd/mdb/intel/amd64/Makefile
index cfc626926f..a06e20df55 100644
--- a/usr/src/cmd/mdb/intel/amd64/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/Makefile
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -29,6 +29,9 @@ include ../../Makefile.common
MODULES = $(COMMON_MODULES_PROC) $(COMMON_MODULES_KVM) uhci
+$(CLOSED_BUILD)MODULES += \
+ $(CLOSED_COMMON_MODULES_KVM:%=$(CLOSED)/cmd/mdb/intel/amd64/%)
+
SUBDIRS = mdb mdb_ks kmdb libstandctf libstand .WAIT $(MODULES)
include ../../Makefile.subdirs
diff --git a/usr/src/cmd/mdb/intel/ia32/Makefile b/usr/src/cmd/mdb/intel/ia32/Makefile
index ab00bb3f7e..d7883caabb 100644
--- a/usr/src/cmd/mdb/intel/ia32/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/Makefile
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -30,6 +30,9 @@ include ../../Makefile.common
MODULES = $(COMMON_MODULES_PROC) $(COMMON_MODULES_PROC_32BIT) \
$(COMMON_MODULES_KVM) uhci
+$(CLOSED_BUILD)MODULES += \
+ $(CLOSED_COMMON_MODULES_KVM:%=$(CLOSED)/cmd/mdb/intel/ia32/%)
+
SUBDIRS = mdb mdb_ks kmdb libstandctf libstand .WAIT $(MODULES)
include ../../Makefile.subdirs
diff --git a/usr/src/cmd/mdb/sparc/v7/Makefile b/usr/src/cmd/mdb/sparc/v7/Makefile
index f1a2dad51e..683d7a12da 100644
--- a/usr/src/cmd/mdb/sparc/v7/Makefile
+++ b/usr/src/cmd/mdb/sparc/v7/Makefile
@@ -29,8 +29,9 @@ include ../../Makefile.common
MODULES = \
$(COMMON_MODULES_PROC) \
- $(COMMON_MODULES_PROC_32BIT) \
- sparcdis
+ $(COMMON_MODULES_PROC_32BIT)
+
+$(CLOSED_BUILD)MODULES += $(CLOSED)/cmd/mdb/sparc/v7/sparcdis
SUBDIRS = mdb $(MODULES)
diff --git a/usr/src/cmd/mdb/sparc/v9/Makefile b/usr/src/cmd/mdb/sparc/v9/Makefile
index 8cfd34583e..ac9fc4f12e 100644
--- a/usr/src/cmd/mdb/sparc/v9/Makefile
+++ b/usr/src/cmd/mdb/sparc/v9/Makefile
@@ -31,11 +31,15 @@ MODULES = \
$(COMMON_MODULES_PROC) \
$(COMMON_MODULES_KVM) \
intr \
- isp \
sd \
- sparcdis \
ssd
+$(CLOSED_BUILD)MODULES += \
+ $(CLOSED_COMMON_MODULES_KVM:%=$(CLOSED)/cmd/mdb/sparc/v9/%)
+$(CLOSED_BUILD)MODULES += \
+ $(CLOSED)/cmd/mdb/sparc/v9/isp \
+ $(CLOSED)/cmd/mdb/sparc/v9/sparcdis
+
#
# a "$(MODULES): kmdb" rule would seem to do the trick but, for some reason,
# it serializes $(MODULES).
diff --git a/usr/src/cmd/mdb/sun4u/modules/Makefile b/usr/src/cmd/mdb/sun4u/modules/Makefile
index 6e17808959..f02539298f 100644
--- a/usr/src/cmd/mdb/sun4u/modules/Makefile
+++ b/usr/src/cmd/mdb/sun4u/modules/Makefile
@@ -20,10 +20,18 @@
# CDDL HEADER END
#
#
-# Copyright (c) 1998-2001 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
-SUBDIRS = unix lw8 serengeti wrsm wrsmd
+include $(SRC)/Makefile.master
+
+CLOSED_SUN4UMOD = $(CLOSED)/cmd/mdb/sun4u/modules
+
+SUBDIRS = unix wrsm
+
+$(CLOSED_BUILD)SUBDIRS += $(CLOSED_SUN4UMOD)/lw8 $(CLOSED_SUN4UMOD)/serengeti \
+ $(CLOSED_SUN4UMOD)/wrsmd
+
include ../../Makefile.subdirs
diff --git a/usr/src/cmd/perl/5.6.1/contrib/Makefile b/usr/src/cmd/perl/5.6.1/contrib/Makefile
index d587407bb1..37d8c9e8c9 100644
--- a/usr/src/cmd/perl/5.6.1/contrib/Makefile
+++ b/usr/src/cmd/perl/5.6.1/contrib/Makefile
@@ -41,13 +41,14 @@ SUN_SOLARIS = Sun/Solaris
PERL_DYNAMIC_EXT = \
$(SUN_SOLARIS)/Utils \
$(SUN_SOLARIS)/Intrs \
- $(SUN_SOLARIS)/Kstat \
$(SUN_SOLARIS)/Project \
$(SUN_SOLARIS)/Task \
$(SUN_SOLARIS)/Exacct \
$(SUN_SOLARIS)/Privilege \
$(SUN_SOLARIS)/Ucred
+CLOSED_PERL_EXT += $(SUN_SOLARIS)/Kstat
+
# Add any pure-perl extensions here.
PERL_NONXS_EXT = \
$(SUN_SOLARIS)/BSM \
@@ -56,15 +57,26 @@ PERL_NONXS_EXT = \
PERL_EXT = $(PERL_DYNAMIC_EXT) $(PERL_NONXS_EXT)
PERL_EXT_MAKEFILES = $(PERL_EXT:%=%/Makefile)
-all: copy_contrib $(PERL_EXT_MAKEFILES) $(PERL_EXT)
+ALL_EXT = $(PERL_EXT)
+ALL_EXT_MAKEFILES = $(PERL_EXT_MAKEFILES)
+
+$(CLOSED_BUILD)ALL_EXT += $(CLOSED_PERL_EXT)
+$(CLOSED_BUILD)ALL_EXT_MAKEFILES += $(CLOSED_PERL_EXT:%=%/Makefile)
+
+all: copy_contrib $(ALL_EXT_MAKEFILES) $(ALL_EXT)
-.PARALLEL: $(PERL_EXT_MAKEFILES) $(PERL_EXT)
+.PARALLEL: $(ALL_EXT_MAKEFILES) $(ALL_EXT)
#
# copy_contrib copies the clearfiles from ../../contrib to here.
#
copy_contrib: ../../contrib/copy_contrib
@ ../../contrib/copy_contrib ../../contrib . $(PERL_EXT)
+ @ if [ -d $(CLOSED)/cmd/perl/contrib -a \
+ -n "$(CLOSED_PERL_EXT)" ]; then \
+ ../../contrib/copy_contrib $(CLOSED)/cmd/perl/contrib \
+ . $(CLOSED_PERL_EXT); \
+ fi
#
# Note: this is a dummy install target; during 'make all' this Makefile
@@ -76,7 +88,7 @@ install: all
clean:
-@ $(PERL_MM_ENV); \
- for ext in $(PERL_EXT); do \
+ for ext in $(ALL_EXT); do \
if [ -d $$ext ]; then \
( \
cd $$ext; pwd; \
@@ -89,7 +101,7 @@ clean:
clobber:
-@ $(PERL_MM_ENV); \
- for ext in $(PERL_EXT); do \
+ for ext in $(ALL_EXT); do \
if [ -d $$ext ]; then \
( \
cd $$ext; pwd; \
@@ -104,7 +116,7 @@ clobber:
test: all
-@ $(PERL_MM_ENV); \
LD_LIBRARY_PATH=$(PERL_DISTRIB); export LD_LIBRARY_PATH; \
- for ext in $(PERL_EXT); do \
+ for ext in $(ALL_EXT); do \
( \
cd $$ext; pwd; \
[ -f Makefile.old ] && mf=Makefile.old; \
diff --git a/usr/src/cmd/perl/5.6.1/req.flg b/usr/src/cmd/perl/5.6.1/req.flg
index 999530f879..60b9dbb76b 100644
--- a/usr/src/cmd/perl/5.6.1/req.flg
+++ b/usr/src/cmd/perl/5.6.1/req.flg
@@ -1,8 +1,8 @@
#!/bin/sh
#
-# Copyright (c) 2001 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
#
@@ -12,6 +12,7 @@
#
find_files "s.*" usr/src/cmd/perl/contrib
+find_files "s.*" usr/closed/cmd/perl/contrib
echo_file usr/src/lib/Makefile.lib
echo_file usr/src/lib/Makefile.targ
find_files "s.*" usr/src/lib/common
diff --git a/usr/src/cmd/perl/5.8.4/contrib/Makefile b/usr/src/cmd/perl/5.8.4/contrib/Makefile
index 24b3325500..c0b9d67199 100644
--- a/usr/src/cmd/perl/5.8.4/contrib/Makefile
+++ b/usr/src/cmd/perl/5.8.4/contrib/Makefile
@@ -45,13 +45,14 @@ SUN_SOLARIS = Sun/Solaris
PERL_DYNAMIC_EXT = \
$(SUN_SOLARIS)/Utils \
$(SUN_SOLARIS)/Intrs \
- $(SUN_SOLARIS)/Kstat \
$(SUN_SOLARIS)/Project \
$(SUN_SOLARIS)/Task \
$(SUN_SOLARIS)/Exacct \
$(SUN_SOLARIS)/Privilege \
$(SUN_SOLARIS)/Ucred
+CLOSED_PERL_EXT += $(SUN_SOLARIS)/Kstat
+
# Add any pure-perl extensions here.
PERL_NONXS_EXT = \
$(SUN_SOLARIS)/BSM \
@@ -60,9 +61,15 @@ PERL_NONXS_EXT = \
PERL_EXT = $(PERL_DYNAMIC_EXT) $(PERL_NONXS_EXT)
PERL_EXT_MAKEFILES = $(PERL_EXT:%=%/Makefile)
-all: copy_contrib $(PERL_EXT_MAKEFILES) $(PERL_EXT)
+ALL_EXT = $(PERL_EXT)
+ALL_EXT_MAKEFILES = $(PERL_EXT_MAKEFILES)
+
+$(CLOSED_BUILD)ALL_EXT += $(CLOSED_PERL_EXT)
+$(CLOSED_BUILD)ALL_EXT_MAKEFILES += $(CLOSED_PERL_EXT:%=%/Makefile)
+
+all: copy_contrib $(ALL_EXT_MAKEFILES) $(ALL_EXT)
-.PARALLEL: $(PERL_EXT_MAKEFILES) $(PERL_EXT)
+.PARALLEL: $(ALL_EXT_MAKEFILES) $(ALL_EXT)
#
# Note: this is a dummy install target; during 'make all' this Makefile
@@ -77,10 +84,15 @@ install: all
#
copy_contrib: ../../contrib/copy_contrib
@ ../../contrib/copy_contrib ../../contrib . $(PERL_EXT)
+ @ if [ -d $(CLOSED)/cmd/perl/contrib -a \
+ -n "$(CLOSED_PERL_EXT)" ]; then \
+ ../../contrib/copy_contrib $(CLOSED)/cmd/perl/contrib \
+ . $(CLOSED_PERL_EXT); \
+ fi
clean:
-@ $(PERL_MM_ENV); \
- for ext in $(PERL_EXT); do \
+ for ext in $(ALL_EXT); do \
if [ -d $$ext ]; then \
( \
cd $$ext; pwd; \
@@ -93,7 +105,7 @@ clean:
clobber:
-@ $(PERL_MM_ENV); \
- for ext in $(PERL_EXT); do \
+ for ext in $(ALL_EXT); do \
if [ -d $$ext ]; then \
( \
cd $$ext; pwd; \
@@ -107,7 +119,7 @@ clobber:
test: all
@ $(PERL_MM_ENV); $(PERL_LD_ENV); \
- for ext in $(PERL_EXT); do \
+ for ext in $(ALL_EXT); do \
( \
cd $$ext; pwd; \
[ -f Makefile.old ] && mf=Makefile.old; \
diff --git a/usr/src/cmd/perl/5.8.4/req.flg b/usr/src/cmd/perl/5.8.4/req.flg
index 6c670b3036..60b9dbb76b 100644
--- a/usr/src/cmd/perl/5.8.4/req.flg
+++ b/usr/src/cmd/perl/5.8.4/req.flg
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -12,6 +12,7 @@
#
find_files "s.*" usr/src/cmd/perl/contrib
+find_files "s.*" usr/closed/cmd/perl/contrib
echo_file usr/src/lib/Makefile.lib
echo_file usr/src/lib/Makefile.targ
find_files "s.*" usr/src/lib/common
diff --git a/usr/src/cmd/picl/plugins/sun4u/Makefile b/usr/src/cmd/picl/plugins/sun4u/Makefile
index 5ddfe3c36c..64a13de8cb 100644
--- a/usr/src/cmd/picl/plugins/sun4u/Makefile
+++ b/usr/src/cmd/picl/plugins/sun4u/Makefile
@@ -29,15 +29,23 @@
# cmd/picl/plugins/sun4u/Makefile
#
+include $(SRC)/Makefile.master
+
+CLOSED_SUN4U=$(CLOSED)/cmd/picl/plugins/sun4u
+
SUBDIRS= lib .WAIT envmon .WAIT \
frudata grover excalibur psvc littleneck daktari \
- cherrystone lw8 lw2plus taco enchilada chicago blade mpxu ents \
+ cherrystone lw2plus taco enchilada chicago blade mpxu ents \
chalupa silverstone sebring snowbird schumacher seattle boston .WAIT
+$(CLOSED_BUILD)SUBDIRS += $(CLOSED_SUN4U)/lw8
+
MSGSUBDIRS= lib frudata grover excalibur psvc littleneck daktari \
- cherrystone lw8 lw2plus taco enchilada chicago blade envmon mpxu ents \
+ cherrystone lw2plus taco enchilada chicago blade envmon mpxu ents \
silverstone sebring snowbird
+$(CLOSED_BUILD)MSGSUBDIRS += $(CLOSED_SUN4U)/lw8
+
all := TARGET= all
install := TARGET= install
clean := TARGET= clean
diff --git a/usr/src/cmd/prtdiag/Makefile.com b/usr/src/cmd/prtdiag/Makefile.com
index efc9462c39..d67881e38a 100644
--- a/usr/src/cmd/prtdiag/Makefile.com
+++ b/usr/src/cmd/prtdiag/Makefile.com
@@ -42,6 +42,8 @@ LINTFILES = $(OBJS:%.o=%.ln)
POFILE = prtdiag_$(PLATFORM).po
POFILES = $(OBJS:%.o=%.po)
+$(CLOSED_BUILD)LIBPRTDIAG = $(CLOSED)/lib/libprtdiag
+
.PARALLEL: $(OBJS) $(LINTFILES)
%.o: %.c
diff --git a/usr/src/cmd/prtdiag/Makefile.targ b/usr/src/cmd/prtdiag/Makefile.targ
index 59e3072099..4cc5938f24 100644
--- a/usr/src/cmd/prtdiag/Makefile.targ
+++ b/usr/src/cmd/prtdiag/Makefile.targ
@@ -42,5 +42,8 @@ $(POFILE): $(POFILES)
$(RM) $@
cat $(POFILES) > $@
+$(LIBPRTDIAG):
+ cd $(LIBPRTDIAG); pwd; $(MAKE) install
+
include $(SRCDIR)/../Makefile.targ
include $(SRCDIR)/../../Makefile.psm.targ
diff --git a/usr/src/cmd/prtdiag/sparc/sun4u/Makefile b/usr/src/cmd/prtdiag/sparc/sun4u/Makefile
index 23425edb20..17f6f71ac7 100644
--- a/usr/src/cmd/prtdiag/sparc/sun4u/Makefile
+++ b/usr/src/cmd/prtdiag/sparc/sun4u/Makefile
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 1995, 1999-2002 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -46,9 +46,6 @@ LINTFLAGS += -u
.KEEP_STATE:
-all: libprtdiag $(PROG)
-
-libprtdiag:
- cd $(SRCDIR)/../../lib/libprtdiag ; $(MAKE) install
+all: $(LIBPRTDIAG) $(PROG)
include $(SRCDIR)/Makefile.targ
diff --git a/usr/src/cmd/prtdiag/sparc/sun4v/Makefile b/usr/src/cmd/prtdiag/sparc/sun4v/Makefile
index 03b62bbabe..04deb33a76 100644
--- a/usr/src/cmd/prtdiag/sparc/sun4v/Makefile
+++ b/usr/src/cmd/prtdiag/sparc/sun4v/Makefile
@@ -46,9 +46,6 @@ LINTFLAGS += -u
.KEEP_STATE:
-all: libprtdiag $(PROG)
-
-libprtdiag:
- cd $(SRCDIR)/../../lib/libprtdiag ; $(MAKE) install
+all: $(LIBPRTDIAG) $(PROG)
include $(SRCDIR)/Makefile.targ
diff --git a/usr/src/cmd/sgs/Makefile b/usr/src/cmd/sgs/Makefile
index 9e5c8fbcaf..59e83194fe 100644
--- a/usr/src/cmd/sgs/Makefile
+++ b/usr/src/cmd/sgs/Makefile
@@ -55,7 +55,6 @@ SUBDIRS-common= libconv \
pvs \
crle \
ar \
- dis \
dump \
elfdump \
error \
@@ -76,6 +75,8 @@ SUBDIRS-common= libconv \
unifdef \
yacc
+$(CLOSED_BUILD)SUBDIRS-common += $(CLOSED)/cmd/sgs/dis
+
SUBDIRS-i386=
SUBDIRS-sparc= rtld.4.x
diff --git a/usr/src/cmd/sgs/packages/inc.flg b/usr/src/cmd/sgs/packages/inc.flg
index f96252306d..d104e2e4dc 100644
--- a/usr/src/cmd/sgs/packages/inc.flg
+++ b/usr/src/cmd/sgs/packages/inc.flg
@@ -73,6 +73,7 @@ echo_file usr/src/head/rtld_db.h
echo_file usr/src/head/apptrace.h
echo_file usr/src/head/apptrace_impl.h
echo_file usr/src/uts/common/sys/Makefile
+echo_file usr/closed/uts/common/sys/Makefile
echo_file usr/src/uts/Makefile.uts
echo_file usr/src/uts/common/krtld/reloc.h
echo_file usr/src/uts/common/sys/auxv.h
diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile
index fc0ae46d34..02f2039133 100644
--- a/usr/src/lib/Makefile
+++ b/usr/src/lib/Makefile
@@ -45,13 +45,24 @@ include ../Makefile.master
#
.PARALLEL:
+#
+# The $(CLOSED_BUILD) additions to SUBDIRS & MSGSUBDIRS are unfortunate,
+# but required due to the "dependencies" of using .WAIT to barrier the
+# parallel dmake builds. once 4631488 has been fixed, they can be
+# consolidated into one $(CLOSED_BUILD)SUBDIRS += (all closed libs) as
+# shown in HDRSUBDIRS
+#
SUBDIRS= \
common .WAIT \
abi/apptrace .WAIT \
../cmd/abi/spectrans .WAIT \
../cmd/sgs/libconv \
- ../cmd/sgs/libdl .WAIT \
- libc_i18n \
+ ../cmd/sgs/libdl .WAIT
+
+$(CLOSED_BUILD)SUBDIRS += \
+ $(CLOSED)/lib/libc_i18n
+
+SUBDIRS += \
libc .WAIT \
libmapmalloc .WAIT \
../cmd/sgs/libelf .WAIT \
@@ -125,8 +136,10 @@ SUBDIRS= \
nametoaddr \
ncad_addr \
gss_mechs/mech_krb5 .WAIT \
- krb5 .WAIT \
- smartcard \
+ krb5 .WAIT
+$(CLOSED_BUILD)SUBDIRS += \
+ $(CLOSED)/lib/smartcard
+SUBDIRS += \
passwdutil \
pam_modules \
crypt_modules \
@@ -144,16 +157,20 @@ SUBDIRS= \
libdhcpagent \
libdhcpdu \
libdhcputil \
- libipsecutil \
- libike \
+ libipsecutil
+$(CLOSED_BUILD)SUBDIRS += \
+ $(CLOSED)/lib/libike
+SUBDIRS += \
nsswitch \
print \
libuutil \
libscf \
libinetsvc \
librestart \
- libsched \
- libelfsign \
+ libsched
+$(CLOSED_BUILD)SUBDIRS += \
+ $(CLOSED)/lib/libelfsign
+SUBDIRS += \
pkcs11 .WAIT \
libpctx .WAIT \
libcpc \
@@ -198,10 +215,12 @@ SUBDIRS= \
sparc_SUBDIRS= .WAIT \
efcode \
libc_psr .WAIT \
- libmd5_psr .WAIT \
- libprtdiag .WAIT \
- libprtdiag_psr \
- librsc \
+ libmd5_psr .WAIT
+$(CLOSED_BUILD)sparc_SUBDIRS += \
+ $(CLOSED)/lib/libprtdiag .WAIT \
+ $(CLOSED)/lib/libprtdiag_psr \
+ $(CLOSED)/lib/librsc
+sparc_SUBDIRS += \
libfruutils .WAIT \
libfru \
libwrsmconf \
@@ -256,19 +275,22 @@ MSGSUBDIRS= \
madv \
mpss \
pam_modules \
- rpcsec_gss \
- smartcard \
+ rpcsec_gss
+$(CLOSED_BUILD)MSGSUBDIRS += \
+ $(CLOSED)/lib/smartcard
+MSGSUBDIRS += \
$($(MACH)_MSGSUBDIRS)
-sparc_MSGSUBDIRS= \
- libprtdiag \
- libprtdiag_psr
+sparc_MSGSUBDIRS=
+
+$(CLOSED_BUILD)sparc_MSGSUBDIRS += \
+ $(CLOSED)/lib/libprtdiag \
+ $(CLOSED)/lib/libprtdiag_psr
HDRSUBDIRS= libaio \
auditd_plugins \
libbsm \
libc \
- libc_i18n \
libcmdutils \
libcontract \
libcpc \
@@ -290,7 +312,6 @@ HDRSUBDIRS= libaio \
libwanboot \
libwanbootutil \
libipsecutil \
- libike \
libinetcfg \
libinetsvc \
libinetutil \
@@ -336,13 +357,17 @@ HDRSUBDIRS= libaio \
lvm \
openssl \
pkcs11 \
- smartcard \
passwdutil \
../cmd/sendmail/libmilter \
fm \
udapl \
$($(MACH)_HDRSUBDIRS)
+$(CLOSED_BUILD)HDRSUBDIRS += \
+ $(CLOSED)/lib/libc_i18n \
+ $(CLOSED)/lib/libike \
+ $(CLOSED)/lib/smartcard
+
sparc_HDRSUBDIRS= \
libwrsmconf
@@ -387,13 +412,16 @@ _msg: $(MSGSUBDIRS:%=%-nodepend) .WAIT _dc
_dc: $(DCSUBDIRS:%=%-nodepend)
+# dependencies for pam_modules (see below)
+$(CLOSED_BUILD)SMARTCARD= $(CLOSED)/lib/smartcard
+
#
# Library interdependencies are called out explicitly here
#
auditd_plugins: libbsm libnsl libsecdb
gss_mechs/mech_krb5: libgss libnsl libsocket libresolv pkcs11
libadt_jni: libbsm
-libc: libc_i18n
+$(CLOSED_BUILD)libc: $(CLOSED)/lib/libc_i18n
libcmdutils: libavl
libcontract: libnvpair
libdevid: libdevinfo
@@ -404,7 +432,8 @@ libdhcputil: libinetutil
libdladm: libdlpi libdevinfo
libdtrace: libproc libgen libctf
libefi: libuuid
-libelfsign: libike libcryptoutil pkcs11
+$(CLOSED_BUILD)$(CLOSED)/lib/libelfsign: \
+ $(CLOSED)/lib/libike libcryptoutil pkcs11
libinetcfg: libnsl libsocket libdevinfo
libnsl: libmd5 libscf
libmacadm: libdevinfo
@@ -424,7 +453,7 @@ libwrap: libnsl libsocket
libwanboot: libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
libdhcputil openssl
libwanbootutil: libnsl
-pam_modules: libproject smartcard
+pam_modules: libproject passwdutil $(SMARTCARD)
libscf: libuutil
libinetsvc: libscf
librestart: libuutil libscf
@@ -440,7 +469,8 @@ libzpool: libavl libumem libnvpair
#
# The reason this rule checks for the existence of the
# Makefile is that some of the directories do not exist
-# in our exportable source builds.
+# in certain situations (e.g., exportable source builds,
+# OpenSolaris).
#
$(SUBDIRS) abi: FRC
@if [ -f $@/Makefile ]; then \
diff --git a/usr/src/lib/cfgadm_plugins/Makefile b/usr/src/lib/cfgadm_plugins/Makefile
index dbe7ddba1c..64b5cd9962 100644
--- a/usr/src/lib/cfgadm_plugins/Makefile
+++ b/usr/src/lib/cfgadm_plugins/Makefile
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -28,14 +28,18 @@
# lib/cfgadm_plugins/Makefile
#
-COMMON_SUBDIRS= scsi pci usb ib
-sparc_SUBDIRS= ac sysctrl sbd
+include $(SRC)/Makefile.master
+
+CLOSED_PLUGIN = $(CLOSED)/lib/cfgadm_plugins/
-# currently pci library is built only for i386; it should be moved
-# to COMMON_SUBDIRS when it is to be built for SPARC also.
+COMMON_SUBDIRS= scsi pci usb ib
+sparc_SUBDIRS= sbd
i386_SUBDIRS=
+$(CLOSED_BUILD)sparc_SUBDIRS += $(CLOSED_PLUGIN)/ac
+$(CLOSED_BUILD)sparc_SUBDIRS += $(CLOSED_PLUGIN)/sysctrl
+
SUBDIRS= $(COMMON_SUBDIRS) $($(MACH)_SUBDIRS)
ALL_SUBDIRS= $(COMMON_SUBDIRS) $(sparc_SUBDIRS) $(i386_SUBDIRS)
diff --git a/usr/src/lib/cfgadm_plugins/Makefile.com b/usr/src/lib/cfgadm_plugins/Makefile.com
index a15c78bc5f..a7c2d5fbb8 100644
--- a/usr/src/lib/cfgadm_plugins/Makefile.com
+++ b/usr/src/lib/cfgadm_plugins/Makefile.com
@@ -27,7 +27,9 @@
#
# lib/cfgadm_plugins/Makefile.com
-include ../../../../Makefile.psm
+# This is used by open and closed components, so it uses an absolute
+# path.
+include $(SRC)/Makefile.psm
MODULE = cfgadm
diff --git a/usr/src/lib/gss_mechs/mech_dh/backend/Makefile.com b/usr/src/lib/gss_mechs/mech_dh/backend/Makefile.com
index d6f0417b0e..4c10189a4f 100644
--- a/usr/src/lib/gss_mechs/mech_dh/backend/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_dh/backend/Makefile.com
@@ -45,7 +45,8 @@ OBJECTS= $(MECH) $(CRYPTO) $(DERIVED_OBJS)
# include library definitions
include ../../../../Makefile.lib
-$(EXPORT_RELEASE_BUILD)include ../Makefile.export
+MAKEFILE_EXPORT = $(CLOSED)/lib/gss_mechs/mech_dh/backend/Makefile.export
+$(EXPORT_RELEASE_BUILD)include $(MAKEFILE_EXPORT)
CPPFLAGS += -I../mech -I../crypto -I$(SRC)/uts/common/gssapi/include
@@ -60,7 +61,7 @@ LIBNAME = $(LIBRARY:%.a=%)
MAPFILE = ../mapfile-vers
-$(EXPORT_RELEASE_BUILD)MAPFILE = ../mapfile-vers-export
+$(EXPORT_RELEASE_BUILD)MAPFILE = $(CLOSED)/lib/gss_mechs/mech_dh/backend/mapfile-vers-export
DYNFLAGS += -M$(MAPFILE)
diff --git a/usr/src/lib/gss_mechs/mech_dh/dh1024/Makefile.com b/usr/src/lib/gss_mechs/mech_dh/dh1024/Makefile.com
index 9868c5b85c..91c47d2f87 100644
--- a/usr/src/lib/gss_mechs/mech_dh/dh1024/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_dh/dh1024/Makefile.com
@@ -43,7 +43,8 @@ OBJECTS= $(DH1024)
# include library definitions
include ../../../../Makefile.lib
-$(EXPORT_RELEASE_BUILD)include ../Makefile.export
+MAKEFILE_EXPORT = $(CLOSED)/lib/gss_mechs/mech_dh/dh1024/Makefile.export
+$(EXPORT_RELEASE_BUILD)include $(MAKEFILE_EXPORT)
CPPFLAGS += -I../../backend/mech -I../../backend/crypto
CPPFLAGS += -I$(SRC)/lib/libnsl/include
@@ -59,7 +60,7 @@ LIBNAME = $(LIBRARY:%.a=%)
MAPFILE = ../mapfile-vers
-$(EXPORT_RELEASE_BUILD)MAPFILE = ../mapfile-vers-export
+$(EXPORT_RELEASE_BUILD)MAPFILE = $(CLOSED)/lib/gss_mechs/mech_dh/dh1024/mapfile-vers-export
DYNFLAGS += -M$(MAPFILE)
diff --git a/usr/src/lib/gss_mechs/mech_dh/dh192/Makefile.com b/usr/src/lib/gss_mechs/mech_dh/dh192/Makefile.com
index 71e5397212..1fa573f0df 100644
--- a/usr/src/lib/gss_mechs/mech_dh/dh192/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_dh/dh192/Makefile.com
@@ -43,7 +43,8 @@ OBJECTS= $(DH192)
# include library definitions
include ../../../../Makefile.lib
-$(EXPORT_RELEASE_BUILD)include ../Makefile.export
+MAKEFILE_EXPORT = $(CLOSED)/lib/gss_mechs/mech_dh/dh192/Makefile.export
+$(EXPORT_RELEASE_BUILD)include $(MAKEFILE_EXPORT)
CPPFLAGS += -I../../backend/mech -I../../backend/crypto
CPPFLAGS += -I$(SRC)/lib/libnsl/include
@@ -59,7 +60,7 @@ LIBNAME = $(LIBRARY:%.a=%)
MAPFILE = ../mapfile-vers
-$(EXPORT_RELEASE_BUILD)MAPFILE = ../mapfile-vers-export
+$(EXPORT_RELEASE_BUILD)MAPFILE = $(CLOSED)/lib/gss_mechs/mech_dh/dh192/mapfile-vers-export
DYNFLAGS += -M$(MAPFILE)
diff --git a/usr/src/lib/gss_mechs/mech_dh/dh640/Makefile.com b/usr/src/lib/gss_mechs/mech_dh/dh640/Makefile.com
index 7513c7be0d..0a614b0ea1 100644
--- a/usr/src/lib/gss_mechs/mech_dh/dh640/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_dh/dh640/Makefile.com
@@ -43,7 +43,8 @@ OBJECTS= $(DH640)
# include library definitions
include ../../../../Makefile.lib
-$(EXPORT_RELEASE_BUILD)include ../Makefile.export
+MAKEFILE_EXPORT = $(CLOSED)/lib/gss_mechs/mech_dh/dh640/Makefile.export
+$(EXPORT_RELEASE_BUILD)include $(MAKEFILE_EXPORT)
CPPFLAGS += -I../../backend/mech -I../../backend/crypto
CPPFLAGS += -I$(SRC)/lib/libnsl/include
@@ -59,7 +60,7 @@ LIBNAME = $(LIBRARY:%.a=%)
MAPFILE = ../mapfile-vers
-$(EXPORT_RELEASE_BUILD)MAPFILE = ../mapfile-vers-export
+$(EXPORT_RELEASE_BUILD)MAPFILE = $(CLOSED)/lib/gss_mechs/mech_dh/dh640/mapfile-vers-export
DYNFLAGS += -M$(MAPFILE)
diff --git a/usr/src/lib/gss_mechs/mech_dummy/Makefile.com b/usr/src/lib/gss_mechs/mech_dummy/Makefile.com
index ee390757bb..3dee3af5db 100644
--- a/usr/src/lib/gss_mechs/mech_dummy/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_dummy/Makefile.com
@@ -38,7 +38,8 @@ include $(SRC)/lib/Makefile.lib
CPPFLAGS += -I../../libgss -I$(SRC)/uts/common/gssapi/include \
-I$(ROOT)/usr/include/gssapi
-$(EXPORT_RELEASE_BUILD)include ../Makefile.export
+MAKEFILE_EXPORT = $(CLOSED)/lib/gss_mechs/mech_dummy/Makefile.export
+$(EXPORT_RELEASE_BUILD)include $(MAKEFILE_EXPORT)
SRCDIR = ../mech
LIBS = $(DYNLIB)
diff --git a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
index 8a889eb5db..eba9bf1140 100644
--- a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
@@ -227,7 +227,7 @@ CPPFLAGS += -I$(REL_PATH)/libgss -I../include \
CPPFLAGS += $(KRB5_DEFS)
-$(EXPORT_RELEASE_BUILD)include ../Makefile.export
+$(EXPORT_RELEASE_BUILD)include $(CLOSED)/lib/gss_mechs/mech_krb5/Makefile.export
#CPPFLAGS += -D_REENTRANT
$(PICS) := CFLAGS += $(XFFLAG)
diff --git a/usr/src/lib/gss_mechs/mech_krb5/spec/Makefile.targ b/usr/src/lib/gss_mechs/mech_krb5/spec/Makefile.targ
index 9b92987f10..320d564b2d 100644
--- a/usr/src/lib/gss_mechs/mech_krb5/spec/Makefile.targ
+++ b/usr/src/lib/gss_mechs/mech_krb5/spec/Makefile.targ
@@ -10,7 +10,7 @@ LIBRARY = mech_krb5.a
VERS = .1
EXPORT = krb5_clean.o
-$(EXPORT_RELEASE_BUILD)EXPORT = krb5_export.o
+$(EXPORT_RELEASE_BUILD)EXPORT = ../../../../../closed/lib/gss_mechs/mech_krb5/spec/krb5_export.o
OBJECTS = krb5_asn1.o krb5_gss.o krb5_int.o krb5_cache.o \
krb5_mech1.o krb5_mech2.o krb5_mech3.o krb5_crypto.o \
diff --git a/usr/src/lib/gss_mechs/mech_spnego/Makefile.com b/usr/src/lib/gss_mechs/mech_spnego/Makefile.com
index 1238226814..221d38532b 100644
--- a/usr/src/lib/gss_mechs/mech_spnego/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_spnego/Makefile.com
@@ -49,7 +49,8 @@ SPECMAPFILE = $(MAPDIR)/mapfile
CPPFLAGS += -I$(SRC)/uts/common/gssapi/include -I$(ROOT)/usr/include/gssapi $(DEBUG)
-$(EXPORT_RELEASE_BUILD)include ../Makefile.export
+MAKEFILE_EXPORT = $(CLOSED)/lib/gss_mechs/mech_spnego/Makefile.export
+$(EXPORT_RELEASE_BUILD)include $(MAKEFILE_EXPORT)
.KEEP_STATE:
diff --git a/usr/src/lib/gss_mechs/mech_spnego/spec/Makefile.targ b/usr/src/lib/gss_mechs/mech_spnego/spec/Makefile.targ
index 2692e45942..737f4ae7d0 100644
--- a/usr/src/lib/gss_mechs/mech_spnego/spec/Makefile.targ
+++ b/usr/src/lib/gss_mechs/mech_spnego/spec/Makefile.targ
@@ -32,6 +32,6 @@ VERS = .1
EXPORT = clean.o
-$(EXPORT_RELEASE_BUILD)EXPORT = export.o
+$(EXPORT_RELEASE_BUILD)EXPORT = ../../../../../closed/lib/gss_mechs/mech_spnego/spec/export.o
OBJECTS = spnego.o $(EXPORT)
diff --git a/usr/src/lib/libc/Makefile b/usr/src/lib/libc/Makefile
index a12850b2a7..961d80a379 100644
--- a/usr/src/lib/libc/Makefile
+++ b/usr/src/lib/libc/Makefile
@@ -100,7 +100,22 @@ $(ROOTVARIANTDIR)/$(VAR2_DYNLIB) := FILEMODE= 755
.KEEP_STATE:
-all: spec .WAIT lib32 $(BUILD64) .WAIT lib64 .WAIT etc
+all: check_i18n .WAIT spec .WAIT lib32 $(BUILD64) .WAIT lib64 .WAIT etc
+
+check_i18n:
+ @if [ ! -f $(ROOTFS_LIBDIR)/libc_i18n.a -a \
+ ! -f $(ROOTFS_LIBDIR64)/libc_i18n.a ]; then \
+ if [ "$$CLOSED_IS_PRESENT" = no ]; then \
+ $(ECHO) "Warning: closed binaries not" \
+ "properly unpacked." >&2;\
+ $(ECHO) "Missing libc_i18n.a" >&2; \
+ exit 1; \
+ else \
+ $(ECHO) "Warning: libc_i18n.a must be built" \
+ "before libc can be built." >&2; \
+ exit 1; \
+ fi \
+ fi
etc: $($(MACH)_ETC)
diff --git a/usr/src/lib/libc/req.flg b/usr/src/lib/libc/req.flg
index 387398538c..ed6e6b4c12 100644
--- a/usr/src/lib/libc/req.flg
+++ b/usr/src/lib/libc/req.flg
@@ -28,4 +28,4 @@
find_files "s.*" usr/src/common/atomic
find_files "s.*" usr/src/common/util
-find_files "s.*" usr/src/lib/libc_i18n
+find_files "s.*" usr/closed/lib/libc_i18n
diff --git a/usr/src/lib/libgss/Makefile.com b/usr/src/lib/libgss/Makefile.com
index 03733a1d0a..687e3f6cdd 100644
--- a/usr/src/lib/libgss/Makefile.com
+++ b/usr/src/lib/libgss/Makefile.com
@@ -94,7 +94,7 @@ SPECMAPFILE= $(MAPDIR)/mapfile
CPPFLAGS += -I$(GSSCRED_DIR) -I$(SRC)/uts/common/gssapi/include \
-DHAVE_STDLIB_H
-$(EXPORT_RELEASE_BUILD)include ../Makefile.export
+$(EXPORT_RELEASE_BUILD)include $(CLOSED)/lib/libgss/Makefile.export
.KEEP_STATE:
diff --git a/usr/src/lib/pam_modules/Makefile b/usr/src/lib/pam_modules/Makefile
index 329061b097..fd811038c9 100644
--- a/usr/src/lib/pam_modules/Makefile
+++ b/usr/src/lib/pam_modules/Makefile
@@ -28,6 +28,8 @@
# lib/pam_modules/Makefile
#
+include $(SRC)/Makefile.master
+
SUBDIRS = \
allow \
authtok_get \
@@ -44,12 +46,14 @@ SUBDIRS = \
rhosts_auth \
roles \
sample \
- smartcard \
unix_auth \
unix_account \
unix_cred \
unix_session
+$(CLOSED_BUILD)SUBDIRS += \
+ $(CLOSED)/lib/pam_modules/smartcard
+
all := TARGET= all
catalog := TARGET= _msg
clean := TARGET= clean
diff --git a/usr/src/lib/pam_modules/krb5/Makefile.com b/usr/src/lib/pam_modules/krb5/Makefile.com
index 0132390a5e..e2fdb51c30 100644
--- a/usr/src/lib/pam_modules/krb5/Makefile.com
+++ b/usr/src/lib/pam_modules/krb5/Makefile.com
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# usr/src/lib/pam_modules/krb5/Makefile.com
@@ -66,15 +66,6 @@ CPPFLAGS += -I../../../gss_mechs/mech_krb5/include \
# called after dlclose()
DYNFLAGS += $(ZNODELETE)
-# EXPORT DELETE START
-# CRYPT DELETE START
-INTLMAP =
-INTLMAP += -Dxencrypt=_C0095A0F
-INTLMAP += -Dxdecrypt=_C0095A10
-CPPFLAGS += $(INTLMAP)
-# CRYPT DELETE END
-# EXPORT DELETE END
-
CLOBBERFILES += $(LINTLIB) $(LINTOUT) $(JOBJ) $(POFILE)
#
diff --git a/usr/src/lib/pkcs11/Makefile b/usr/src/lib/pkcs11/Makefile
index b931ffa90e..2501dfe0ad 100644
--- a/usr/src/lib/pkcs11/Makefile
+++ b/usr/src/lib/pkcs11/Makefile
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -37,12 +37,18 @@ ROOTHDRDIR = $(ROOT)/usr/include/security
CHECKHDRS = $(HDRDIR)/cryptoki.h
SUBDIRS = \
- libpkcs11 \
- pkcs11_kernel \
- pkcs11_softtoken
+ libpkcs11
+
+#
+# Don't build these for OpenSolaris, since they will be replaced by
+# binaries that are signed by Sun RE.
+#
+$(CLOSED_BUILD)SUBDIRS += \
+ pkcs11_kernel \
+ pkcs11_softtoken
# EXPORT DELETE START
-SUBDIRS += pkcs11_softtoken_extra
+$(CLOSED_BUILD)SUBDIRS += pkcs11_softtoken_extra
# EXPORT DELETE END
all := TARGET= all
diff --git a/usr/src/lib/pkcs11/inc.flg b/usr/src/lib/pkcs11/inc.flg
index 194c162f1f..d4c71f83ff 100644
--- a/usr/src/lib/pkcs11/inc.flg
+++ b/usr/src/lib/pkcs11/inc.flg
@@ -21,7 +21,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -30,5 +30,5 @@ find_files "s.*" usr/src/common/crypto
find_files "s.*" usr/src/common/bignum
find_files "s.*" usr/src/lib/libldap5/sources/ldap/ber
find_files "s.*" usr/src/lib/libldap5/include/ldap
-echo_file usr/src/cmd/cmd-crypto/etc/keys/SUNWosnet
-echo_file usr/src/cmd/cmd-crypto/etc/certs/SUNWosnet
+echo_file usr/closed/cmd/cmd-crypto/etc/keys/SUNWosnet
+echo_file usr/closed/cmd/cmd-crypto/etc/certs/SUNWosnet
diff --git a/usr/src/lib/udapl/Makefile b/usr/src/lib/udapl/Makefile
index cf19088229..c2e779bac7 100644
--- a/usr/src/lib/udapl/Makefile
+++ b/usr/src/lib/udapl/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -29,8 +28,9 @@
include ../Makefile.lib
SUBDIRS = libdat
+
# EXPORT DELETE START
-SUBDIRS += udapl_tavor
+$(CLOSED_BUILD)SUBDIRS += $(CLOSED)/lib/udapl/udapl_tavor
# EXPORT DELETE END
HDRSUBDIRS = libdat
diff --git a/usr/src/psm/stand/boot/Makefile b/usr/src/psm/stand/boot/Makefile
index cf248df166..cffc01d339 100644
--- a/usr/src/psm/stand/boot/Makefile
+++ b/usr/src/psm/stand/boot/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -54,14 +53,23 @@ $(SUBDIRS): FRC
# Cross-reference customization: include all boot-related source files.
#
UTSDIR = ../../../uts
+UTSCLOSED = ../../../../closed/uts
STANDLIBDIR = ../../../stand/lib
-STANDSYSDIRS = ../../../stand/sys ../../../stand/i386/sys
+STANDSYSDIRS = ../../../stand/sys
PROMDIRS = ../../promif $(UTSDIR)/intel/promif
NAMESDIRS = ../lib/names
XRDIRS += $(STANDLIBDIR) $(STANDSYSDIRS) $(PROMDIRS) $(NAMESDIRS)
-XRINCDIRS = $(UTSDIR)/sun4u $(UTSDIR)/sfmmu $(UTSDIR)/sparc/v7 \
- $(UTSDIR)/sparc/v9 $(UTSDIR)/sparc $(UTSDIR)/sun \
- $(UTSDIR)/common $(UTSDIR)/intel $(UTSDIR)/i86pc
+
+#
+# Components beginning with B! are in the open and closed trees; those
+# beginning with O! are just in the open tree.
+#
+XRINCCOMP = B!sun4u O!sfmmu O!sparc/v7 O!sparc/v9 B!sparc B!sun \
+ B!common B!intel B!i86pc
+XRINC_TMP = $(XRINCCOMP:B!%=$(UTSDIR)/%)
+XRINCDIRS = $(XRINC_TMP:O!%=$(UTSDIR)/%)
+$(CLOSED_BUILD)XRINC_TMP = $(XRINCCOMP:B!%=$(UTSDIR)/% $(UTSCLOSED)/%)
+$(CLOSED_BUILD)XRINCDIRS = $(XRINC_TMP:O!%=$(UTSDIR)/%)
cscope.out tags: FRC
$(XREF) -x $@
diff --git a/usr/src/psm/stand/boot/i386/Makefile b/usr/src/psm/stand/boot/i386/Makefile
index 3c2e60a3cb..ad7f5d24a0 100644
--- a/usr/src/psm/stand/boot/i386/Makefile
+++ b/usr/src/psm/stand/boot/i386/Makefile
@@ -47,8 +47,7 @@ $(SUBDIRS): FRC
#
# Cross-reference customization: include all boot-related source files.
#
-UTSDIR= ../../../../uts
-XRDIRS += ../amd64 ../intel ../common
+XRDIRS += ../amd64 ../common
cscope.out tags: FRC
$(XREF) -x $@
diff --git a/usr/src/psm/stand/boot/inc.flg b/usr/src/psm/stand/boot/inc.flg
index 87b058d63e..b66daca53c 100644
--- a/usr/src/psm/stand/boot/inc.flg
+++ b/usr/src/psm/stand/boot/inc.flg
@@ -33,10 +33,13 @@
find_files "s.*.h"\
usr/src/uts/sparc\
usr/src/uts/sun\
+ usr/closed/uts/sun\
usr/src/uts/common/sys\
+ usr/closed/uts/common/sys\
usr/src/uts/common/vm\
usr/src/uts/common/rpc\
usr/src/uts/common/nfs\
+ usr/closed/uts/common/nfs\
usr/src/stand/sys
#
# Get required directories
diff --git a/usr/src/psm/stand/boot/sparcv9/Makefile b/usr/src/psm/stand/boot/sparcv9/Makefile
index 3f3cb6915b..256669ff16 100644
--- a/usr/src/psm/stand/boot/sparcv9/Makefile
+++ b/usr/src/psm/stand/boot/sparcv9/Makefile
@@ -47,14 +47,12 @@ $(SUBDIRS): FRC
#
# Cross-reference customization: include all boot-related source files.
#
-UTSDIR= ../../../../uts
STANDLIBDIR= ../../../../stand/lib
STANDSYSDIR= ../../../../stand/sys
PROMDIRS= ../../../promif/ieee1275
NAMESDIRS= ../../lib/names/sparcv9 ../../lib/names/sparc/common
XRDIRS += ../common ../sparc/common $(NAMESDIRS) $(PROMDIRS) \
- $(STANDSYSDIR) $(STANDLIBDIR)/sparcv9 $(STANDLIBDIR)/common \
- $(STANDLIBDIR)/fs
+ $(STANDSYSDIR) $(STANDLIBDIR)
cscope.out tags: FRC
$(XREF) -x $@
diff --git a/usr/src/psm/stand/boot/sparcv9/sun4u/Makefile b/usr/src/psm/stand/boot/sparcv9/sun4u/Makefile
index 2370e8fd88..1cb8121a9f 100644
--- a/usr/src/psm/stand/boot/sparcv9/sun4u/Makefile
+++ b/usr/src/psm/stand/boot/sparcv9/sun4u/Makefile
@@ -131,14 +131,12 @@ LINTFLAGS64 = $(LINTFLAGS) -Xarch=v9
#
# Cross-reference customization: include all boot-related source files.
#
-UTSDIR= ../../../../../uts
STANDLIBDIR= ../../../../../stand/lib
STANDSYSDIR= ../../../../../stand/sys
PROMDIRS= ../../../../promif
NAMESDIRS= ../../../lib/names/sparcv9 ../../../lib/names/sparc/common
XRDIRS += ../../sparc/common ../../common $(STANDLIBDIR) \
$(STANDSYSDIR) $(PROMDIRS) $(NAMESDIRS)
-XRDEL = sun4x_srt0* sun4x_memlist*
XRPRUNE = i86pc i386
cscope.out tags: FRC
diff --git a/usr/src/psm/stand/boot/sparcv9/sun4v/Makefile b/usr/src/psm/stand/boot/sparcv9/sun4v/Makefile
index 8005ea80df..b680b12fe8 100644
--- a/usr/src/psm/stand/boot/sparcv9/sun4v/Makefile
+++ b/usr/src/psm/stand/boot/sparcv9/sun4v/Makefile
@@ -105,14 +105,12 @@ LINTFLAGS64 = $(LINTFLAGS) -Xarch=v9
#
# Cross-reference customization: include all boot-related source files.
#
-UTSDIR= ../../../../../uts
STANDLIBDIR= ../../../../../stand/lib
STANDSYSDIR= ../../../../../stand/sys
PROMDIRS= ../../../../promif
NAMESDIRS= ../../../lib/names/sparcv9 ../../../lib/names/sparc/common
XRDIRS += ../../sparc/common ../../common $(STANDLIBDIR) \
$(STANDSYSDIR) $(PROMDIRS) $(NAMESDIRS)
-XRDEL = sun4x_srt0* sun4x_memlist*
XRPRUNE = i86pc i386
cscope.out tags: FRC
diff --git a/usr/src/req.flg b/usr/src/req.flg
index 97c4de3cbb..cdd2608b66 100644
--- a/usr/src/req.flg
+++ b/usr/src/req.flg
@@ -21,7 +21,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -37,7 +37,7 @@ echo_file usr/src/xmod/xmod_files
echo_file usr/src/tools/abi/etc/ABI_sparc.db
echo_file usr/src/tools/abi/etc/ABI_i386.db
echo_file usr/src/tools/abi/etc/exceptions
-echo_file usr/src/cmd/cmd-crypto/etc/certs/SUNWosnet
-echo_file usr/src/cmd/cmd-crypto/etc/certs/SUNWosnetSolaris
-echo_file usr/src/cmd/cmd-crypto/etc/keys/SUNWosnet
-echo_file usr/src/cmd/cmd-crypto/etc/keys/SUNWosnetSolaris
+echo_file usr/closed/cmd/cmd-crypto/etc/certs/SUNWosnet
+echo_file usr/closed/cmd/cmd-crypto/etc/certs/SUNWosnetSolaris
+echo_file usr/closed/cmd/cmd-crypto/etc/keys/SUNWosnet
+echo_file usr/closed/cmd/cmd-crypto/etc/keys/SUNWosnetSolaris
diff --git a/usr/src/stand/lib/req.flg b/usr/src/stand/lib/req.flg
index 0992d1f74c..29780d923f 100644
--- a/usr/src/stand/lib/req.flg
+++ b/usr/src/stand/lib/req.flg
@@ -34,3 +34,4 @@ echo_file usr/src/psm/Makefile.psm.64
find_files "s.*.h" usr/src/psm/stand/sys
find_files "s.*.h" usr/src/stand
find_files "s.*.h" usr/src/uts
+find_files "s.*.h" usr/closed/uts
diff --git a/usr/src/tools/Makefile b/usr/src/tools/Makefile
index 8fba467368..1c3b37e33b 100644
--- a/usr/src/tools/Makefile
+++ b/usr/src/tools/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -53,7 +52,7 @@ COMMON_SUBDIRS= \
#
# special versions of commands for use only in build
#
-UNSHIPPED_SUBDIRS = \
+CLOSED_UNSHIPPED_SUBDIRS = \
elfsign
sparc_SUBDIRS= \
@@ -71,8 +70,9 @@ LINTSUBDIRS= \
protocmp \
protolist
-SUBDIRS= $(BOOT_SUBDIRS) $($(MACH)_SUBDIRS) $(COMMON_SUBDIRS) \
- $(UNSHIPPED_SUBDIRS)
+SUBDIRS= $(BOOT_SUBDIRS) $($(MACH)_SUBDIRS) $(COMMON_SUBDIRS)
+
+$(CLOSED_BUILD)CLOSED_SUBDIRS= $(CLOSED_UNSHIPPED_SUBDIRS)
#
# Packages built here
@@ -111,11 +111,11 @@ _msg := TARGET= _msg
.KEEP_STATE:
-all install: $(ROOTDIRS) .WAIT $(SUBDIRS)
+all install: $(ROOTDIRS) .WAIT $(SUBDIRS) $(CLOSED_SUBDIRS)
-clean: $(SUBDIRS)
+clean: $(SUBDIRS) $(CLOSED_SUBDIRS)
-clobber: $(SUBDIRS)
+clobber: $(SUBDIRS) $(CLOSED_SUBDIRS)
$(RM) -rf $(TOOLS_PROTO)
pkg: install .WAIT $(PKG_SUBDIRS)
@@ -130,6 +130,9 @@ $(SUBDIRS): FRC
$(PKG_SUBDIRS): FRC
@cd $@; pwd; $(MAKE) install
+$(CLOSED_SUBDIRS): FRC
+ cd $(CLOSED)/tools/$@; pwd; $(MAKE) $(TARGET)
+
FRC:
$(ROOTDIRS):
diff --git a/usr/src/tools/env/Makefile b/usr/src/tools/env/Makefile
index 53e79e8faf..bdfbd72d3d 100644
--- a/usr/src/tools/env/Makefile
+++ b/usr/src/tools/env/Makefile
@@ -22,13 +22,14 @@
#
#ident "%Z%%M% %I% %E% SMI"
#
-# Copyright (c) 1998 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
ENVFILES= \
developer \
- gatekeeper
+ gatekeeper \
+ opensolaris
include ../Makefile.tools
diff --git a/usr/src/tools/env/developer.sh b/usr/src/tools/env/developer.sh
index 4e25ed3a97..da957486d1 100644
--- a/usr/src/tools/env/developer.sh
+++ b/usr/src/tools/env/developer.sh
@@ -59,6 +59,11 @@ PARENT_WS="/ws/onnv-gate"; export PARENT_WS
# clone instead of the gate (see the gate's README).
CLONE_WS="/ws/onnv-clone"; export CLONE_WS
+# This flag controls whether to build the closed source. If
+# undefined, nightly(1) and bldenv(1) will set it according to whether
+# the closed tree is present.
+# CLOSED_IS_PRESENT="yes"; export CLOSED_IS_PRESENT
+
# The bringover, if any, is done as STAFFER.
# Set STAFFER to your own login as gatekeeper or developer
# The point is to use group "staff" and avoid referencing the parent
@@ -208,6 +213,6 @@ UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
#VERIFY_ELFSIGN=n
# BRINGOVER_FILES is the list of files nightly passes to bringover.
-# If not set the default is "usr/src", but it can be used for bringing
+# If not set the default is "usr", but it can be used for bringing
# over deleted_files or other nifty directories.
-#BRINGOVER_FILES="usr/src deleted_files"
+#BRINGOVER_FILES="usr deleted_files"
diff --git a/usr/src/tools/env/gatekeeper.sh b/usr/src/tools/env/gatekeeper.sh
index ce37f910d1..a02500ef7c 100644
--- a/usr/src/tools/env/gatekeeper.sh
+++ b/usr/src/tools/env/gatekeeper.sh
@@ -68,6 +68,11 @@ PARENT_WS="/ws/$GATE"; export PARENT_WS
# clone instead of the gate (see the gate's README).
CLONE_WS="/ws/onnv-clone"; export CLONE_WS
+# This flag controls whether to build the closed source. If
+# undefined, nightly(1) and bldenv(1) will set it according to whether
+# the closed tree is present.
+# CLOSED_IS_PRESENT="yes"; export CLOSED_IS_PRESENT
+
# The bringover, if any, is done as STAFFER.
# Set STAFFER to your own login as gatekeeper or integration engineer.
# The point is to use group "staff" and avoid referencing the parent
@@ -218,6 +223,6 @@ UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
#VERIFY_ELFSIGN=n
# BRINGOVER_FILES is the list of files nightly passes to bringover.
-# If not set the default is "usr/src", but it can be used for bringing
+# If not set the default is "usr", but it can be used for bringing
# over deleted_files or other nifty directories.
-#BRINGOVER_FILES="usr/src deleted_files"
+#BRINGOVER_FILES="usr deleted_files"
diff --git a/usr/src/tools/env/opensolaris.sh b/usr/src/tools/env/opensolaris.sh
new file mode 100644
index 0000000000..898a145f9d
--- /dev/null
+++ b/usr/src/tools/env/opensolaris.sh
@@ -0,0 +1,191 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# Configuration variables for the runtime environment of the nightly
+# build script and other tools for construction and packaging of releases.
+# This script is sourced by 'nightly' and 'bldenv' to set up the environment
+# for the build. This example is suitable for building an OpenSolaris
+# workspace, which will contain the resulting archives. It is based
+# off the onnv release. It sets NIGHTLY_OPTIONS to make nightly do:
+# DEBUG build only (-D, -F)
+# do not run protocmp or checkpaths (-N)
+# do not bringover from the parent (-n)
+# creates cpio archives for bfu (-a)
+# sends mail on completion (-m and the MAILTO variable)
+# checks for changes in ELF runpaths (-r)
+# build and use this workspace's tools in $SRC/tools (-t)
+# use dmake instead of pmake (-d)
+#
+NIGHTLY_OPTIONS="-FNnadDmrt"; export NIGHTLY_OPTIONS
+
+# This is a variable for the rest of the script - GATE doesn't matter to
+# nightly itself
+GATE=testws; export GATE
+
+# CODEMGR_WS - where is your workspace at (or what should nightly name it)
+CODEMGR_WS="/export/$GATE"; export CODEMGR_WS
+
+# Location of encumbered binaries.
+ON_CLOSED_BINS="$CODEMGR_WS/closed"; export ON_CLOSED_BINS
+
+# This flag controls whether to build the closed source. If
+# undefined, nightly(1) and bldenv(1) will set it according to whether
+# the closed tree is present.
+# CLOSED_IS_PRESENT="no"; export CLOSED_IS_PRESENT
+
+# Maximum number of dmake jobs. The recommended number is 2 + (2 *
+# NCPUS), where NCPUS is the number of CPUs on your build system.
+maxjobs() {
+ ncpu=`/usr/sbin/psrinfo -p`
+ expr $ncpu \* 2 + 2
+}
+DMAKE_MAX_JOBS=`maxjobs`; export DMAKE_MAX_JOBS
+
+# path to onbld tool binaries
+ONBLD_BIN="/opt/onbld/bin"
+
+# used by bfu.
+FASTFS=$ONBLD_BIN/`uname -p`/fastfs; export FASTFS
+BFULD=$ONBLD_BIN/`uname -p`/bfuld; export BFULD
+GZIPBIN=/usr/bin/gzip; export GZIPBIN
+
+# PARENT_WS is used to determine the parent of this workspace. This is
+# for the options that deal with the parent workspace (such as where the
+# proto area will go).
+PARENT_WS=""; export PARENT_WS
+
+# CLONE_WS is the workspace nightly should do a bringover from. Since it's
+# going to bringover usr/src, this could take a while, so we use the
+# clone instead of the gate (see the gate's README).
+CLONE_WS=""; export CLONE_WS
+
+# The bringover, if any, is done as STAFFER.
+# Set STAFFER to your own login as gatekeeper or developer
+# The point is to use group "staff" and avoid referencing the parent
+# workspace as root.
+# Some scripts optionally send mail messages to MAILTO.
+#
+STAFFER=nobody; export STAFFER
+MAILTO=$STAFFER; export MAILTO
+
+# The project (see project(4)) under which to run this build. If not
+# specified, the build is simply run in a new task in the current project.
+BUILD_PROJECT=; export BUILD_PROJECT
+
+# You should not need to change the next four lines
+LOCKNAME="`basename $CODEMGR_WS`_nightly.lock"; export LOCKNAME
+ATLOG="$CODEMGR_WS/log"; export ATLOG
+LOGFILE="$ATLOG/nightly.log"; export LOGFILE
+MACH=`uname -p`; export MACH
+
+# REF_PROTO_LIST - for comparing the list of stuff in your proto area
+# with. Generally this should be left alone, since you want to see differences
+# from your parent (the gate).
+#
+REF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST
+
+# where cpio archives of the OS are placed. Usually this should be left
+# alone too.
+CPIODIR="${CODEMGR_WS}/archives/${MACH}/nightly"; export CPIODIR
+
+#
+# build environment variables, including version info for mcs, motd,
+# motd, uname and boot messages. Mostly you shouldn't change this except
+# when the release slips (nah) or you move an environment file to a new
+# release
+#
+ROOT="$CODEMGR_WS/proto/root_${MACH}"; export ROOT
+SRC="$CODEMGR_WS/usr/src"; export SRC
+VERSION="$GATE"; export VERSION
+
+# the source product has no SCCS history, and is modified to remove source
+# that cannot be shipped. EXPORT_SRC is where the clear files are copied, then
+# modified with 'make EXPORT_SRC'.
+EXPORT_SRC="$CODEMGR_WS/export_src"; export EXPORT_SRC
+
+# CRYPT_SRC is similar to EXPORT_SRC, but after 'make CRYPT_SRC' the files in
+# xmod/cry_files are saved. They are dropped on the exportable source to create
+# the domestic build.
+CRYPT_SRC="$CODEMGR_WS/crypt_src"; export CRYPT_SRC
+
+#
+# the RELEASE and RELEASE_DATE variables are set in Makefile.master;
+# there might be special reasons to override them here, but that
+# should not be the case in general
+#
+# RELEASE="5.11"; export RELEASE
+# RELEASE_DATE="October 2007"; export RELEASE_DATE
+
+# proto area in parent for optionally depositing a copy of headers and
+# libraries corresponding to the protolibs target
+# not applicable given the NIGHTLY_OPTIONS
+#
+PARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT
+
+#
+# package creation variable. you probably shouldn't change this either.
+#
+PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly"; export PKGARCHIVE
+
+# we want make to do as much as it can, just in case there's more than
+# one problem.
+MAKEFLAGS=k; export MAKEFLAGS
+
+# Magic variable to prevent the devpro compilers/teamware from sending
+# mail back to devpro on every use.
+UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
+
+# Build tools - don't change these unless you know what you're doing. These
+# variables allows you to get the compilers and onbld files locally or
+# through cachefs. Set BUILD_TOOLS to pull everything from one location.
+# Alternately, you can set ONBLD_TOOLS to where you keep the contents of
+# SUNWonbld and SPRO_ROOT to where you keep the compilers. SPRO_VROOT
+# exists to make it easier to test new versions of the compiler.
+BUILD_TOOLS=/opt; export BUILD_TOOLS
+#ONBLD_TOOLS=/opt/onbld; export ONBLD_TOOLS
+SPRO_ROOT=/opt/SUNWspro; export SPRO_ROOT
+SPRO_VROOT=$SPRO_ROOT; export SPRO_VROOT
+
+# This goes along with lint - it is a series of the form "A [y|n]" which
+# means "go to directory A and run 'make lint'" Then mail me (y) the
+# difference in the lint output. 'y' should only be used if the area you're
+# linting is actually lint clean or you'll get lots of mail.
+# You shouldn't need to change this though.
+#LINTDIRS="$SRC y"; export LINTDIRS
+
+# Set this flag to 'n' to disable the automatic validation of the dmake
+# version in use. The default is to check it.
+#CHECK_DMAKE=y
+
+# Set this flag to 'n' to disable the use of 'checkpaths'. The default,
+# if the 'N' option is not specified, is to run this test.
+#CHECK_PATHS=y
+
+# BRINGOVER_FILES is the list of files nightly passes to bringover.
+# If not set the default is "usr", but it can be used for bringing
+# over deleted_files or other nifty directories.
+#BRINGOVER_FILES="usr deleted_files"
diff --git a/usr/src/tools/findunref/exception_list b/usr/src/tools/findunref/exception_list
index 1977eef167..00ff73ef85 100644
--- a/usr/src/tools/findunref/exception_list
+++ b/usr/src/tools/findunref/exception_list
@@ -48,7 +48,7 @@
./src/cmd/oawk/EXPLAIN
./src/cmd/rpcsvc/nis/rpc.nisd/resolv_server/DNS_FWD
./src/cmd/vi/port/ex.news
-./src/uts/common/io/dktp/controller/ata/capacity.notes
+./closed/uts/common/io/dktp/controller/ata/capacity.notes
./src/cmd/ssh/doc/*
#
@@ -108,8 +108,8 @@
./src/cmd/mdb/packages
./src/cmd/sgs/packages
./src/cmd/sgs/rtld.4.x
-./src/cmd/zic/makefile.tzpkg
-./src/cmd/zic/tzpkg.awk
+./closed/cmd/zic/makefile.tzpkg
+./closed/cmd/zic/tzpkg.awk
./src/prototypes
*/tools
./src/cmd/pools/poold/com/sun/solaris/*/*/package.html
@@ -139,7 +139,7 @@
./src/uts/common/gssapi/include/Makefile
./src/uts/common/gssapi/mechs/dummy/Makefile
./src/uts/common/gssapi/mechs/krb5/Makefile
-./src/uts/sun4v/io/ncp/Makefile
+./closed/uts/sun4v/io/ncp/Makefile
./src/xmod
#
diff --git a/usr/src/tools/scripts/Install.1 b/usr/src/tools/scripts/Install.1
index 13c26f8cbb..d3dde9d472 100644
--- a/usr/src/tools/scripts/Install.1
+++ b/usr/src/tools/scripts/Install.1
@@ -24,7 +24,7 @@
.\"
.\" ident "%Z%%M% %I% %E% SMI"
.\"
-.TH Install 1 "5 Nov 2004"
+.TH Install 1 "20 Oct 2005"
.SH NAME
Install \- install a kernel from an ON workspace
.SH SYNOPSIS
@@ -65,7 +65,6 @@ Install \- install a kernel from an ON workspace
.IR "library dir" " ]"
.RB [ " \-G "
.IB glomname " ]"
-.RB [ " \-x|X " ]
.RI [ " module ... " ]
.LP
or
@@ -199,7 +198,8 @@ rather than rebuild the tarfile from scratch.
specifies where
.B Install
should create its temp files [default: /tmp/Install.username]. This is
-useful if you have limited space in /tmp (\fBInstall\fR needs about 4MB).
+useful if you have limited space in /tmp (\fBInstall\fR can take as
+much as 100MB).
The suffix "Install.username" is always appended.
.TP
.B "-L"
@@ -233,19 +233,6 @@ gloms /kernel and /usr/kernel together into a single /kernel directory.
Useful for development work, e.g. use "Install -G good [...]" to create a
"/kernel.good".
.TP
-.B "-x"
-includes various auxiliary files along with the kernel. Currently,
-these include /etc/minor_perm, /etc/driver_aliases, /etc/name_to_sysnum,
-and /etc/name_to_major.
-.B "-x"
-is the default.
-.TP
-.B "-X"
-opposite of
-.BR "-x" :
-.I do not
-include auxiliary files.
-.TP
.B "-P"
update /etc/path_to_inst -- generally not advisable.
.TP
@@ -368,10 +355,6 @@ $HOME/.Installrc, $HOME/.Install.state
.SH "SEE ALSO"
.BR tar "(1), " rsh "(1), " rcp "(1)"
.SH "BUGS"
-.B Install
-may break periodically as the kernel Makefile structure changes.
-I will provide frequent updates to compensate.
-.LP
.BR tar "(1) and " rsh "(1)"
do not have particularly useful exit codes. To compensate,
.B Install
diff --git a/usr/src/tools/scripts/Install.sh b/usr/src/tools/scripts/Install.sh
index d31451e6e0..9d8f99a715 100644
--- a/usr/src/tools/scripts/Install.sh
+++ b/usr/src/tools/scripts/Install.sh
@@ -3,9 +3,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -35,9 +34,8 @@
#
# Install performs the following steps:
#
-# 1. Figure out how to construct /kernel by looking at Makefile.uts,
-# Makefile.$ISA (sparc default), Makefile.$KARCH and the Makefiles
-# in the module directories (uts/arch/*/Makefile).
+# 1. Get the list of modules, configuration files, and links
+# that are desired.
#
# 2. Create the requested subset of /kernel in Install's temp space
# (/tmp/Install.username by default.)
@@ -90,13 +88,17 @@ export INSTALL_RCP
STATE=0
-DEFAULT_OPTIONS="-naqX"
+DEFAULT_OPTIONS="-naq"
GLOM=no
GLOMNAME=kernel
IMPL="default"
WANT32="yes"
WANT64="yes"
+modlist=/tmp/modlist$$
+# dummy directory for make state files.
+modstatedir=/tmp/modstate$$
+
trap 'fail "User Interrupt" "You can resume by typing \"$INSTALL -R\""' 1 2 3 15
usage() {
@@ -163,7 +165,6 @@ CLEANUP=$CLEANUP
GLOM=$GLOM
GLOMNAME=$GLOMNAME
KMDB=$KMDB
-XFLAG=$XFLAG
files='$files'
STATE=$STATE" >$INSTALL_STATE) || verbose "Warning: cannot save state"
}
@@ -183,11 +184,19 @@ restore_state() {
fail() {
save_state
+ #
+ # We might have gotten here via a trap. So wait for any
+ # children (especially "make modlist") to exit before giving
+ # the error message or cleaning up.
+ #
+ wait
while [ $# -gt 0 ]
do
echo $1
shift
done
+ rm -rf $modstatedir
+ rm -f $modlist
echo "Install failed"
exit 2
}
@@ -215,533 +224,269 @@ remove_dir() {
}
#
-# Copy kernel modules to $INSTALL_DIR
+# Create a directory if it doesn't already exist.
+# mkdir will provide an error message, so don't provide an additional
+# message.
#
-copy_kernel() {
- # The awk script below looks in Makefile.uts to find out what module
- # subdirectories to make. It then looks in Makefile.$KARCH (for root
- # modules) and Makefile.$ISA (for usr modules) to create a list of
- # all possible modules. Finally, it looks at each module's Makefile
- # to determine where it belongs and what links are required.
- # This script makes three assumptions:
- #
- # 1) Module subdirectories are specified in Makefile.uts by lines of the
- # form:
- #
- # ROOT_FOO_DIR = $(ROOT_MOD_DIR)/foo
- # USR_BAR_DIR = $(USR_MOD_DIR)/bar
- #
- # 2) The corresponding lists of modules appear in Makefile.$KARCH and
- # Makefile.$ISA on one or more lines of the form:
- #
- # FOO_KMODS = foo bar
- # FOO_KMODS += red white blue
- #
- # 3) Each module directory has a Makefile with lines of the form:
- #
- # ROOTMODULE = $(ROOT_FOO_DIR)/$(MODULE)
- # USRMODULE = $(USR_FOO_DIR)/$(MODULE)
- # ROOTLINK* = $(ROOT_BAR_DIR)/something
- # USRLINK* = $(USR_BAR_DIR)/something
- #
- # If the structure of Makefile.{$KARCH,uts,$ISA} changes in a way that
- # invalidates these assumptions, you'll need to pick up a new version of
- # Install.
-
- case $KARCH in
- sun4*) ISA=sparc; MACH=sparc; SUBISA_MAKE=;;
- i86pc) ISA=intel; MACH=i386; SUBISA_MAKE=$ISA/ia32/Makefile.ia32;;
- *) fail "${KARCH}: invalid kernel architecture";;
- esac
-
- if [ "$GLOM" = "no" ]; then
- verbose "Source = $UTS, ISA = $ISA, kernel = $KARCH"
- else
- verbose "Source = $UTS, ISA = $ISA, kernel = $KARCH, impl = $IMPL"
- fi
-
- UTS_MAKE=Makefile.uts
- ISA_MAKE=$ISA/Makefile.$ISA
- KARCH_MAKE=$KARCH/Makefile.$KARCH
- PSM_MAKE=$UTS/../Makefile.psm
-
- test -d $KARCH || fail "${KARCH}: invalid kernel architecture"
- test -d $ISA || fail "${ISA}: invalid instruction set architecture"
- test -s $UTS_MAKE || fail "Can't find $UTS_MAKE"
- test -s $ISA_MAKE || fail "Can't find $ISA_MAKE"
- test -s $KARCH_MAKE || fail "Can't find $KARCH_MAKE"
- test -s $PSM_MAKE || fail "Can't find $PSM_MAKE"
-
- #
- # For 5.8 and 5.9 we used to build a few x86 things in an ia32 subdirectory
- #
- [[ -n "$SUBISA_MAKE" && -s "$SUBISA_MAKE" ]] || SUBISA_MAKE=;
-
- if [ $GLOM = "yes" ]; then
- if [ -f $KARCH/$IMPL/Makefile.$IMPL ]; then
- IMPL_MAKE="$KARCH/$IMPL/Makefile.$IMPL"
- fi
- else
- IMPL_MAKE=`nawk -v karch="$KARCH" '
- $1 == "IMPLEMENTATIONS" {
- for (i = 3; i <= NF; i++)
- if ($i != ".WAIT")
- printf("%s ", karch "/" $i "/Makefile." $i)
- }' $KARCH_MAKE`
- fi
-
- DEVFS="./$ISA/devfs/Makefile"
+tstmkdir() {
+ [ -d $1 ] || mkdir -p $1 || fail
+}
- verbose "Copying files to ${INSTALL_FILES}..."
- test -d $INSTALL_FILES || mkdir -p $INSTALL_FILES
+#
+# Patch up target directories for glommed kernel.
+# usage: fixglom listfile glomname
+#
+fixglom() {
nawk \
- -v isa="$ISA" \
- -v mach="$MACH" \
- -v insd="$INSTALL_FILES" \
- -v files="$files" \
- -v verbose=$VERBOSE \
- -v karch=$KARCH \
- -v copy="$INSTALL_CP" \
- -v devfs=$DEVFS \
- -v auxfiles=$XFLAG \
- -v ptiflag=$PFLAG \
- -v glom=$GLOM \
- -v glomname=$GLOMNAME \
- -v impl=$IMPL \
- -v objd=$OBJD \
- -v want32=$WANT32 \
- -v want64=$WANT64 \
- '
- function run(s) {
- if (verbose != "q")
- print s
- if (system(s))
- exit 1
- }
- function cpf(f1,f2) {
- if (verbose != "q")
- print copy " " f1 " " f2
- if (system(copy " " f1 " " f2))
- print "WARNING: copy of " f1 " failed"
- }
- function mkdir(dir) {
- if (!touched[dir]) {
- run("test -d " dir " || mkdir -p " dir)
- touched[dir]=1
- }
- return dir
+ -v glomname=$2 \
+ -v karch=$KARCH '
+ $1 == "MOD" || $1 == "SYMLINK" {
+ sub(/^platform.*kernel/, "platform/" karch "/" glomname, $3)
+ sub(/^kernel/, "platform/" karch "/" glomname, $3)
+ sub(/^usr.kernel/, "platform/" karch "/" glomname, $3)
+ print
}
- function vprint(s) {
- if (verbose == "V")
- print s
+ $1 == "LINK" {
+ sub(/^platform.*kernel/, "platform/" karch "/" glomname, $2)
+ sub(/^kernel/, "platform/" karch "/" glomname, $2)
+ sub(/^usr.kernel/, "platform/" karch "/" glomname, $2)
+ sub(/^platform.*kernel/, "platform/" karch "/" glomname, $4)
+ sub(/^kernel/, "platform/" karch "/" glomname, $4)
+ sub(/^usr.kernel/, "platform/" karch "/" glomname, $4)
+ print
}
- function try_run(s) {
- if (verbose != "q")
- print s
- if (system(s))
- return 1
- return 0
- }
- function exist(s) {
- if (verbose != "q")
- print "test -f " s
- return !system("test -f " s)
- }
-
- function copymod(src, targ, om) {
- if (om) {
- run("if [ -f " src " ] ; then " \
- copy " " src " " targ " ; fi")
- } else {
- run(copy " " src " " targ)
- }
+ $1 == "CONF" {
+ sub(/^platform.*kernel/, "platform/" karch "/" glomname, $2)
+ sub(/^kernel/, "platform/" karch "/" glomname, $2)
+ sub(/^usr.kernel/, "platform/" karch "/" glomname, $2)
+ print
}
+ ' $1 > $1.new
+ mv $1.new $1
+}
- function copymod32(idx, modtarg) {
- modsrc = modsrcd[idx] "/" objd32 "/" modname[idx]
-
- if (!exist(modsrc))
- return (0)
-
- copymod(modsrc, modtarg, optmod[idx])
- return (1)
- }
-
- function copymod64(idx, modtarg) {
- modsrc = modsrcd[idx] "/" objd64 "/" modname[idx]
-
- if (!exist(modsrc))
- return (0)
+#
+# Remove entries from
+# usage: filtimpl listfile implname
+#
- copymod(modsrc, modtarg subdir64, optmod[idx])
- return (1)
+filtimpl() {
+ nawk \
+ -v impl=$2 '
+ $1 == "MOD" || $1 == "SYMLINK" {
+ if ($5 == "all" || $5 == impl)
+ print
}
-
- function linkmod(lmod, idx, modtarg, did32, did64) {
- if (lmod ~ /^...MODULE.$/)
- lmod = "/" modname[idx]
-
- if (did32 == "yes") {
- m = modtarg "/" modname[i]
- run("rm -f " dir lmod "; ln " m " " dir lmod)
- }
-
- if (did64 == "yes") {
- m = modtarg subdir64 "/" modname[i]
- run("rm -f " dir subdir64 lmod "; ln " m " " \
- dir subdir64 lmod)
- }
+ $1 == "CONF" {
+ if ($4 == "all" || $4 == impl)
+ print
}
+ $1 == "LINK" {
+ if ($6 == "all" || $6 == impl)
+ print
+ }
+ ' $1 > $1.new
+ mv $1.new $1
+}
- function slinkmod(slinktarg, idx, modtarg, did32, did64) {
- if (did32 == "yes") {
- slink = modtarg "/" slinktarg
- run("rm -f " slink "; ln -s " modname[i] " " slink)
- }
-
- if (did64 == "yes") {
- slink = modtarg subdir64 "/" slinktarg
- run("rm -f " slink "; ln -s " modname[i] " " slink)
+#
+# Filter the module list to match the user's request.
+# Usage: filtmod listfile modules
+#
+filtmod() {
+ nawk -v reqstring="$2" '
+ function modmatch(modname) {
+ if (reqstring == "All") {
+ return (1)
+ } else if (reqstring == "Modules") {
+ if (modname != "unix" && modname != "genunix")
+ return (1)
+ } else {
+ if (modname in reqmods)
+ return (1)
}
+ return (0)
}
-
BEGIN {
- # If you do NOT want the SVVS modules, set svvs to 0.
- svvs=1
- # If you do NOT want the excluded modules, set xmods to 0.
- xmods=1
-
- machkernel = "/platform/" karch "/" glomname
-
- nmods=0
- do32="no"
- do64="no"
- objd32=objd "32"
- objd64=objd "64"
- build64and32="no"
- }
-
- $1 == "SUBDIR64_" mach {
- vprint($0)
- subdir64="/" $3
- subdir64_relative=$3
+ #
+ # The split call creates indexes 1, 2, 3, ... We want
+ # the module names as indexes.
+ #
+ split(reqstring, tmpmods)
+ for (i in tmpmods)
+ reqmods[tmpmods[i]] = 1
}
-
- FILENAME == "Makefile.uts" && $1 == "ALL_BUILDS64" {
- vprint($0)
- if ($0 ~ /32/)
- build64and32="yes"
+ $1 == "MOD" {
+ if (modmatch($2))
+ print
}
-
- FILENAME == karch "/Makefile." karch && $1 == "ALL_BUILDS" {
- vprint($0)
- if ($3 ~ /32/)
- do32=want32
- if ($4 ~ /32/)
- build64and32="yes"
- if ($3 ~ /ALL_BUILDS64/ && build64and32 == "yes")
- do32=want32
- if ($3 ~ /64/ && want64)
- do64=want64
+ $1 == "CONF" {
+ if (modmatch($5))
+ print
}
-
- $1 ~ /^(ROOT|USR)_.+_DIR(_32)?$/ {
- vprint($0)
- if ($3 ~ /_..CLASS..$/)
- next
- slash=index($3,"/")
- sub(/_32$/,"",$1)
- if (!slash)
- slash=length($3)+1
- parent=substr($3,3,slash-4)
- subdir=substr($3,slash)
- if (parent == "ROOT")
- child=subdir
- else if (moddirs[parent]) {
- if ($3 ~ /..PLATFORM.$/)
- child=moddirs[parent] "/" karch
- else
- child=moddirs[parent] subdir
- } else {
- print "missing mod dir " parent
- exit 1
- }
- moddirs[$1]=child
- sub(/^.*kernel/,machkernel,child)
- glomdirs[$1]=child
- n=split($1,foo,"_")
- if (n == 4 && foo[2] != "PSM")
- notdef[$1]=tolower(foo[2])
+ $1 == "SYMLINK" {
+ if (modmatch($6))
+ print
}
-
- FILENAME != isa "/Makefile." isa && $1 ~ /^(GENLIB|UNIX)_DIR$/ {
- vprint($0)
- n=split($3,foo,"/")
- slash=index($3,"/")
- dir="." substr($3,slash)
- sub(/..PLATFORM./,karch,dir)
- nmods++
- modsrcd[nmods]=dir
- modname[nmods]=foo[n]
- unixmod[nmods]=1
+ $1 == "LINK" {
+ if (modmatch($3))
+ print
}
+ ' $1 > $1.new
+ mv $1.new $1
+}
- FILENAME != "Makefile.uts" && $1 ~ /KMODS|XMODS/ &&
- $1 != "GENUNIX_KMODS" {
- dir = FILENAME;
- sub(/\/Makefile.*$/, "", dir);
- if ($1 ~ "^SVVS_")
- if (svvs == 0)
- next
- else
- dir = dir "/svvs"
- if ($1 ~ "XMODS" && xmods == 0)
- next
- if ($0 !~ /\$/) {
- vprint($0)
- for (i = 3; i <= NF; i++) {
- if ($i ~ /^(ramdisk|wsdrv|vdi)$/)
- continue;
- nmods++
- modname[nmods]=$i
- modsrcd[nmods]="./" dir "/" $i
- if ($1 ~ "^MPSAS_")
- optmod[nmods] = 1
- }
- }
- }
+#
+# Copy a module, or create a link, as needed.
+# See $SRC/uts/Makefile.targ ($(MODLIST_DEPS) target) for the format
+# of the different input lines.
+#
+
+copymod() {
+ case $1 in
+ MOD)
+ targdir=$INSTALL_FILES/$3
+ tstmkdir $targdir
+ target=$targdir/$2
+ verbose "$INSTALL_CP $6/${OBJD}$4/$2 $target"
+ $INSTALL_CP $6/${OBJD}$4/$2 $target || \
+ fail "can't create $target"
+ ;;
+ SYMLINK)
+ targdir=$INSTALL_FILES/$3
+ tstmkdir $targdir
+ target=$targdir/$4
+ rm -f $target
+ verbose "ln -s $2 $target"
+ ln -s $2 $target || fail "can't create $target"
+ ;;
+ LINK)
+ targdir=$INSTALL_FILES/$4
+ tstmkdir $targdir
+ target=$targdir/$5
+ rm -f $target
+ verbose "ln $INSTALL_FILES/$2/$3 $target"
+ ln $INSTALL_FILES/$2/$3 $target || fail "can't create $target"
+ ;;
+ CONF)
+ target=$INSTALL_FILES/$2
+ tstmkdir `dirname $target`
+ conffile=`basename $2`
+ verbose "$INSTALL_CP $3/$conffile $target"
+ $INSTALL_CP $3/$conffile $target
+ ;;
+ *)
+ fail "unrecognized modlist entry: $*"
+ ;;
+ esac
+}
- FILENAME == karch "/Makefile." karch && $1 == "PLATFORMS" &&
- $3 !~ /\(/ {
- for (i = 3; i <= NF; i++)
- mkdir(insd "/platform/" $i)
- }
+#
+# Copy kernel modules to $INSTALL_DIR
+#
- FILENAME == karch "/Makefile." karch && ($1 == "IMPLEMENTED_PLATFORM" ||
- $1 == "LINKED_PLATFORMS") {
- for (i = 3; i <= NF; i++)
- mkdir(insd "/platform/" $i)
- }
+copy_kernel() {
- FILENAME != "Makefile.uts" && $1 == "CONFS" {
- for (i = 3; i <= NF; i++) {
- kbi_brain_damage[$i] = "yes"
- }
- }
+ case $KARCH in
+ sun4*) ISA=sparc; MACH=sparc ;;
+ i86pc) ISA=intel; MACH=i386 ;;
+ *) fail "${KARCH}: invalid kernel architecture";;
+ esac
+ export MACH
- END {
- split(files, modlist)
- for (m in modlist) {
- mm = modlist[m]
- if (mm == "modules") {
- for (i = 1; i <= nmods; i++)
- if (unixmod[i] == 0)
- modcopy[i]=1
- continue
- }
- nomodfound = 1
- for (i = 1; i <= nmods; i++) {
- if (modname[i] == mm) {
- modcopy[i]=1
- nomodfound = 0
- }
- }
- if (nomodfound) {
- print mm ": invalid module"
- exit 1
- }
- }
+ if [ "$GLOM" = "no" ]; then
+ verbose "Source = $UTS, ISA = $ISA, kernel = $KARCH"
+ else
+ verbose "Source = $UTS, ISA = $ISA, kernel = $KARCH, impl = $IMPL"
+ fi
- for(i = 1; i <= nmods; i++) {
- if (!modcopy[i])
- continue
-
- confsrc = ""
- drvfiles[1] = ""
- classfile = ""
- ptifile = ""
- did32=do32
- did64=do64
- no_builds="false"
- modmake=modsrcd[i] "/Makefile"
-
- while (getline <modmake > 0) {
- if ($1 == "NO_BUILDS") {
- vprint($0)
- no_builds="true"
- }
-
- if ($1 == "ALL_BUILDS" && $3 ~ /64/) {
- vprint($0)
- did32="ok"
- }
-
- if ($1 == "ALL_BUILDS" && $3 ~ /32/) {
- vprint($0)
- did64="ok"
- }
-
- if ($1 ~ /^(MODULE|UNIX)$/) {
- vprint($0)
- modname[i] = $3
- }
-
- if ($1 ~ /^(ROOT|USR)(LINK|MODULE$)/) {
- vprint($0)
- slash=index($3,"/")
- parent=substr($3,3,slash-4)
-
- if (notdef[parent] &&
- notdef[parent] != impl &&
- glom == "yes") {
- confsrc = ""
- break
- }
-
- dir = (glom == "no") ? \
- moddirs[parent] : glomdirs[parent]
- if (!dir) {
- print "no parent for " modname[i]
- exit 1
- }
-
- dir=insd dir
- mkdir(dir)
-
- if (do64 == "yes")
- mkdir(dir subdir64)
-
- if ($1 ~ /^(ROOT|USR)MODULE$/) {
- modtarg=dir
- conftarg=dir
- if (modname[i] in \
- kbi_brain_damage) {
- confsrc = "./" karch \
- "/io"
- conftarg = insd \
- machkernel "/drv"
-
- mkdir(conftarg)
-
- if (do64 == "yes") {
- mkdir(conftarg \
- subdir64)
- }
- }
-
- if (do32 == "yes" &&
- !copymod32(i, modtarg))
- did32="no"
-
- if (do64 == "yes" &&
- !copymod64(i, modtarg))
- did64="no"
-
- } else {
- linkmod(substr($3, slash),
- i, modtarg, did32, did64)
- }
- }
-
- if ($1 == "SOFTLINKS") {
- vprint($0)
- for (j = 3; j <= NF; j++) {
- slinkmod($j, i, modtarg, did32,
- did64)
- }
- }
-
- if ($1 == "CONF_SRCDIR") {
- vprint($0)
- slash = index($3, "/")
- confsrc = "." substr($3, slash)
- }
- }
-
- if (do32 == "yes" && did32 == "no" &&
- no_builds == "false") {
- print "missing 32b file " confsrc "/" modname[i]
- exit 1
- }
-
- if (do64 == "yes" && did64 == "no" &&
- no_builds == "false") {
- print "missing 64b file " confsrc "/" modname[i]
- exit 1
- }
-
- if (confsrc != "") {
- conffile = confsrc "/" modname[i] ".conf"
- cpf(conffile, conftarg)
- }
-
- close(modmake)
- }
+ test -d $KARCH || fail "${KARCH}: invalid kernel architecture"
+ test -d $ISA || fail "${ISA}: invalid instruction set architecture"
- #
- # Make symlinks for KBI for different root node names for a
- # given platform
- #
- km = "./" karch "/Makefile"
- while (getline <km > 0) {
- if ($1 == "PLAT_LINKS") {
- for (i = 3; i <= NF; i++) {
- mkdir(insd "/platform")
- run("ln -s " karch " " insd \
- "/platform/" $i)
- }
- }
- }
- close(km)
-
- if (did64 == "yes" && build64and32 == "no" &&
- (try_run("test -f " insd "/platform/" karch "/" \
- glomname "/" subdir64_relative "/unix") == 0))
- {
- run("ln -s " subdir64_relative "/unix " insd \
- "/platform/" karch "/" glomname "/unix")
-
- if (isa == "sparc" && glom == "no" &&
- (try_run("test -f " insd \
- "/platform/SUNW,Ultra-Enterprise-10000/" glomname \
- "/" subdir64_relative "/unix") == 0)) {
- run("ln -s " subdir64_relative "/unix " insd \
- "/platform/SUNW,Ultra-Enterprise-10000/" \
- glomname "/unix")
- }
- }
+ tstmkdir $INSTALL_FILES
+ rm -rf $modstatedir
+ tstmkdir $modstatedir
+ export MODSTATE=$modstatedir/state
- while (getline <devfs > 0) {
- if ($1 == "SRCDIR")
- configdir = "." substr($3, index($3, "/")) "/"
- if ($1 == "CLASSFILE")
- classfile = $3
- if ($1 == "PTIFILE")
- ptifile = $3
- if ($1 == "DRVFILES")
- split(substr($0, index($0, $3)), drvfiles)
- }
- close(devfs)
+ #
+ # Figure out which "make" to use. dmake is faster than serial
+ # make, but dmake 7.3 has a bug that causes it to lose log
+ # output, which means the modlist might be incomplete.
+ #
+ make=dmake
+ dmvers=`$make -version`
+ if [ $? -ne 0 ]; then
+ make=/usr/ccs/bin/make
+ elif [[ $dmvers = *Distributed?Make?7.3* ]]; then
+ unset make
+ searchpath="/ws/onnv-tools/SUNWspro/SOS10/bin
+ /opt/SUNWspro/SOS10/bin
+ /opt/SUNWspro/bin"
+ for dmpath in $searchpath; do
+ verbose "Trying $dmpath/dmake"
+ if [ -x $dmpath/dmake ]; then
+ dmvers=`$dmpath/dmake -version`
+ if [[ $dmvers != *Distributed?Make?7.3* ]]; then
+ make="$dmpath/dmake"
+ break;
+ fi
+ fi
+ done
+ if [ -z $make ]; then
+ make=/usr/ccs/bin/make
+ echo "Warning: dmake 7.3 doesn't work with Install;" \
+ "using $make"
+ fi
+ fi
- if (classfile != "" && auxfiles == 1) {
- dir = mkdir(targ["ROOT_DRV"])
- cpf(configdir classfile, dir)
- }
+ #
+ # Get a list of all modules, configuration files, and links
+ # that we might want to install.
+ #
+ verbose "Building module list..."
+ (cd $KARCH; MAKEFLAGS=e $make -K $MODSTATE modlist.karch) | \
+ egrep "^MOD|^CONF|^LINK|^SYMLINK" > $modlist
+ [ $VERBOSE = "V" ] && cat $modlist
+ if [ "$GLOM" = "yes" ]; then
+ fixglom $modlist $GLOMNAME
+ filtimpl $modlist $IMPL
+ fi
+ if [[ -n "$files" && "$files" != All ]]; then
+ filtmod $modlist "$files"
+ fi
- if (ptifile != "" && ptiflag == 1) {
- dir = mkdir(insd "/etc")
- cpf(configdir ptifile, dir)
- }
+ #
+ # Copy modules and create links. For architectures with both
+ # 32- and 64-bit modules, we'll likely have duplicate
+ # configuration files, so do those after filtering out the
+ # duplicates.
+ #
+ verbose "Copying files to ${INSTALL_FILES}..."
- if (drvfiles[1] != "" && auxfiles == 1) {
- dir = mkdir(insd "/etc")
- for (file in drvfiles)
- cpf(configdir drvfiles[file], dir)
- }
- }' $UTS_MAKE $PSM_MAKE $ISA_MAKE $SUBISA_MAKE $KARCH_MAKE $IMPL_MAKE
- [[ $? -ne 0 ]] && fail "Files missing in environment"
+ #
+ # The IFS is reset to the newline character so we can buffer the
+ # output of grep without piping it directly to copymod, otherwise
+ # if fail() is called, then it will deadlock in fail()'s wait call
+ #
+ OIFS="$IFS"
+ IFS="
+ "
+ set -- `grep -v "^CONF" $modlist`;
+ IFS="$OIFS"
+ for onemod in "$@"; do
+ copymod $onemod
+ done
+
+ OIFS="$IFS"
+ IFS="
+ "
+ set -- `grep "^CONF" $modlist | sort | uniq`;
+ IFS="$OIFS"
+ for onemod in "$@"; do
+ copymod $onemod
+ done
#
# on x86, add the glommed kernel name to the root archive
@@ -874,6 +619,10 @@ copy_kmdb() {
machdir=$INSTALL_FILES/kernel
fi
+ srctrees=$SRC
+ if [[ -d $SRC/../closed && "$CLOSED_IS_PRESENT" != no ]]; then
+ srctrees="$srctrees $SRC/../closed"
+ fi
if [[ $WANT64 = "yes" ]] ; then
# kmdbmod for sparc and x86 are built and installed
# in different places
@@ -888,10 +637,13 @@ copy_kmdb() {
if kmdb_copy_kmdbmod $kmdbpath $destdir ; then
foundkmdb="yes"
- kmdb_copy_machkmods $SRC/cmd/mdb/$isadir/$b64srcdir \
- $machdir/kmdb/$b64tgtdir
- kmdb_copy_karchkmods $SRC/cmd/mdb/$KARCH \
- $platdir/kmdb/$b64tgtdir $b64srcdir
+ for tree in $srctrees; do
+ kmdb_copy_machkmods \
+ $tree/cmd/mdb/$isadir/$b64srcdir \
+ $machdir/kmdb/$b64tgtdir
+ kmdb_copy_karchkmods $tree/cmd/mdb/$KARCH \
+ $platdir/kmdb/$b64tgtdir $b64srcdir
+ done
fi
fi
@@ -902,10 +654,13 @@ copy_kmdb() {
if kmdb_copy_kmdbmod $kmdbpath $destdir ; then
foundkmdb="yes"
- kmdb_copy_machkmods $SRC/cmd/mdb/$isadir/$b32srcdir \
- $machdir/kmdb/$b32tgtdir
- kmdb_copy_karchkmods $SRC/cmd/mdb/$KARCH \
- $platdir/kmdb/$b32tgtdir $b32srcdir
+ for tree in $srctrees; do
+ kmdb_copy_machkmods \
+ $tree/cmd/mdb/$isadir/$b32srcdir \
+ $machdir/kmdb/$b32tgtdir
+ kmdb_copy_karchkmods $tree/cmd/mdb/$KARCH \
+ $platdir/kmdb/$b32tgtdir $b32srcdir
+ done
fi
fi
@@ -998,6 +753,8 @@ okexit() {
cd /tmp
test "$CLEANUP" = c && remove_dir $INSTALL_DIR
save_state
+ rm -rf $modstatedir
+ rm -f $modlist
verbose "Install complete"
exit 0
}
@@ -1027,8 +784,8 @@ do
t|T) TARGET="$OPTARG"; IMODE=$opt; CLEANUP="c";;
n) TARGET=""; IMODE="n"; CLEANUP="p";;
u) files="unix genunix";;
- m) files="modules";;
- a) files="unix genunix modules";;
+ m) files="Modules";;
+ a) files="All";;
v|V|q) VERBOSE=$opt;;
c|p) CLEANUP=$opt;;
L) LIBCREATE="yes"; CLEANUP="c";;
@@ -1036,8 +793,7 @@ do
D) INSTALL_LIB="$OPTARG";;
d) INSTALL_DIR="$OPTARG/$TRAILER";;
G) GLOM=yes; GLOMNAME="$OPTARG";;
- x) XFLAG=1;;
- X) XFLAG=0;;
+ X|x) echo "-$opt is obsolete; ignored";;
P) PFLAG=1;;
h) usage "${INSTALL}: installs unix and modules";;
R) x=$OPTIND; restore_state; OPTIND=$x;;
@@ -1073,7 +829,7 @@ esac
# Create temp directory for Install's files
#
-test -d $INSTALL_DIR || mkdir -p $INSTALL_DIR || fail "Can't mkdir $INSTALL_DIR"
+tstmkdir $INSTALL_DIR
TARFILE=$INSTALL_DIR/Install.${KARCH}.tar
INSTALL_FILES=$INSTALL_DIR/$KARCH
@@ -1114,14 +870,12 @@ if [ -n "$LIBSRC" ]; then
verbose "Installing from library tarfile $TARFILE"
STATE=3
elif [ "$LIBCREATE" = "yes" ]; then
- test -d $INSTALL_LIB \
- || mkdir -p $INSTALL_LIB \
- || fail "Can't mkdir $INSTALL_LIB"
+ tstmkdir $INSTALL_LIB
TARFILE="$INSTALL_LIB/${ENV_NAME}.${KARCH}.tar"
fi
#
-# The next three lines allow recovery and activation with -R,
+# The next few lines allow recovery and activation with -R,
# and library installs with -l.
#
@@ -1143,6 +897,11 @@ DOTDOT=`cd ..; pwd`
if [ "`basename $DOTDOT`" = "uts" ]; then
UTS=$DOTDOT
KARCH=`basename $DOT`
+ if [ ! -n "$SRC" ]; then
+ SRC=`dirname $DOTDOT`
+ verbose "Setting SRC to $SRC"
+ fi
+ export SRC
fi
if [ -z "$UTS" -a -n "$SRC" ]; then
diff --git a/usr/src/tools/scripts/bldenv.sh b/usr/src/tools/scripts/bldenv.sh
index 28c5a3505f..dfa837d8d2 100644
--- a/usr/src/tools/scripts/bldenv.sh
+++ b/usr/src/tools/scripts/bldenv.sh
@@ -138,6 +138,15 @@ shift
#MACH=`uname -p`
+if [ -z "$CLOSED_IS_PRESENT" ]; then
+ if [ -d $SRC/../closed ]; then
+ CLOSED_IS_PRESENT="yes"
+ else
+ CLOSED_IS_PRESENT="no"
+ fi
+ export CLOSED_IS_PRESENT
+fi
+
# must match the getopts in nightly.sh
OPTIND=1
while getopts ABDFMNPTCGIRafinlmoptuUxdrtzWS:X FLAG $NIGHTLY_OPTIONS
diff --git a/usr/src/tools/scripts/build_osnet.sh b/usr/src/tools/scripts/build_osnet.sh
index 10ca27be3b..7190d9a9b5 100644
--- a/usr/src/tools/scripts/build_osnet.sh
+++ b/usr/src/tools/scripts/build_osnet.sh
@@ -21,7 +21,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -283,7 +283,7 @@ export VERSION
echo "\n==== Disk space used (Source) ====\n"
cd ${BUILDAREA}
-/usr/bin/du -s -k usr/src
+/usr/bin/du -s -k usr
mkdir -p ${ROOT}
mkdir -p ${PKGARCHIVE}
@@ -330,7 +330,7 @@ egrep "${MAKE}|ERROR|WARNING" $SRC/pkgdefs/install.out | \
echo "\n==== Disk space used (Source/Build/Packages) ====\n"
cd ${BUILDAREA}
-/usr/bin/du -s -k usr/src proto packages
+/usr/bin/du -s -k usr proto packages
#
# Copy packages into /pkgs location
diff --git a/usr/src/tools/scripts/checkproto.sh b/usr/src/tools/scripts/checkproto.sh
index 065ff2e6aa..03f52cc5ed 100644
--- a/usr/src/tools/scripts/checkproto.sh
+++ b/usr/src/tools/scripts/checkproto.sh
@@ -72,10 +72,12 @@ PROTO=${WS}/proto/root_${MACH}
rm -f $PLIST
-PKGDEFS=${SRC}/pkgdefs
+PKGDEFS_FLG="-d ${SRC}/pkgdefs"
+[ -d ${SRC}/../closed ] && \
+ PKGDEFS_FLG="$PKGDEFS_FLG -d ${SRC}/../closed/pkgdefs"
EXCEPTION=${PKGDEFS}/etc/exception_list_${MACH}
protolist ${PROTO} > $PLIST
-protocmp ${GUFLAG} -e ${EXCEPTION} -d ${PKGDEFS} ${PLIST}
+protocmp ${GUFLAG} -e ${EXCEPTION} ${PKGDEFS_FLG} ${PLIST}
rm -f $PLIST
diff --git a/usr/src/tools/scripts/makebfu.sh b/usr/src/tools/scripts/makebfu.sh
index 29fe8cbc40..951a769833 100644
--- a/usr/src/tools/scripts/makebfu.sh
+++ b/usr/src/tools/scripts/makebfu.sh
@@ -94,6 +94,12 @@ echo "Making ${archivetype}archives from $ROOT in $CPIODIR."
if [ "$o_FLAG" != "y" -a -n "$MACH" -a -n "$SRC" -a -d "$SRC/pkgdefs" ]; then
pkg=$SRC/pkgdefs
bpkg=$SRC/realmode/pkgdefs
+ if [[ -d $SRC/../closed/pkgdefs && \
+ "$CLOSED_IS_PRESENT" != no ]]; then
+ cpkg=$SRC/../closed/pkgdefs
+ else
+ cpkg=""
+ fi
exc=etc/exception_list_$MACH
if [ "$X_FLAG" = "y" ]; then
ipkg=$IA32_IHV_WS/usr/src/pkgdefs
@@ -106,7 +112,7 @@ if [ "$o_FLAG" != "y" -a -n "$MACH" -a -n "$SRC" -a -d "$SRC/pkgdefs" ]; then
# packaging.
# usr/lib/fs/ufs/mboot and a few friends are in $SRC/realmode/pkgdefs,
# so the regular build also needs this packaging data.
- mkbfu -f "cpiotranslate -e $pkg/$exc $bpkgargs $pkg" \
+ mkbfu -f "cpiotranslate -e $pkg/$exc $bpkgargs $pkg $cpkg" \
$zflag $ROOT $CPIODIR
else
mkbfu $zflag $ROOT $CPIODIR
diff --git a/usr/src/tools/scripts/mkacr.sh b/usr/src/tools/scripts/mkacr.sh
index 3308c8bca5..f097bc635c 100644
--- a/usr/src/tools/scripts/mkacr.sh
+++ b/usr/src/tools/scripts/mkacr.sh
@@ -385,6 +385,10 @@ bfu_incompatible_classes="
process_pkgdefs_directory $workspace/pkgdefs std
+if [[ -d $workspace/../closed/pkgdefs && "$CLOSED_IS_PRESENT" != no ]]; then
+ process_pkgdefs_directory $workspace/../closed/pkgdefs std-closed
+fi
+
#
# set up the list of corepkgs and bfs-incompatible classes for the
# processing of the usr/src/realmode/pkgdefs directory
diff --git a/usr/src/tools/scripts/nightly.sh b/usr/src/tools/scripts/nightly.sh
index becc878899..9e2438260f 100644
--- a/usr/src/tools/scripts/nightly.sh
+++ b/usr/src/tools/scripts/nightly.sh
@@ -1018,6 +1018,37 @@ if [ "$BRINGOVER_FILES" = "" ]; then
BRINGOVER_FILES="usr"
fi
+if [ -z "$CLOSED_IS_PRESENT" ]; then
+ #
+ # See if the closed tree is present. If the current workspace
+ # is empty, check the bringover workspace. (This is for
+ # builds that start out with nothing but the environment
+ # file.)
+ #
+ if [ -d $SRC/../closed ]; then
+ CLOSED_IS_PRESENT="yes"
+ elif [ -d $SRC ]; then
+ CLOSED_IS_PRESENT="no"
+ elif [ -d $CLONE_WS/usr/closed ]; then
+ CLOSED_IS_PRESENT="yes"
+ else
+ CLOSED_IS_PRESENT="no"
+ fi
+ export CLOSED_IS_PRESENT
+fi
+
+#
+# If the closed sources are not present, the closed binaries must be
+# present for the build to succeed. If there's no pointer to the
+# closed binaries, flag that now, rather than forcing the user to wait
+# a couple hours (or more) to find out.
+#
+if [[ "$CLOSED_IS_PRESENT" = no && ! -d "$ON_CLOSED_BINS" ]]; then
+ echo "If the closed sources are not present, ON_CLOSED_BINS"
+ echo "must point to the closed binaries tree."
+ exit 1
+fi
+
#
# Note: changes to the option letters here should also be applied to the
# bldenv script.
@@ -1147,7 +1178,9 @@ export PATH
# roots of source trees, both relative to $SRC and absolute.
relsrcdirs="."
-[ -d $SRC/../closed ] && relsrcdirs="$relsrcdirs ../closed"
+if [[ -d $SRC/../closed && "$CLOSED_IS_PRESENT" != no ]]; then
+ relsrcdirs="$relsrcdirs ../closed"
+fi
abssrcdirs=""
for d in $relsrcdirs; do
abssrcdirs="$abssrcdirs $SRC/$d"
@@ -2215,10 +2248,10 @@ if [ "$M_FLAG" != "y" -a "$build_ok" = y ]; then
# Get pkginfo files from usr/src/pkgdefs
#
pmodes -qvdP \
- `for d in $SRC/pkgdefs $SRC/../closed/pkgdefs; do
- if [ -d "$d" ]
+ `for d in $abssrcdirs; do
+ if [ -d "$d/pkgdefs" ]
then
- find $d -name pkginfo.tmpl -print -o -name .del\* -prune
+ find $d/pkgdefs -name pkginfo.tmpl -print -o -name .del\* -prune
fi
done | sed -e 's:/pkginfo.tmpl$::' | sort -u ` >> $mail_msg_file
fi
diff --git a/usr/src/tools/scripts/validate_flg.pl b/usr/src/tools/scripts/validate_flg.pl
index adc86e7046..b0c2390ea7 100644
--- a/usr/src/tools/scripts/validate_flg.pl
+++ b/usr/src/tools/scripts/validate_flg.pl
@@ -21,7 +21,7 @@
# CDDL HEADER END
#
-# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -132,7 +132,7 @@ sub wanted {
$f_flg = $ARGV[0] eq "-f";
shift @ARGV if $f_flg;
-$basedir = "usr/src";
+$basedir = "usr";
if ($#ARGV == 0) {
$basedir = shift @ARGV;
} elsif ($#ARGV > 0) {
diff --git a/usr/src/uts/Makefile b/usr/src/uts/Makefile
index aed8c29bcf..a3a6e1a383 100644
--- a/usr/src/uts/Makefile
+++ b/usr/src/uts/Makefile
@@ -48,6 +48,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
clean.lint := TARGET= clean.lint
check := TARGET= check
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
.KEEP_STATE:
@@ -61,14 +63,14 @@ clean clobber: $($(MACH)_ARCHITECTURES)
$(RM) $(PMTMO_FILE) ; \
fi
-clean.lint: $($(MACH)_ARCHITECTURES)
+clean.lint modlist: $($(MACH)_ARCHITECTURES)
install_dirs:
@cd ..; pwd; $(MAKE) rootdirs
@pwd
$($(MACH)_ARCHITECTURES): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(PMTMO_FILE) pmtmo_file: $(PATCH_MAKEUP_TABLE)
@if [ -z "$(PATCH_MAKEUP_TABLE)" ] ; then \
@@ -95,6 +97,10 @@ COMMON_HDRDIRS= common/des common/fs common/gssapi common/inet common/net \
common/c2 common/pcmcia/sys common/rpcsvc common/inet/kssl \
common/inet/nca common/ipp
+# These aren't the only headers in closed. But the other directories
+# are simple enough that they can be driven from the src tree.
+$(CLOSED_BUILD)COMMON_HDRDIRS += $(CLOSED)/uts/common/sys
+
sparc_HDRDIRS= sun/sys
i386_HDRDIRS= i86pc/vm
@@ -130,7 +136,12 @@ ONC_PLUS: $(ONC_FILES:%=%_onc_plus)
# the user will be interested in), it's historically been set to
# mirror the $(XRDIRS) list, and that works kinda sorta okay.
#
-XRDIRS = $(sparc_ARCHITECTURES) $(i386_ARCHITECTURES) sun4 sfmmu sun common
+SHARED_XRDIRS = $(sparc_ARCHITECTURES) $(i386_ARCHITECTURES) sun4 sfmmu \
+ sun common
+CLOSED_XRDIRS = $(SHARED_XRDIRS:%=% ../../closed/uts/%)
+XRDIRS = $(SHARED_XRDIRS)
+$(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS:../../closed/uts/sfmmu=)
+
XRINCDIRS = $(XRDIRS)
cscope.out tags: FRC
diff --git a/usr/src/uts/Makefile.targ b/usr/src/uts/Makefile.targ
index 98dea3c8a4..aebc896db7 100644
--- a/usr/src/uts/Makefile.targ
+++ b/usr/src/uts/Makefile.targ
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -262,32 +261,35 @@ clean $(CLEAN_DEPS) := TARGET = clean
clobber $(CLOBBER_DEPS) := TARGET = clobber
lint $(LINT_DEPS) := TARGET = lint
modlintlib $(MODLINTLIB_DEPS) := TARGET = modlintlib
+modlist $(MODLIST_DEPS) := TARGET = modlist
+modlist $(MODLIST_DEPS) := NO_STATE= -K $$MODSTATE$$$$
clean.lint $(CLEAN_LINT_DEPS) := TARGET = clean.lint
install $(INSTALL_DEPS) := TARGET = install
symcheck $(SYM_DEPS) := TARGET = symcheck
-ALL_TARGS = def all clean clobber lint modlintlib clean.lint lintlib install symcheck
+ALL_TARGS = def all clean clobber lint modlintlib \
+ clean.lint lintlib install symcheck
ALL_OBJ32 = $(ALL_TARGS:%=%.obj32)
$(ALL_OBJ32): FRC
- @BUILD_TYPE=OBJ32 VERSION='$(VERSION)' $(MAKE) $(TARGET).targ
+ @BUILD_TYPE=OBJ32 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ
ALL_DEBUG32 = $(ALL_TARGS:%=%.debug32)
$(ALL_DEBUG32): FRC
- @BUILD_TYPE=DBG32 VERSION='$(VERSION)' $(MAKE) $(TARGET).targ
+ @BUILD_TYPE=DBG32 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ
ALL_OBJ64 = $(ALL_TARGS:%=%.obj64)
$(ALL_OBJ64): FRC
- @BUILD_TYPE=OBJ64 VERSION='$(VERSION)' $(MAKE) $(TARGET).targ
+ @BUILD_TYPE=OBJ64 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ
ALL_DEBUG64 = $(ALL_TARGS:%=%.debug64)
$(ALL_DEBUG64): FRC
- @BUILD_TYPE=DBG64 VERSION='$(VERSION)' $(MAKE) $(TARGET).targ
+ @BUILD_TYPE=DBG64 VERSION='$(VERSION)' $(MAKE) $(NO_STATE) $(TARGET).targ
$(OBJS_DIR):
@@ -304,6 +306,87 @@ modlintlib.targ: $(OBJS_DIR) $(MOD_LINT_LIB)
install.targ: $(OBJS_DIR) $(INSTALL_TARGET)
#
+# Support for Install.sh.
+#
+
+modlist: $(MODLIST_DEPS)
+
+# paths relative to $(ROOT).
+RELMODULE = $(ROOTMODULE:$(ROOT)/%=%)
+RELCONF = $(ROOT_CONFFILE:$(ROOT)/%=%)
+RELLINK = $(ROOTLINK:$(ROOT)/%=%)
+RELUNIX = $(UNIX32_LINK:$(ROOT)/%=%)
+RELSOFTLINKS = $(ROOTSOFTLINKS:$(ROOT)/%=%)
+
+MODSRC:sh= pwd
+
+#
+# Changes to this target may require corresponding changes to
+# Install.sh.
+# Don't issue a MOD entry if it's not in the install list.
+#
+$(MODLIST_DEPS): FRC
+ @case $@ in \
+ *32) \
+ class=32; \
+ relmodule=`dirname $(RELMODULE)`; \
+ rellink=`dirname $(RELLINK)`;; \
+ *64) \
+ class=64; \
+ relmodule=`dirname $(RELMODULE)`/$(SUBDIR64); \
+ rellink=`dirname $(RELLINK)`/$(SUBDIR64);; \
+ esac; \
+ if [ -z "$(THISIMPL)" ]; then \
+ impl=all; \
+ else \
+ impl=$(THISIMPL); \
+ fi; \
+ if [ -n "$(ROOTMODULE)" -a -n "$(INSTALL_TARGET)" ]; then \
+ if [ -z "$(MODULE)" ]; then \
+ module=`basename $(ROOTMODULE)`; \
+ else \
+ module=$(MODULE); \
+ fi; \
+ tinstall="$(INSTALL_TARGET)"; \
+ for t in $$tinstall; do \
+ if [ "$(ROOTMODULE)" = $$t ]; then \
+ echo MOD $$module $$relmodule \
+ $$class $$impl $(MODSRC); \
+ break; \
+ fi \
+ done \
+ fi; \
+ if [ -n "$(CONF_SRCDIR)" ]; then \
+ tinstall="$(INSTALL_TARGET)"; \
+ for t in $$tinstall; do \
+ if [ $(ROOT_CONFFILE) = $$t ]; then \
+ echo CONF $(RELCONF) \
+ $(MODSRC)/$(CONF_SRCDIR) $$impl $$module; \
+ break; \
+ fi \
+ done \
+ fi; \
+ if [ -n "$(ROOTLINK)" ]; then \
+ echo LINK $$relmodule $$module \
+ $$rellink `basename $(RELLINK)` $$impl; \
+ fi; \
+ if [ -n "$(UNIX32_LINK)" ]; then \
+ echo SYMLINK $(SUBDIR64)/$(UNIX) \
+ `dirname $(RELUNIX)` unix $$impl $$module; \
+ fi; \
+ trelsoftlinks="$(RELSOFTLINKS)"; \
+ for t in $$trelsoftlinks; do \
+ if [ $$class = 32 ]; then \
+ linkdir=`dirname $$t`; \
+ else \
+ linkdir=`dirname $$t`/$(SUBDIR64); \
+ fi; \
+ linkname=`basename $$t`; \
+ echo SYMLINK $(MODULE) $$linkdir $$linkname \
+ $$impl $$module; \
+ done
+
+#
# Cleanliness is next to ...
#
clean.targ:
diff --git a/usr/src/uts/Makefile.uts b/usr/src/uts/Makefile.uts
index aacf71100e..6ecce7e4f7 100644
--- a/usr/src/uts/Makefile.uts
+++ b/usr/src/uts/Makefile.uts
@@ -270,6 +270,7 @@ CLEAN_DEPS = $(ALL_BUILDS:%=clean.%)
CLOBBER_DEPS = $(ALL_BUILDS:%=clobber.%)
LINT_DEPS = $(DEF_BUILDS:%=lint.%)
MODLINTLIB_DEPS = $(DEF_BUILDS:%=modlintlib.%)
+MODLIST_DEPS = $(DEF_BUILDS:%=modlist.%)
CLEAN_LINT_DEPS = $(ALL_BUILDS:%=clean.lint.%)
INSTALL_DEPS = $(DEF_BUILDS:%=install.%)
SYM_DEPS = $(SYM_BUILDS:%=symcheck.%)
@@ -596,12 +597,19 @@ KMODS = $(DRV_KMODS) $(EXEC_KMODS) $(FS_KMODS) $(SCHED_KMODS) $(TOD_KMODS) \
$(IPP_KMODS) $(CRYPTO_KMODS) $(CRYPTO_EK_KMODS) $(PCBE_KMODS) \
$(DRV_KMODS_$(CLASS)) $(MISC_KMODS_$(CLASS))
+$(CLOSED_BUILD)CLOSED_KMODS = $(CLOSED_DRV_KMODS) $(CLOSED_TOD_KMODS) \
+ $(CLOSED_MISC_KMODS) \
+ $(CLOSED_NLMISC_KMODS) $(CLOSED_DRV_KMODS_$(CLASS))
+
LINT_KMODS = $(DRV_KMODS) $(EXEC_KMODS) $(FS_KMODS) $(SCHED_KMODS) \
$(TOD_KMODS) $(STRMOD_KMODS) $(SYS_KMODS) $(MISC_KMODS) \
$(MACH_KMODS) $(GSS_KMODS) $(DACF_KMODS) $(IPP_KMODS) \
$(CRYPTO_KMODS) $(PCBE_KMODS) \
$(DRV_KMODS_$(CLASS)) $(MISC_KMODS_$(CLASS))
+$(CLOSED_BUILD)CLOSED_LINT_KMODS = $(CLOSED_DRV_KMODS) $(CLOSED_TOD_KMODS) \
+ $(CLOSED_MISC_KMODS) $(CLOSED_DRV_KMODS_$(CLASS))
+
THIS_YEAR:sh= /bin/date +%Y
$(OBJS_DIR)/logsubr.o := CPPFLAGS += -DTHIS_YEAR=$(THIS_YEAR)
$(OBJS_DIR)/logsubr.ln := CPPFLAGS += -DTHIS_YEAR=$(THIS_YEAR)
diff --git a/usr/src/uts/README b/usr/src/uts/README
index c036aa6054..132edb7b50 100644
--- a/usr/src/uts/README
+++ b/usr/src/uts/README
@@ -19,7 +19,7 @@
#
# CDDL HEADER END
#
-# Copyright 2000 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -151,6 +151,10 @@ uts/sun4c/unix.static/Makefile
to build multiple configurations. This configuration is roughly
equivalent to the GENERIC kernel of SunOS 4.x.
+uts/*/Makefile.?.shared
+ These denote Makefile contents which are shared between open and
+ closed builds.
+
The Makefiles are verbosely commented. It is desired that they should
stay this way.
diff --git a/usr/src/uts/common/Makefile.files b/usr/src/uts/common/Makefile.files
index 4cb22c4ee1..7be9d00998 100644
--- a/usr/src/uts/common/Makefile.files
+++ b/usr/src/uts/common/Makefile.files
@@ -25,7 +25,7 @@
#
# ident "%Z%%M% %I% %E% SMI"
#
-# This Makefile defines all file modules for the directory uts/common
+# This Makefile defines all file modules for the directory uts/common
# and its children. These are the source files which may be considered
# common to all SunOS systems.
@@ -363,16 +363,12 @@ AUDIOVIA823X_OBJS += audiovia823x.o
AUDIO810_OBJS += audio810.o
-AUDIOENS_OBJS += audioens.o
-
AUDIOTS_OBJS += audiots.o
CONSKBD_OBJS += conskbd.o
CONSMS_OBJS += consms.o
-DAPLT_OBJS += daplt.o
-
DIAUDIO_OBJS += audio.o
OLDPTY_OBJS += tty_ptyconf.o
@@ -507,11 +503,6 @@ MAC_OBJS += mac.o mac_mod.o mac_stat.o
AGGR_OBJS += aggr_dev.o aggr_ctl.o aggr_grp.o aggr_port.o \
aggr_send.o aggr_recv.o aggr_lacp.o
-TAVOR_OBJS += tavor.o tavor_agents.o tavor_cfg.o tavor_ci.o tavor_cmd.o \
- tavor_cq.o tavor_event.o tavor_ioctl.o tavor_misc.o \
- tavor_mr.o tavor_qp.o tavor_qpmod.o tavor_rsrc.o \
- tavor_srq.o tavor_stats.o tavor_umap.o tavor_wr.o
-
IB_OBJS += ibnex.o ibnex_ioctl.o
IBCM_OBJS += ibcm_impl.o ibcm_sm.o ibcm_ti.o ibcm_utils.o ibcm_path.o
@@ -583,10 +574,6 @@ UGEN_OBJS += ugen.o
USBSER_OBJS += usbser.o usbser_rseq.o
-USBSER_EDGE_OBJS += usbser_edge.o edge_dsd.o edge_dsd_sp.o edge_dsd_ti.o \
- edge_pipe.o edge_subr.o \
- edge_fw_down.o edge_fw_down_g2.o edge_fw_down_ti.o
-
USBSER_KEYSPAN_OBJS += usbser_keyspan.o keyspan_dsd.o keyspan_pipe.o
USBSPRL_OBJS += usbser_pl2303.o pl2303_dsd.o
@@ -635,8 +622,6 @@ SBP2_OBJS += cfgrom.o sbp2.o
PMODEM_OBJS += pmodem.o pmodem_cis.o cis.o cis_callout.o cis_handlers.o cis_params.o
-SGEN_OBJS += sgen.o
-
ST_OBJS += st.o st_conf.o
SYSMSG_OBJS += sysmsg.o
@@ -713,16 +698,8 @@ EMUL64_OBJS += emul64.o emul64_bsd.o
ZCONS_OBJS += zcons.o
-#
-# The GHD files are currently shared source and not yet a driver module
-#
-GHD_OBJS += ghd.o ghd_debug.o ghd_dma.o ghd_queue.o ghd_scsa.o \
- ghd_scsi.o ghd_timer.o ghd_waitq.o ghd_gcmd.o
-
PCIIDE_OBJS += pci-ide.o
-PCN_OBJS += pcn.o
-
PCEPP_OBJS += pcepp.o
CPC_OBJS += cpc.o
@@ -957,10 +934,6 @@ RPCMOD_OBJS += rpcmod.o clnt_cots.o clnt_clts.o \
rpcsys.o xdr_sizeof.o clnt_rdma.o svc_rdma.o \
xdr_rdma.o rdma_subr.o xdrrdma_sizeof.o
-KLMMOD_OBJS += klmmod.o lm_subr.o lm_xdr.o lm_server.o
-
-KLMOPS_OBJS += klmops.o lm_client.o lm_nlm_server.o lm_nlm4_server.o
-
TLIMOD_OBJS += tlimod.o t_kalloc.o t_kbind.o t_kclose.o \
t_kconnect.o t_kfree.o t_kgtstate.o t_kopen.o \
t_krcvudat.o t_ksndudat.o t_kspoll.o t_kunbind.o \
@@ -1002,25 +975,6 @@ IPCSEM_OBJS += sem.o
IPCSHM_OBJS += shm.o
#
-# SVVS Modules
-#
-LO_OBJS += lo.o
-
-TIDG_OBJS += tidg.o
-
-TIVC_OBJS += tivc.o
-
-TMUX_OBJS += tmux.o
-
-LMODB_OBJS += lmodb.o
-
-LMODE_OBJS += lmode.o
-
-LMODR_OBJS += lmodr.o
-
-LMODT_OBJS += lmodt.o
-
-#
# kernel cryptographic framework
#
KCF_OBJS += kcf.o kcf_callprov.o kcf_cbufcall.o kcf_cipher.o kcf_crypto.o \
@@ -1058,7 +1012,6 @@ KSSL_OBJS += kssl.o ksslioctl.o ksslapi.o ksslrec.o
#
# misc. modules
#
-AMSRC1_OBJS += am_src1.o
AMSRC2_OBJS += am_src2.o
@@ -1172,8 +1125,6 @@ DES_OBJS += des_crypt.o des_cbc_crypt.o des_impl.o des_ks.o des_soft.o
DLBOOT_OBJS += bootparam_xdr.o nfs_dlinet.o scan.o
-GLM_OBJS += glm.o
-
KRTLD_OBJS += \
kobj_bootflags.o \
getoptstr.o \
@@ -1184,17 +1135,6 @@ KRTLD_OBJS += \
MOD_OBJS += modctl.o modsubr.o modsysfile.o modconf.o modhash.o
-MPT_OBJS += mpt.o mpt_fw.o mpt_impl.o mpt_init.o mpt_raid.o
-
-SCSI_VHCI_OBJS += scsi_vhci.o \
- sun_asymmetric_fops.o \
- symmetric_fops.o \
- lsi_asymmetric_fops.o \
- std_asymmetric_fops.o \
- emc_asymmetric_fops.o \
- mpapi_impl.o \
- proprietary_vhci_util.o
-
STRPLUMB_OBJS += strplumb.o octet.o
CPR_OBJS += cpr_driver.o cpr_dump.o \
@@ -1205,8 +1145,6 @@ PROF_OBJS += prf.o
SE_OBJS += se_driver.o
-LLC2_OBJS += SAM.o dlpi.o errlog.o ild.o llc2.o
-
SYSACCT_OBJS += acct.o
ACCTCTL_OBJS += acctctl.o
@@ -1215,20 +1153,14 @@ EXACCTSYS_OBJS += exacctsys.o
KAIO_OBJS += aio.o
-PCIC_OBJS += pcic.o
-
PCMCIA_OBJS += pcmcia.o cs.o cis.o cis_callout.o cis_handlers.o cis_params.o
-PEM_OBJS += pem.o
-
BUSRA_OBJS += busra.o
PCS_OBJS += pcs.o
PCATA_OBJS += pcide.o pcdisk.o pclabel.o pcata.o
-PCELX_OBJS += pcelx.o pcgld.o
-
PCMEM_OBJS += pcmem.o
PCRAM_OBJS += pcram.o
@@ -1287,11 +1219,6 @@ BGE_OBJS += bge_main.o bge_chip.o bge_kstats.o bge_log.o bge_ndd.o \
IXGB_OBJS += ixgb.o ixgb_atomic.o ixgb_chip.o ixgb_gld.o ixgb_kstats.o \
ixgb_log.o ixgb_ndd.o ixgb_rx.o ixgb_tx.o ixgb_xmii.o
-NGE_OBJS += nge_main.o nge_atomic.o nge_chip.o nge_ndd.o nge_kstats.o \
- nge_log.o nge_rx.o nge_tx.o nge_xmii.o
-
-IGIGE_OBJS += e1000g_debug.o e1000_hw.o e1000g_main.o e1000g_alloc.o \
- e1000g_tx.o e1000g_rx.o e1000g_stat.o
RGE_OBJS += rge_main.o rge_chip.o rge_ndd.o rge_kstats.o rge_log.o rge_rxtx.o
ATH_OBJS += ath_aux.o ath_ieee80211.o ath_main.o ath_osdep.o \
@@ -1313,17 +1240,8 @@ AS_INC_PATH += $(INC_PATH) -I$(UTSBASE)/common
INCLUDE_PATH += $(INC_PATH) $(CCYFLAG)$(UTSBASE)/common
#
-# Xframe 10G NIC driver module
-#
-XGE_OBJS = xge.o xgell.o
-
PCIE_OBJS += pcie.o
-XGE_HAL_OBJS = xgehal-channel.o xgehal-fifo.o xgehal-ring.o xgehal-config.o \
- xgehal-driver.o xgehal-mm.o xgehal-stats.o xgehal-device.o \
- xge-queue.o xgehal-mgmt.o xgehal-mgmtaux.o
-
-#
# Chelsio N110 10G NIC driver module
#
CH_OBJS = ch.o glue.o pe.o sge.o
diff --git a/usr/src/uts/common/Makefile.rules b/usr/src/uts/common/Makefile.rules
index 784c36d71b..2b7df853a9 100644
--- a/usr/src/uts/common/Makefile.rules
+++ b/usr/src/uts/common/Makefile.rules
@@ -420,26 +420,14 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/audio/legacy/diaudio/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/audio/sada/amsrc1/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/audio/sada/amsrc2/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/audio/sada/drv/audiovia823x/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/audio/sada/drv/audio810/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/audio/sada/drv/audioens/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/audio/sada/drv/audiots/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -496,10 +484,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/i2o/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/ib/adapters/tavor/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/ib/clients/ibd/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -524,10 +508,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/ib/ibtl/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/ib/clients/daplt/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/kb8042/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -540,10 +520,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/aggr/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/llc2/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/lp/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -592,10 +568,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/pcmcia/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/pcn/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/ppp/sppp/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -636,10 +608,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/scsi/adapters/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/se/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/usb/clients/audio/usb_ac/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -684,10 +652,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/usb/clients/usbser/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/usb/clients/usbser/usbser_edge/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/usb/clients/usbser/usbser_keyspan/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -732,14 +696,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/vuidmice/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/xge/drv/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/xge/hal/xgehal/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/chxge/com/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -752,14 +708,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/ixgb/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/nge/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/e1000g/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/ipp/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -784,10 +732,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/ipp/meters/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/klm/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/kmdb/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -836,10 +780,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/pcmcia/pcs/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/pcmcia/pem/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/rpc/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -1198,9 +1138,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/ath/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/audio/legacy/diaudio/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/audio/sada/amsrc1/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/audio/sada/amsrc2/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -1210,15 +1147,9 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/audio/sada/mixer/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/audio/sada/framework/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/audio/sada/drv/audiovia823x/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/audio/sada/drv/audio810/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/audio/sada/drv/audioens/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/audio/sada/drv/audiots/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -1255,9 +1186,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/hotplug/pcihp/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/i2o/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/ib/adapters/tavor/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/ib/clients/ibd/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -1276,9 +1204,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/ib/ibnex/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/ib/ibtl/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/ib/clients/daplt/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/kb8042/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -1288,9 +1213,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/kbtrans/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/aggr/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/llc2/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/lp/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -1327,9 +1249,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/pci-ide/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/pcmcia/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/pcn/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/ppp/sppp/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -1348,9 +1267,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/rsm/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/rge/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/se/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/scsi/adapters/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -1396,9 +1312,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/usb/clients/printer/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/usb/clients/usbser/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/usb/clients/usbser/usbser_edge/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/usb/clients/usbser/usbser_keyspan/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -1432,12 +1345,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/usb/usba10/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/vuidmice/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/xge/drv/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/xge/hal/xgehal/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/chxge/com/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -1447,9 +1354,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/chxge/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/ixgb/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/nge/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/ipp/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -1468,9 +1372,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/ipp/dscpmk/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/ipp/meters/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/klm/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/kmdb/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -1510,9 +1411,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/common/pcmcia/nexus/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/pcmcia/pcs/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/pcmcia/pem/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/rpc/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
diff --git a/usr/src/uts/common/io/1394/inc.flg b/usr/src/uts/common/io/1394/inc.flg
index bc5b654fc7..f37d55da46 100644
--- a/usr/src/uts/common/io/1394/inc.flg
+++ b/usr/src/uts/common/io/1394/inc.flg
@@ -21,7 +21,7 @@
# CDDL HEADER END
#
#
-# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
@@ -38,6 +38,9 @@ find_files "s.*.h" \
usr/src/uts/common/sys
find_files "s.*.h" \
+ usr/closed/uts/common/sys
+
+find_files "s.*.h" \
usr/src/uts/sparc/sys
find_files "s.*.h" \
@@ -50,9 +53,15 @@ find_files "s.*.h" \
usr/src/uts/sun/sys
find_files "s.*.h" \
+ usr/closed/uts/sun/sys
+
+find_files "s.*.h" \
usr/src/uts/sun4u/sys
find_files "s.*.h" \
+ usr/closed/uts/sun4u/sys
+
+find_files "s.*.h" \
usr/src/uts/common/vm
find_files "s.*" \
@@ -69,14 +78,23 @@ echo_file usr/src/uts/Makefile.targ
echo_file usr/src/uts/Makefile.uts
echo_file usr/src/uts/sun/Makefile.files
echo_file usr/src/uts/sun/Makefile.rules
+echo_file usr/closed/uts/sun/Makefile.files
+echo_file usr/closed/uts/sun/Makefile.rules
echo_file usr/src/uts/common/Makefile.files
echo_file usr/src/uts/common/Makefile.rules
echo_file usr/src/uts/common/sys/Makefile
+echo_file usr/closed/uts/common/Makefile.files
+echo_file usr/closed/uts/common/Makefile.rules
+echo_file usr/closed/uts/common/sys/Makefile
echo_file usr/src/uts/sparc/Makefile
echo_file usr/src/uts/sparc/Makefile.files
echo_file usr/src/uts/sparc/Makefile.rules
echo_file usr/src/uts/sparc/Makefile.sparc
+echo_file usr/src/uts/sparc/Makefile.sparc.shared
echo_file usr/src/uts/sparc/Makefile.targ
+echo_file usr/src/uts/sparc/Makefile.targ.shared
+echo_file usr/closed/uts/sparc/Makefile.sparc
+echo_file usr/closed/uts/sparc/Makefile.targ
echo_file usr/src/uts/sparc/ml/sparc.il
echo_file usr/src/uts/sparc/req.flg
diff --git a/usr/src/uts/common/io/audio/inc.flg b/usr/src/uts/common/io/audio/inc.flg
index 98ec4f57f6..0df192aade 100644
--- a/usr/src/uts/common/io/audio/inc.flg
+++ b/usr/src/uts/common/io/audio/inc.flg
@@ -38,6 +38,9 @@ find_files "s.*.h" \
usr/src/uts/common/sys
find_files "s.*.h" \
+ usr/closed/uts/common/sys
+
+find_files "s.*.h" \
usr/src/uts/sparc/sys
find_files "s.*.h" \
@@ -50,6 +53,9 @@ find_files "s.*.h" \
usr/src/uts/intel/sys
find_files "s.*.h" \
+ usr/closed/uts/intel/sys
+
+find_files "s.*.h" \
usr/src/uts/intel/ia32/sys
find_files "s.*" \
@@ -59,9 +65,15 @@ find_files "s.*.h" \
usr/src/uts/sun/sys
find_files "s.*.h" \
+ usr/closed/uts/sun/sys
+
+find_files "s.*.h" \
usr/src/uts/i86pc/sys
find_files "s.*.h" \
+ usr/closed/uts/i86pc/sys
+
+find_files "s.*.h" \
usr/src/uts/common/vm
find_files "s.*" \
@@ -73,26 +85,26 @@ find_files "s.*" \
find_files "s.*" \
usr/src/uts/sparc/warlock \
usr/src/uts/sparc/audiocs \
- usr/src/uts/sparc/audioens \
+ usr/closed/uts/sparc/audioens \
usr/src/uts/sparc/audiots \
usr/src/uts/sparc/audio810 \
- usr/src/uts/sparc/audiovia823x \
+ usr/closed/uts/sparc/audiovia823x \
usr/src/uts/sparc/audio1575 \
usr/src/uts/sparc/audiosup \
usr/src/uts/sparc/mixer \
- usr/src/uts/sparc/amsrc1 \
+ usr/closed/uts/sparc/amsrc1 \
usr/src/uts/sparc/amsrc2 \
usr/src/uts/sparc/diaudio \
- usr/src/uts/i86pc/audioens \
+ usr/closed/uts/i86pc/audioens \
usr/src/uts/i86pc/audio810 \
- usr/src/uts/i86pc/audiovia823x \
+ usr/closed/uts/i86pc/audiovia823x \
usr/src/uts/intel/audiosup \
usr/src/uts/intel/mixer \
- usr/src/uts/intel/amsrc1 \
+ usr/closed/uts/intel/amsrc1 \
usr/src/uts/intel/diaudio \
find_files "s.*" \
- usr/src/uts/sun4u/forthdebug
+ usr/closed/uts/sun4u/forthdebug
echo_file usr/src/uts/sparc/os/driver_classes
echo_file usr/src/uts/sparc/os/driver_aliases
@@ -110,24 +122,44 @@ echo_file usr/src/uts/Makefile
echo_file usr/src/uts/Makefile.targ
echo_file usr/src/uts/Makefile.uts
echo_file usr/src/uts/sun/Makefile.files
+echo_file usr/closed/uts/sun/Makefile.files
echo_file usr/src/uts/sun/Makefile.rules
+echo_file usr/closed/uts/sun/Makefile.rules
echo_file usr/src/uts/common/Makefile.files
+echo_file usr/closed/uts/common/Makefile.files
echo_file usr/src/uts/common/Makefile.rules
+echo_file usr/closed/uts/common/Makefile.rules
echo_file usr/src/uts/sparc/Makefile
echo_file usr/src/uts/sparc/Makefile.files
echo_file usr/src/uts/sparc/Makefile.rules
echo_file usr/src/uts/sparc/Makefile.sparc
+echo_file usr/src/uts/sparc/Makefile.sparc.shared
+echo_file usr/closed/uts/sparc/Makefile.sparc
echo_file usr/src/uts/sparc/Makefile.targ
+echo_file usr/src/uts/sparc/Makefile.targ.shared
+echo_file usr/closed/uts/sparc/Makefile.targ
echo_file usr/src/uts/sparc/req.flg
echo_file usr/src/uts/i86pc/Makefile.i86pc
+echo_file usr/src/uts/i86pc/Makefile.i86pc.shared
+echo_file usr/closed/uts/i86pc/Makefile.i86pc
echo_file usr/src/uts/i86pc/Makefile.files
+echo_file usr/closed/uts/i86pc/Makefile.files
echo_file usr/src/uts/i86pc/Makefile.rules
+echo_file usr/closed/uts/i86pc/Makefile.rules
echo_file usr/src/uts/i86pc/Makefile.targ
+echo_file usr/src/uts/i86pc/Makefile.targ.shared
+echo_file usr/closed/uts/i86pc/Makefile.targ
echo_file usr/src/uts/i86pc/Makefile.workarounds
echo_file usr/src/uts/intel/Makefile
echo_file usr/src/uts/intel/Makefile.files
+echo_file usr/closed/uts/intel/Makefile.files
echo_file usr/src/uts/intel/Makefile.rules
+echo_file usr/closed/uts/intel/Makefile.rules
echo_file usr/src/uts/intel/Makefile.intel
+echo_file usr/src/uts/intel/Makefile.intel.shared
+echo_file usr/closed/uts/intel/Makefile.intel
echo_file usr/src/uts/intel/Makefile.targ
+echo_file usr/src/uts/intel/Makefile.targ.shared
+echo_file usr/closed/uts/intel/Makefile.targ
echo_file usr/src/uts/intel/ia32/Makefile.rules
echo_file usr/src/uts/intel/amd64/Makefile.rules
diff --git a/usr/src/uts/common/io/ib/inc.flg b/usr/src/uts/common/io/ib/inc.flg
index 45c0d9776e..f63b4def47 100644
--- a/usr/src/uts/common/io/ib/inc.flg
+++ b/usr/src/uts/common/io/ib/inc.flg
@@ -34,12 +34,16 @@
# header files
find_files "s.*.h" \
usr/src/uts/common/sys/ib \
+ usr/closed/uts/common/sys/ib \
usr/src/uts/common/sys \
+ usr/closed/uts/common/sys \
usr/src/uts/sparc/sys \
usr/src/uts/sparc/v7/sys \
usr/src/uts/sparc/v9/sys \
usr/src/uts/sun/sys \
+ usr/closed/uts/sun/sys \
usr/src/uts/intel/sys \
+ usr/closed/uts/intel/sys \
usr/src/uts/intel/ia32/sys \
usr/src/uts/common/rpc \
usr/src/uts/common/netinet \
@@ -63,18 +67,18 @@ find_files "s.*" \
usr/src/uts/sparc/ibdm \
usr/src/uts/sparc/ibmf \
usr/src/uts/sparc/ibtl \
- usr/src/uts/sparc/tavor \
+ usr/closed/uts/sparc/tavor \
usr/src/uts/sparc/ibd \
- usr/src/uts/sparc/daplt \
+ usr/closed/uts/sparc/daplt \
usr/src/uts/sparc/rpcib \
usr/src/uts/intel/ib \
usr/src/uts/intel/ibcm \
usr/src/uts/intel/ibdm \
usr/src/uts/intel/ibmf \
usr/src/uts/intel/ibtl \
- usr/src/uts/intel/tavor \
+ usr/closed/uts/intel/tavor \
usr/src/uts/intel/ibd \
- usr/src/uts/intel/daplt \
+ usr/closed/uts/intel/daplt \
usr/src/uts/intel/rpcib
# packaging files
@@ -104,31 +108,52 @@ echo_file usr/src/uts/Makefile
echo_file usr/src/uts/Makefile.targ
echo_file usr/src/uts/Makefile.uts
echo_file usr/src/uts/sun/Makefile.files
+echo_file usr/closed/uts/sun/Makefile.files
echo_file usr/src/uts/sun/Makefile.rules
+echo_file usr/closed/uts/sun/Makefile.rules
echo_file usr/src/uts/common/Makefile.files
+echo_file usr/closed/uts/common/Makefile.files
echo_file usr/src/uts/common/Makefile.rules
+echo_file usr/closed/uts/common/Makefile.rules
echo_file usr/src/uts/common/sys/Makefile
+echo_file usr/closed/uts/common/sys/Makefile
echo_file usr/src/uts/common/sys/lvm/Makefile
echo_file usr/src/uts/sparc/Makefile
echo_file usr/src/uts/sparc/Makefile.files
echo_file usr/src/uts/sparc/Makefile.rules
echo_file usr/src/uts/sparc/Makefile.sparc
+echo_file usr/src/uts/sparc/Makefile.sparc.shared
+echo_file usr/closed/uts/sparc/Makefile.sparc
echo_file usr/src/uts/sparc/Makefile.targ
+echo_file usr/src/uts/sparc/Makefile.targ.shared
+echo_file usr/closed/uts/sparc/Makefile.targ
echo_file usr/src/uts/sparc/ml/sparc.il
echo_file usr/src/uts/sparc/req.flg
echo_file usr/src/uts/intel/Makefile
echo_file usr/src/uts/intel/Makefile.files
+echo_file usr/closed/uts/intel/Makefile.files
echo_file usr/src/uts/intel/Makefile.rules
+echo_file usr/closed/uts/intel/Makefile.rules
echo_file usr/src/uts/intel/Makefile.intel
+echo_file usr/src/uts/intel/Makefile.intel.shared
+echo_file usr/closed/uts/intel/Makefile.intel
echo_file usr/src/uts/intel/Makefile.targ
+echo_file usr/src/uts/intel/Makefile.targ.shared
+echo_file usr/closed/uts/intel/Makefile.targ
echo_file usr/src/uts/intel/ia32/ml/ia32.il
echo_file usr/src/uts/sun4/Makefile.files
echo_file usr/src/uts/sun4/Makefile.rules
echo_file usr/src/uts/sun4u/Makefile
echo_file usr/src/uts/sun4u/Makefile.files
+echo_file usr/closed/uts/sun4u/Makefile.files
echo_file usr/src/uts/sun4u/Makefile.rules
+echo_file usr/closed/uts/sun4u/Makefile.rules
echo_file usr/src/uts/sun4u/Makefile.sun4u
+echo_file usr/src/uts/sun4u/Makefile.sun4u.shared
+echo_file usr/closed/uts/sun4u/Makefile.sun4u
echo_file usr/src/uts/sun4u/Makefile.targ
+echo_file usr/src/uts/sun4u/Makefile.targ.shared
+echo_file usr/closed/uts/sun4u/Makefile.targ
echo_file usr/src/uts/sun4u/Makefile.workarounds
echo_file usr/src/uts/sfmmu/Makefile.files
echo_file usr/src/uts/sfmmu/Makefile.rules
@@ -150,10 +175,10 @@ echo_file usr/src/cmd/mapfile_noexstk
echo_file usr/src/cmd/sgs/mapfiles/sparc/map.pagealign
# these files are needed for forthdebug
-echo_file usr/src/uts/sun4u/forthdebug/Makefile
-echo_file usr/src/uts/sun4u/forthdebug/ib.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/ibcm.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/ibdm.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/ibmf.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/ibtl.fdbg
-echo_file usr/src/uts/sun4/forthdebug/tavor.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/Makefile
+echo_file usr/closed/uts/sun4u/forthdebug/ib.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/ibcm.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/ibdm.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/ibmf.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/ibtl.fdbg
+echo_file usr/closed/uts/sun4/forthdebug/tavor.fdbg
diff --git a/usr/src/uts/common/io/usb/inc.flg b/usr/src/uts/common/io/usb/inc.flg
index 93c3b9a799..fe7358bec9 100644
--- a/usr/src/uts/common/io/usb/inc.flg
+++ b/usr/src/uts/common/io/usb/inc.flg
@@ -35,6 +35,9 @@ find_files "s.*.h" \
usr/src/uts/common/sys
find_files "s.*.h" \
+ usr/closed/uts/common/sys
+
+find_files "s.*.h" \
usr/src/uts/sparc/sys
find_files "s.*.h" \
@@ -47,9 +50,15 @@ find_files "s.*.h" \
usr/src/uts/intel/sys
find_files "s.*.h" \
+ usr/closed/uts/intel/sys
+
+find_files "s.*.h" \
usr/src/uts/sun/sys
find_files "s.*.h" \
+ usr/closed/uts/sun/sys
+
+find_files "s.*.h" \
usr/src/uts/common/vm
find_files "s.*" \
@@ -74,7 +83,7 @@ find_files "s.*" \
usr/src/uts/sparc/usb_ah \
usr/src/uts/sparc/ugen \
usr/src/uts/sparc/usbser \
- usr/src/uts/sparc/usbser_edge \
+ usr/closed/uts/sparc/usbser_edge \
usr/src/uts/sparc/usbsksp \
usr/src/uts/sparc/usbsprl \
usr/src/uts/sparc/usbskel \
@@ -96,7 +105,7 @@ find_files "s.*" \
usr/src/uts/intel/usb_as \
usr/src/uts/intel/usb_ah \
usr/src/uts/intel/usbser \
- usr/src/uts/intel/usbser_edge \
+ usr/closed/uts/intel/usbser_edge \
usr/src/uts/intel/usbsksp \
usr/src/uts/intel/usbsprl \
usr/src/uts/intel/ia32 \
@@ -120,41 +129,57 @@ echo_file usr/src/uts/Makefile
echo_file usr/src/uts/Makefile.targ
echo_file usr/src/uts/Makefile.uts
echo_file usr/src/uts/sun/Makefile.files
+echo_file usr/closed/uts/sun/Makefile.files
echo_file usr/src/uts/sun/Makefile.rules
+echo_file usr/closed/uts/sun/Makefile.rules
echo_file usr/src/uts/common/Makefile.files
+echo_file usr/closed/uts/common/Makefile.files
echo_file usr/src/uts/common/Makefile.rules
+echo_file usr/closed/uts/common/Makefile.rules
echo_file usr/src/uts/sparc/Makefile
echo_file usr/src/uts/sparc/Makefile.files
echo_file usr/src/uts/sparc/Makefile.rules
echo_file usr/src/uts/sparc/Makefile.sparc
+echo_file usr/src/uts/sparc/Makefile.sparc.shared
+echo_file usr/closed/uts/sparc/Makefile.sparc
echo_file usr/src/uts/sparc/Makefile.targ
+echo_file usr/src/uts/sparc/Makefile.targ.shared
+echo_file usr/closed/uts/sparc/Makefile.targ
echo_file usr/src/uts/sparc/ml/sparc.il
echo_file usr/src/uts/sparc/req.flg
echo_file usr/src/uts/intel/Makefile
echo_file usr/src/uts/intel/Makefile.files
+echo_file usr/closed/uts/intel/Makefile.files
echo_file usr/src/uts/intel/Makefile.rules
+echo_file usr/closed/uts/intel/Makefile.rules
echo_file usr/src/uts/intel/Makefile.intel
+echo_file usr/src/uts/intel/Makefile.intel.shared
+echo_file usr/closed/uts/intel/Makefile.intel
echo_file usr/src/uts/intel/Makefile.targ
echo_file usr/src/uts/sparc/v9/Makefile.files
echo_file usr/src/uts/sparc/v9/Makefile.rules
echo_file usr/src/uts/sun4u/Makefile.rules
+echo_file usr/closed/uts/sun4u/Makefile.rules
echo_file usr/src/uts/sun4/Makefile.rules
echo_file usr/src/uts/common/sys/Makefile
+echo_file usr/closed/uts/common/sys/Makefile
echo_file usr/src/uts/common/os/privs.awk
echo_file usr/src/uts/common/os/priv_defs
+echo_file usr/src/uts/intel/Makefile.targ.shared
+echo_file usr/closed/uts/intel/Makefile.targ
# these files are needed for forthdebug
-echo_file usr/src/uts/sun4u/forthdebug/Makefile
-echo_file usr/src/uts/sun4u/forthdebug/hid.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/hubd.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/ohci.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/ehci.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/usb_mid.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/usba.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/usbkbm.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/usbms.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/usbser.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/usbser_edge.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/usbprn.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/usb_audio.fdbg
-echo_file usr/src/uts/sun4u/forthdebug/ugen.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/Makefile
+echo_file usr/closed/uts/sun4u/forthdebug/hid.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/hubd.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/ohci.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/ehci.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/usb_mid.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/usba.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/usbkbm.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/usbms.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/usbser.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/usbser_edge.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/usbprn.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/usb_audio.fdbg
+echo_file usr/closed/uts/sun4u/forthdebug/ugen.fdbg
diff --git a/usr/src/uts/common/nfs/Makefile b/usr/src/uts/common/nfs/Makefile
index 63e6aba12d..eb101efa41 100644
--- a/usr/src/uts/common/nfs/Makefile
+++ b/usr/src/uts/common/nfs/Makefile
@@ -31,23 +31,30 @@
#
include ../../../Makefile.master
-HDRS= export.h lm.h lm_impl.h lm_nlm.h \
- lm_server.h \
+HDRS= export.h lm.h \
mount.h nfs.h nfssys.h nfs_acl.h \
nfs_clnt.h nfs_log.h nfs_sec.h nfs4.h \
nfs4_attr.h nfs4_clnt.h rnode.h rnode4.h \
nfs4_kprot.h nfs4_db_impl.h nfs4_idmap_impl.h \
nfsid_map.h
+$(CLOSED_BUILD)CLOSEDHDRS= lm_impl.h lm_nlm.h lm_server.h
+
+ALLHDRS= $(HDRS) $(CLOSEDHDRS)
+
ROOTDIRS= $(ROOT)/usr/include/nfs
-ROOTHDRS= $(HDRS:%=$(ROOTDIRS)/%)
+ROOTHDRS= $(ALLHDRS:%=$(ROOTDIRS)/%)
-CHECKHDRS= $(HDRS:%.h=%.check)
+CHECKHDRS= $(HDRS:%.h=%.check) \
+ $(CLOSEDHDRS:%.h=$(CLOSED)/uts/common/nfs/%.check)
$(ROOTDIRS)/%: %
$(INS.file)
+$(ROOTDIRS)/%: $(CLOSED)/uts/common/nfs/%
+ $(INS.file)
+
.KEEP_STATE:
.PARALLEL: $(CHECKHDRS)
diff --git a/usr/src/uts/common/sys/Makefile b/usr/src/uts/common/sys/Makefile
index 443e4f9223..22b2f9654b 100644
--- a/usr/src/uts/common/sys/Makefile
+++ b/usr/src/uts/common/sys/Makefile
@@ -47,7 +47,6 @@ i386_HDRS= \
agpgart.h \
asy.h \
audio/audio810.h \
- audio/audiovia823x.h \
fd_debug.h \
fdc.h \
fdmedia.h \
@@ -283,7 +282,6 @@ CHKHDRS= \
list.h \
list_impl.h \
llc1.h \
- llc2.h \
loadavg.h \
lock.h \
lockfs.h \
@@ -354,9 +352,7 @@ CHKHDRS= \
pci_impl.h \
pcmcia.h \
pctypes.h \
- pem.h \
pfmod.h \
- phx.h \
pm.h \
policy.h \
poll.h \
@@ -566,16 +562,12 @@ AUDIOHDRS= \
audio_src.h \
audio_support.h \
audio_trace.h \
- audioens.h \
g711.h
BSCHDRS= \
- bscbus.h \
- bscv_impl.h \
lom_ebuscodes.h \
lom_io.h \
- lom_priv.h \
- lombus.h
+ lom_priv.h
MDESCHDRS= \
mdesc.h \
@@ -630,9 +622,6 @@ IBMGTHDRS= \
IBDHDRS= \
ibd.h
-TAVORHDRS= \
- tavor_ioctl.h
-
ISOHDRS= \
signal_iso.h
@@ -728,7 +717,6 @@ FSHDRS= \
PCMCIAHDRS= \
pcata.h \
- pcelx.h \
pcgld.h \
pcramio.h \
pcramvar.h \
@@ -778,14 +766,9 @@ SCSITARGETSHDRS= \
ses.h \
sesio.h \
stdef.h \
- sddef.h \
- sgendef.h
+ sddef.h
-SCSICADHDRS= \
- glmreg.h \
- glmvar.h \
- mptreg.h \
- mptvar.h
+SCSICADHDRS=
SCSIVHCIHDRS= \
scsi_vhci.h \
@@ -897,8 +880,6 @@ PCHDRS= \
avintr.h \
dma_engine.h \
i8272A.h \
- pcic_reg.h \
- pcic_var.h \
pic.h \
pit.h \
rtc.h
@@ -912,117 +893,11 @@ I2OHDRS= \
i2omstr.h \
i2outil.h
-# SVVS headers and other excluded headers
-XHDRS= \
- lo.h \
- tidg.h \
- tivc.h \
- tmux.h
-
-# check files really don't exist
-
-audio/%.check: audio/%.h
- $(DOT_H_CHECK)
-
-av/%.check: av/%.h
- $(DOT_H_CHECK)
+include Makefile.syshdrs
dcam/%.check: dcam/%.h
$(DOT_H_CHECK)
-fm/%.check: fm/%.h
- $(DOT_H_CHECK)
-
-fm/cpu/%.check: fm/cpu/%.h
- $(DOT_H_CHECK)
-
-fm/io/%.check: fm/io/%.h
- $(DOT_H_CHECK)
-
-fs/%.check: fs/%.h
- $(DOT_H_CHECK)
-
-ib/%.check: ib/%.h
- $(DOT_H_CHECK)
-
-ib/clients/ibd/%.check: ib/clients/ibd/%.h
- $(DOT_H_CHECK)
-
-ib/ibtl/%.check: ib/ibtl/%.h
- $(DOT_H_CHECK)
-
-ib/ibtl/impl/%.check: ib/ibtl/impl/%.h
- $(DOT_H_CHECK)
-
-ib/ibnex/%.check: ib/ibnex/%.h
- $(DOT_H_CHECK)
-
-ib/mgt/%.check: ib/mgt/%.h
- $(DOT_H_CHECK)
-
-ib/mgt/ibmf/%.check: ib/mgt/ibmf/%.h
- $(DOT_H_CHECK)
-
-ib/adapters/tavor/%.check: ib/adapters/tavor/%.h
- $(DOT_H_CHECK)
-
-lvm/%.check: lvm/%.h
- $(DOT_H_CHECK)
-
-pcmcia/%.check: pcmcia/%.h
- $(DOT_H_CHECK)
-
-scsi/%.check: scsi/%.h
- $(DOT_H_CHECK)
-
-scsi/conf/%.check: scsi/conf/%.h
- $(DOT_H_CHECK)
-
-scsi/generic/%.check: scsi/generic/%.h
- $(DOT_H_CHECK)
-
-scsi/impl/%.check: scsi/impl/%.h
- $(DOT_H_CHECK)
-
-scsi/targets/%.check: scsi/targets/%.h
- $(DOT_H_CHECK)
-
-scsi/adapters/%.check: scsi/adapters/%.h
- $(DOT_H_CHECK)
-
-sysevent/%.check: sysevent/%.h
- $(DOT_H_CHECK)
-
-contract/%.check: contract/%.h
- $(DOT_H_CHECK)
-
-usb/%.check: usb/%.h
- $(DOT_H_CHECK)
-
-usb/clients/audio/%.check: usb/clients/audio/%.h
- $(DOT_H_CHECK)
-
-usb/hubd/%.check: usb/hubd/%.h
- $(DOT_H_CHECK)
-
-usb/clients/hid/%.check: usb/clients/hid/%.h
- $(DOT_H_CHECK)
-
-usb/clients/mass_storage/%.check: usb/clients/mass_storage/%.h
- $(DOT_H_CHECK)
-
-usb/clients/hid/%.check: usb/clients/hid/%.h
- $(DOT_H_CHECK)
-
-usb/clients/printer/%.check: usb/clients/printer/%.h
- $(DOT_H_CHECK)
-
-1394/%.check: 1394/%.h
- $(DOT_H_CHECK)
-
-rsm/%.check: rsm/%.h
- $(DOT_H_CHECK)
-
CHECKHDRS= \
$($(MACH)_HDRS:%.h=%.check) \
$(AUDIOHDRS:%.h=audio/%.check) \
@@ -1044,7 +919,6 @@ CHECKHDRS= \
$(FMIOHDRS:%.h=fm/io/%.check) \
$(FSHDRS:%.h=fs/%.check) \
$(LVMHDRS:%.h=lvm/%.check) \
- $(XHDRS:%.h=%.check) \
$(PCMCIAHDRS:%.h=pcmcia/%.check) \
$(SCSIHDRS:%.h=scsi/%.check) \
$(SCSICONHDRS:%.h=scsi/conf/%.check) \
@@ -1065,232 +939,6 @@ CHECKHDRS= \
$(RSMHDRS:%.h=rsm/%.check)
-ROOTDIR= $(ROOT)/usr/include/sys
-
-ROOTDKTPDIR= $(ROOTDIR)/dktp
-
-sparc_ROOTDIRS= $(ROOTDKTPDIR) $(ROOTDIR)/scsi/adapters \
- $(ROOTDIR)/scsi/targets \
- $(ROOTDIR)/av
-
-i386_ROOTDIRS= $(ROOTDKTPDIR) $(ROOTDIR)/scsi/adapters $(ROOTDIR)/scsi/targets \
- $(ROOTDIR)/i2o $(ROOTDIR)/agp
-
-ROOTDIRS= \
- $(ROOTDIR) \
- $(ROOTDIR)/audio \
- $(ROOTDIR)/hotplug \
- $(ROOTDIR)/hotplug/pci \
- $(ROOTDIR)/crypto \
- $(ROOTDIR)/dcam \
- $(ROOTDIR)/iso \
- $(ROOTDIR)/fm \
- $(ROOTDIR)/fm/cpu \
- $(ROOTDIR)/fm/io \
- $(ROOTDIR)/fs \
- $(ROOTDIR)/ib \
- $(ROOTDIR)/ib/adapters/tavor \
- $(ROOTDIR)/ib/ibtl \
- $(ROOTDIR)/ib/ibtl/impl \
- $(ROOTDIR)/ib/mgt \
- $(ROOTDIR)/ib/mgt/ibmf \
- $(ROOTDIR)/ib/ibnex \
- $(ROOTDIR)/ib/clients/ibd \
- $(ROOTDIR)/lvm \
- $(ROOTDIR)/pcmcia \
- $(ROOTDIR)/scsi \
- $(ROOTDIR)/scsi/conf \
- $(ROOTDIR)/scsi/generic \
- $(ROOTDIR)/scsi/impl \
- $(ROOTDIR)/fc4 \
- $(ROOTDIR)/sysevent \
- $(ROOTDIR)/contract \
- $(ROOTDIR)/usb \
- $(ROOTDIR)/usb/hubd \
- $(ROOTDIR)/usb/clients \
- $(ROOTDIR)/usb/clients/audio \
- $(ROOTDIR)/usb/clients/hid \
- $(ROOTDIR)/usb/clients/mass_storage \
- $(ROOTDIR)/usb/clients/printer \
- $(ROOTDIR)/usb/clients/ugen \
- $(ROOTDIR)/1394 \
- $(ROOTDIR)/rsm \
- $($(MACH)_ROOTDIRS)
-
-
-ROOTHDRS= \
- $($(MACH)_HDRS:%=$(ROOTDIR)/%) \
- $(HDRS:%=$(ROOTDIR)/%)
-
-ROOTAUDHDRS= $(AUDIOHDRS:%=$(ROOTDIR)/audio/%)
-
-ROOTAVHDRS= $(AVHDRS:%=$(ROOTDIR)/av/%)
-
-ROOTCRYPTOHDRS= $(CRYPTOHDRS:%=$(ROOTDIR)/crypto/%)
-
-ROOTDCAMHDRS= $(DCAMHDRS:%=$(ROOTDIR)/dcam/%)
-
-ROOTIBHDRS= $(IBHDRS:%=$(ROOTDIR)/ib/%)
-ROOTIBDHDRS= $(IBDHDRS:%=$(ROOTDIR)/ib/clients/ibd/%)
-ROOTIBTLHDRS= $(IBTLHDRS:%=$(ROOTDIR)/ib/ibtl/%)
-ROOTIBTLIMPLHDRS= $(IBTLIMPLHDRS:%=$(ROOTDIR)/ib/ibtl/impl/%)
-ROOTIBNEXHDRS= $(IBNEXHDRS:%=$(ROOTDIR)/ib/ibnex/%)
-ROOTIBMGTHDRS= $(IBMGTHDRS:%=$(ROOTDIR)/ib/mgt/%)
-ROOTIBMFHDRS= $(IBMFHDRS:%=$(ROOTDIR)/ib/mgt/ibmf/%)
-ROOTTAVORHDRS= $(TAVORHDRS:%=$(ROOTDIR)/ib/adapters/tavor/%)
-
-ROOTISOHDRS= $(ISOHDRS:%=$(ROOTDIR)/iso/%)
-
-ROOTFMHDRS= $(FMHDRS:%=$(ROOTDIR)/fm/%)
-ROOTFMCPUHDRS= $(FMCPUHDRS:%=$(ROOTDIR)/fm/cpu/%)
-ROOTFMIOHDRS= $(FMIOHDRS:%=$(ROOTDIR)/fm/io/%)
-
-ROOTFSHDRS= $(FSHDRS:%=$(ROOTDIR)/fs/%)
-
-ROOTLVMHDRS= $(ALL_LVMHDRS:%=$(ROOTDIR)/lvm/%)
-
-ROOTPCMCIAHDRS= $(PCMCIAHDRS:%=$(ROOTDIR)/pcmcia/%)
-
-ROOTSCSIHDRS= $(SCSIHDRS:%=$(ROOTDIR)/scsi/%)
-ROOTSCSICONFHDRS= $(SCSICONFHDRS:%=$(ROOTDIR)/scsi/conf/%)
-ROOTSCSIGENHDRS= $(SCSIGENHDRS:%=$(ROOTDIR)/scsi/generic/%)
-ROOTSCSIIMPLHDRS= $(SCSIIMPLHDRS:%=$(ROOTDIR)/scsi/impl/%)
-ROOTSCSITARGETSHDRS= $(SCSITARGETSHDRS:%=$(ROOTDIR)/scsi/targets/%)
-ROOTSCSICADHDRS= $(SCSICADHDRS:%=$(ROOTDIR)/scsi/adapters/%)
-ROOTSCSIVHCIHDRS= $(SCSIVHCIHDRS:%=$(ROOTDIR)/scsi/adapters/%)
-
-ROOTFCHDRS= $(FCHDRS:%=$(ROOTDIR)/fc4/%)
-
-ROOTSYSEVENTHDRS= $(SYSEVENTHDRS:%=$(ROOTDIR)/sysevent/%)
-ROOTCONTRACTHDRS= $(CONTRACTHDRS:%=$(ROOTDIR)/contract/%)
-
-ROOTXHDRS= $(XHDRS:%=$(ROOTDIR)/%)
-
-ROOTUSBHDRS= $(USBHDRS:%=$(ROOTDIR)/usb/%)
-ROOTUSBAUDHDRS= $(USBAUDHDRS:%=$(ROOTDIR)/usb/clients/audio/%)
-ROOTUSBHUBDHDRS= $(USBHUBDHDRS:%=$(ROOTDIR)/usb/hubd/%)
-ROOTUSBHIDHDRS = $(USBHIDHDRS:%=$(ROOTDIR)/usb/clients/hid/%)
-ROOTUSBMSHDRS= $(USBMSHDRS:%=$(ROOTDIR)/usb/clients/mass_storage/%)
-ROOTUSBPRNHDRS= $(USBPRNHDRS:%=$(ROOTDIR)/usb/clients/printer/%)
-ROOTUGENHDRS= $(UGENHDRS:%=$(ROOTDIR)/usb/clients/ugen/%)
-
-ROOT1394HDRS= $(I1394HDRS:%=$(ROOTDIR)/1394/%)
-
-ROOTRSMHDRS= $(RSMHDRS:%=$(ROOTDIR)/rsm/%)
-
-ROOTSDKTPHDRS= $(SDKTPHDRS:%=$(ROOTDIR)/dktp/%)
-ROOTDKTPHDRS= $(DKTPHDRS:%=$(ROOTDIR)/dktp/%)
-ROOTPCHDRS= $(PCHDRS:%=$(ROOTDIR)/%)
-ROOTI2OHDRS= $(I2OHDRS:%=$(ROOTDIR)/i2o/%)
-ROOTHOTPLUGHDRS= $(HOTPLUGHDRS:%=$(ROOTDIR)/hotplug/%)
-ROOTHOTPLUGPCIHDRS= $(HOTPLUGPCIHDRS:%=$(ROOTDIR)/hotplug/pci/%)
-
-
-sparc_ROOTHDRS= $(ROOTSDKTPHDRS) $(ROOTSCSICADHDRS) $(ROOTSCSITARGETSHDRS) \
- $(ROOTFCHDRS) $(ROOTUSBHDRS) $(ROOTUSBHUBDHDRS) $(ROOTPCMCIAHDRS) \
- $(ROOTUSBAUDHDRS) \
- $(ROOTUSBHIDHDRS) $(ROOTUSBMSHDRS) $(ROOTUSBPRNHDRS) \
- $(ROOTUGENHDRS)
-
-i386_ROOTHDRS= $(ROOTDKTPHDRS) $(ROOTPCHDRS) $(ROOTSCSITARGETSHDRS) \
- $(ROOTSCSIVHCIHDRS) $(ROOTFCHDRS) \
- $(ROOTI2OHDRS) $(ROOTPCMCIAHDRS) $(ROOTHOTPLUGHDRS) \
- $(ROOTHOTPLUGPCIHDRS)
-
-# install rules
-$(ROOTDIR)/%: %
- $(INS.file)
-
-$(ROOTDIR)/crypto/%: crypto/%
- $(INS.file)
-
-$(ROOTDIR)/fm/%: fm/%
- $(INS.file)
-
-$(ROOTDIR)/fm/cpu/%: fm/cpu/%
- $(INS.file)
-
-$(ROOTDIR)/fm/io/%: fm/io/%
- $(INS.file)
-
-$(ROOTDIR)/fs/%: fs/%
- $(INS.file)
-
-$(ROOTDIR)/ib/%: ib/%
- $(INS.file)
-
-$(ROOTDIR)/ib/clients/ibd/%: ib/clients/ibd/%
- $(INS.file)
-
-$(ROOTDIR)/ib/ibtl/%: ib/ibtl/%
- $(INS.file)
-
-$(ROOTDIR)/ib/ibtl/impl/%: ib/ibtl/impl/%
- $(INS.file)
-
-$(ROOTDIR)/ib/ibnex/%: ib/ibnex/%
- $(INS.file)
-
-$(ROOTDIR)/ib/mgt/%: ib/mgt/%
- $(INS.file)
-
-$(ROOTDIR)/ib/mgt/ibmf/%: ib/mgt/ibmf/%
- $(INS.file)
-
-$(ROOTDIR)/ib/adapters/tavor/%: ib/adapters/tavor/%
- $(INS.file)
-
-$(ROOTDIR)/lvm/%: lvm/%
- $(INS.file)
-
-$(ROOTDIR)/pcmcia/%: pcmcia/%
- $(INS.file)
-
-$(ROOTDIR)/scsi/%: scsi/%
- $(INS.file)
-
-$(ROOTDIR)/scsi/conf/%: scsi/conf/%
- $(INS.file)
-
-$(ROOTDIR)/scsi/generic/%: scsi/generic/%
- $(INS.file)
-
-$(ROOTDIR)/scsi/impl/%: scsi/impl/%
- $(INS.file)
-
-$(ROOTDIR)/scsi/targets/%: scsi/targets/%
- $(INS.file)
-
-$(ROOTDIR)/fc4/%: fc4/%
- $(INS.file)
-
-$(ROOTDIR)/sysevent/%: sysevent/%
- $(INS.file)
-
-$(ROOTDIR)/contract/%: contract/%
- $(INS.file)
-
-$(ROOTDIR)/usb/%: usb/%
- $(INS.file)
-
-$(ROOTDIR)/usb/hubd/%: usb/hubd/%
- $(INS.file)
-
-$(ROOTDIR)/usb/clients/hid/%: usb/clients/hid/%
- $(INS.file)
-
-$(ROOTDIR)/usb/clients/mass_storage/%: usb/clients/mass_storage/%
- $(INS.file)
-
-$(ROOTDIR)/dktp/%: dktp/%
- $(INS.file)
-
-$(ROOTDIR)/1394/%: 1394/%
- $(INS.file)
-
-$(ROOTDIR)/rsm/%: rsm/%
- $(INS.file)
-
.KEEP_STATE:
.PARALLEL: \
@@ -1378,15 +1026,7 @@ install_h: \
$(ROOTHOTPLUGHDRS) \
$(ROOTHOTPLUGPCIHDRS) \
$(ROOTRSMHDRS) \
- $($(MACH)_ROOTHDRS) \
- svvs_h
-
-svvs_h: FRC
- @if [ -f lo.h ]; then \
- $(MAKE) install_X_h; \
- else \
- true; \
- fi
+ $($(MACH)_ROOTHDRS)
all_h: $(GENHDRS)
@@ -1396,11 +1036,6 @@ priv_const.h: $(PRIVS_AWK) $(PRIVS_DEF)
priv_names.h: $(PRIVS_AWK) $(PRIVS_DEF)
$(NAWK) -f $(PRIVS_AWK) < $(PRIVS_DEF) -v pubhfile=$@
-install_X_h: $(ROOTXHDRS)
-
-$(ROOTDIRS):
- $(INS.dir)
-
LVMDERIVED_H:
cd $(SRC)/uts/common/sys/lvm; pwd; $(MAKE)
diff --git a/usr/src/uts/common/sys/Makefile.syshdrs b/usr/src/uts/common/sys/Makefile.syshdrs
new file mode 100644
index 0000000000..cca54ae583
--- /dev/null
+++ b/usr/src/uts/common/sys/Makefile.syshdrs
@@ -0,0 +1,339 @@
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+# Common definitions for open and closed headers.
+
+# check files really don't exist
+
+audio/%.check: audio/%.h
+ $(DOT_H_CHECK)
+
+av/%.check: av/%.h
+ $(DOT_H_CHECK)
+
+fm/%.check: fm/%.h
+ $(DOT_H_CHECK)
+
+fm/cpu/%.check: fm/cpu/%.h
+ $(DOT_H_CHECK)
+
+fm/io/%.check: fm/io/%.h
+ $(DOT_H_CHECK)
+
+fs/%.check: fs/%.h
+ $(DOT_H_CHECK)
+
+ib/%.check: ib/%.h
+ $(DOT_H_CHECK)
+
+ib/clients/ibd/%.check: ib/clients/ibd/%.h
+ $(DOT_H_CHECK)
+
+ib/ibtl/%.check: ib/ibtl/%.h
+ $(DOT_H_CHECK)
+
+ib/ibtl/impl/%.check: ib/ibtl/impl/%.h
+ $(DOT_H_CHECK)
+
+ib/ibnex/%.check: ib/ibnex/%.h
+ $(DOT_H_CHECK)
+
+ib/mgt/%.check: ib/mgt/%.h
+ $(DOT_H_CHECK)
+
+ib/mgt/ibmf/%.check: ib/mgt/ibmf/%.h
+ $(DOT_H_CHECK)
+
+ib/adapters/tavor/%.check: ib/adapters/tavor/%.h
+ $(DOT_H_CHECK)
+
+lvm/%.check: lvm/%.h
+ $(DOT_H_CHECK)
+
+pcmcia/%.check: pcmcia/%.h
+ $(DOT_H_CHECK)
+
+scsi/%.check: scsi/%.h
+ $(DOT_H_CHECK)
+
+scsi/conf/%.check: scsi/conf/%.h
+ $(DOT_H_CHECK)
+
+scsi/generic/%.check: scsi/generic/%.h
+ $(DOT_H_CHECK)
+
+scsi/impl/%.check: scsi/impl/%.h
+ $(DOT_H_CHECK)
+
+scsi/targets/%.check: scsi/targets/%.h
+ $(DOT_H_CHECK)
+
+scsi/adapters/%.check: scsi/adapters/%.h
+ $(DOT_H_CHECK)
+
+sysevent/%.check: sysevent/%.h
+ $(DOT_H_CHECK)
+
+contract/%.check: contract/%.h
+ $(DOT_H_CHECK)
+
+usb/%.check: usb/%.h
+ $(DOT_H_CHECK)
+
+usb/clients/audio/%.check: usb/clients/audio/%.h
+ $(DOT_H_CHECK)
+
+usb/hubd/%.check: usb/hubd/%.h
+ $(DOT_H_CHECK)
+
+usb/clients/hid/%.check: usb/clients/hid/%.h
+ $(DOT_H_CHECK)
+
+usb/clients/mass_storage/%.check: usb/clients/mass_storage/%.h
+ $(DOT_H_CHECK)
+
+usb/clients/hid/%.check: usb/clients/hid/%.h
+ $(DOT_H_CHECK)
+
+usb/clients/printer/%.check: usb/clients/printer/%.h
+ $(DOT_H_CHECK)
+
+1394/%.check: 1394/%.h
+ $(DOT_H_CHECK)
+
+rsm/%.check: rsm/%.h
+ $(DOT_H_CHECK)
+
+ROOTDIR= $(ROOT)/usr/include/sys
+
+ROOTDKTPDIR= $(ROOTDIR)/dktp
+
+sparc_ROOTDIRS= $(ROOTDKTPDIR) $(ROOTDIR)/scsi/adapters \
+ $(ROOTDIR)/scsi/targets \
+ $(ROOTDIR)/av
+
+i386_ROOTDIRS= $(ROOTDKTPDIR) $(ROOTDIR)/scsi/adapters $(ROOTDIR)/scsi/targets \
+ $(ROOTDIR)/i2o $(ROOTDIR)/agp
+
+ROOTDIRS= \
+ $(ROOTDIR) \
+ $(ROOTDIR)/audio \
+ $(ROOTDIR)/hotplug \
+ $(ROOTDIR)/hotplug/pci \
+ $(ROOTDIR)/crypto \
+ $(ROOTDIR)/dcam \
+ $(ROOTDIR)/iso \
+ $(ROOTDIR)/fm \
+ $(ROOTDIR)/fm/cpu \
+ $(ROOTDIR)/fm/io \
+ $(ROOTDIR)/fs \
+ $(ROOTDIR)/ib \
+ $(ROOTDIR)/ib/adapters/tavor \
+ $(ROOTDIR)/ib/ibtl \
+ $(ROOTDIR)/ib/ibtl/impl \
+ $(ROOTDIR)/ib/mgt \
+ $(ROOTDIR)/ib/mgt/ibmf \
+ $(ROOTDIR)/ib/ibnex \
+ $(ROOTDIR)/ib/clients/ibd \
+ $(ROOTDIR)/lvm \
+ $(ROOTDIR)/pcmcia \
+ $(ROOTDIR)/scsi \
+ $(ROOTDIR)/scsi/conf \
+ $(ROOTDIR)/scsi/generic \
+ $(ROOTDIR)/scsi/impl \
+ $(ROOTDIR)/fc4 \
+ $(ROOTDIR)/sysevent \
+ $(ROOTDIR)/contract \
+ $(ROOTDIR)/usb \
+ $(ROOTDIR)/usb/hubd \
+ $(ROOTDIR)/usb/clients \
+ $(ROOTDIR)/usb/clients/audio \
+ $(ROOTDIR)/usb/clients/hid \
+ $(ROOTDIR)/usb/clients/mass_storage \
+ $(ROOTDIR)/usb/clients/printer \
+ $(ROOTDIR)/usb/clients/ugen \
+ $(ROOTDIR)/1394 \
+ $(ROOTDIR)/rsm \
+ $($(MACH)_ROOTDIRS)
+
+
+ROOTHDRS= \
+ $($(MACH)_HDRS:%=$(ROOTDIR)/%) \
+ $(HDRS:%=$(ROOTDIR)/%)
+
+ROOTAUDHDRS= $(AUDIOHDRS:%=$(ROOTDIR)/audio/%)
+
+ROOTAVHDRS= $(AVHDRS:%=$(ROOTDIR)/av/%)
+
+ROOTCRYPTOHDRS= $(CRYPTOHDRS:%=$(ROOTDIR)/crypto/%)
+
+ROOTDCAMHDRS= $(DCAMHDRS:%=$(ROOTDIR)/dcam/%)
+
+ROOTIBHDRS= $(IBHDRS:%=$(ROOTDIR)/ib/%)
+ROOTIBDHDRS= $(IBDHDRS:%=$(ROOTDIR)/ib/clients/ibd/%)
+ROOTIBTLHDRS= $(IBTLHDRS:%=$(ROOTDIR)/ib/ibtl/%)
+ROOTIBTLIMPLHDRS= $(IBTLIMPLHDRS:%=$(ROOTDIR)/ib/ibtl/impl/%)
+ROOTIBNEXHDRS= $(IBNEXHDRS:%=$(ROOTDIR)/ib/ibnex/%)
+ROOTIBMGTHDRS= $(IBMGTHDRS:%=$(ROOTDIR)/ib/mgt/%)
+ROOTIBMFHDRS= $(IBMFHDRS:%=$(ROOTDIR)/ib/mgt/ibmf/%)
+ROOTTAVORHDRS= $(TAVORHDRS:%=$(ROOTDIR)/ib/adapters/tavor/%)
+
+ROOTISOHDRS= $(ISOHDRS:%=$(ROOTDIR)/iso/%)
+
+ROOTFMHDRS= $(FMHDRS:%=$(ROOTDIR)/fm/%)
+ROOTFMCPUHDRS= $(FMCPUHDRS:%=$(ROOTDIR)/fm/cpu/%)
+ROOTFMIOHDRS= $(FMIOHDRS:%=$(ROOTDIR)/fm/io/%)
+
+ROOTFSHDRS= $(FSHDRS:%=$(ROOTDIR)/fs/%)
+
+ROOTLVMHDRS= $(ALL_LVMHDRS:%=$(ROOTDIR)/lvm/%)
+
+ROOTPCMCIAHDRS= $(PCMCIAHDRS:%=$(ROOTDIR)/pcmcia/%)
+
+ROOTSCSIHDRS= $(SCSIHDRS:%=$(ROOTDIR)/scsi/%)
+ROOTSCSICONFHDRS= $(SCSICONFHDRS:%=$(ROOTDIR)/scsi/conf/%)
+ROOTSCSIGENHDRS= $(SCSIGENHDRS:%=$(ROOTDIR)/scsi/generic/%)
+ROOTSCSIIMPLHDRS= $(SCSIIMPLHDRS:%=$(ROOTDIR)/scsi/impl/%)
+ROOTSCSITARGETSHDRS= $(SCSITARGETSHDRS:%=$(ROOTDIR)/scsi/targets/%)
+ROOTSCSICADHDRS= $(SCSICADHDRS:%=$(ROOTDIR)/scsi/adapters/%)
+ROOTSCSIVHCIHDRS= $(SCSIVHCIHDRS:%=$(ROOTDIR)/scsi/adapters/%)
+
+ROOTFCHDRS= $(FCHDRS:%=$(ROOTDIR)/fc4/%)
+
+ROOTSYSEVENTHDRS= $(SYSEVENTHDRS:%=$(ROOTDIR)/sysevent/%)
+ROOTCONTRACTHDRS= $(CONTRACTHDRS:%=$(ROOTDIR)/contract/%)
+
+ROOTXHDRS= $(XHDRS:%=$(ROOTDIR)/%)
+
+ROOTUSBHDRS= $(USBHDRS:%=$(ROOTDIR)/usb/%)
+ROOTUSBAUDHDRS= $(USBAUDHDRS:%=$(ROOTDIR)/usb/clients/audio/%)
+ROOTUSBHUBDHDRS= $(USBHUBDHDRS:%=$(ROOTDIR)/usb/hubd/%)
+ROOTUSBHIDHDRS = $(USBHIDHDRS:%=$(ROOTDIR)/usb/clients/hid/%)
+ROOTUSBMSHDRS= $(USBMSHDRS:%=$(ROOTDIR)/usb/clients/mass_storage/%)
+ROOTUSBPRNHDRS= $(USBPRNHDRS:%=$(ROOTDIR)/usb/clients/printer/%)
+ROOTUGENHDRS= $(UGENHDRS:%=$(ROOTDIR)/usb/clients/ugen/%)
+
+ROOT1394HDRS= $(I1394HDRS:%=$(ROOTDIR)/1394/%)
+
+ROOTRSMHDRS= $(RSMHDRS:%=$(ROOTDIR)/rsm/%)
+
+ROOTSDKTPHDRS= $(SDKTPHDRS:%=$(ROOTDIR)/dktp/%)
+ROOTDKTPHDRS= $(DKTPHDRS:%=$(ROOTDIR)/dktp/%)
+ROOTPCHDRS= $(PCHDRS:%=$(ROOTDIR)/%)
+ROOTI2OHDRS= $(I2OHDRS:%=$(ROOTDIR)/i2o/%)
+ROOTHOTPLUGHDRS= $(HOTPLUGHDRS:%=$(ROOTDIR)/hotplug/%)
+ROOTHOTPLUGPCIHDRS= $(HOTPLUGPCIHDRS:%=$(ROOTDIR)/hotplug/pci/%)
+
+
+sparc_ROOTHDRS= $(ROOTSDKTPHDRS) $(ROOTSCSICADHDRS) $(ROOTSCSITARGETSHDRS) \
+ $(ROOTFCHDRS) $(ROOTUSBHDRS) $(ROOTUSBHUBDHDRS) $(ROOTPCMCIAHDRS) \
+ $(ROOTUSBAUDHDRS) \
+ $(ROOTUSBHIDHDRS) $(ROOTUSBMSHDRS) $(ROOTUSBPRNHDRS) \
+ $(ROOTUGENHDRS)
+
+i386_ROOTHDRS= $(ROOTDKTPHDRS) $(ROOTPCHDRS) $(ROOTSCSITARGETSHDRS) \
+ $(ROOTSCSIVHCIHDRS) $(ROOTFCHDRS) \
+ $(ROOTI2OHDRS) $(ROOTPCMCIAHDRS) $(ROOTHOTPLUGHDRS) \
+ $(ROOTHOTPLUGPCIHDRS)
+
+# install rules
+$(ROOTDIR)/%: %
+ $(INS.file)
+
+$(ROOTDIR)/crypto/%: crypto/%
+ $(INS.file)
+
+$(ROOTDIR)/fm/%: fm/%
+ $(INS.file)
+
+$(ROOTDIR)/fm/cpu/%: fm/cpu/%
+ $(INS.file)
+
+$(ROOTDIR)/fm/io/%: fm/io/%
+ $(INS.file)
+
+$(ROOTDIR)/fs/%: fs/%
+ $(INS.file)
+
+$(ROOTDIR)/ib/%: ib/%
+ $(INS.file)
+
+$(ROOTDIR)/ib/clients/ibd/%: ib/clients/ibd/%
+ $(INS.file)
+
+$(ROOTDIR)/ib/ibtl/%: ib/ibtl/%
+ $(INS.file)
+
+$(ROOTDIR)/ib/ibtl/impl/%: ib/ibtl/impl/%
+ $(INS.file)
+
+$(ROOTDIR)/ib/ibnex/%: ib/ibnex/%
+ $(INS.file)
+
+$(ROOTDIR)/ib/mgt/%: ib/mgt/%
+ $(INS.file)
+
+$(ROOTDIR)/ib/mgt/ibmf/%: ib/mgt/ibmf/%
+ $(INS.file)
+
+$(ROOTDIR)/ib/adapters/tavor/%: ib/adapters/tavor/%
+ $(INS.file)
+
+$(ROOTDIR)/lvm/%: lvm/%
+ $(INS.file)
+
+$(ROOTDIR)/pcmcia/%: pcmcia/%
+ $(INS.file)
+
+$(ROOTDIR)/scsi/%: scsi/%
+ $(INS.file)
+
+$(ROOTDIR)/scsi/conf/%: scsi/conf/%
+ $(INS.file)
+
+$(ROOTDIR)/scsi/generic/%: scsi/generic/%
+ $(INS.file)
+
+$(ROOTDIR)/scsi/impl/%: scsi/impl/%
+ $(INS.file)
+
+$(ROOTDIR)/scsi/targets/%: scsi/targets/%
+ $(INS.file)
+
+$(ROOTDIR)/fc4/%: fc4/%
+ $(INS.file)
+
+$(ROOTDIR)/sysevent/%: sysevent/%
+ $(INS.file)
+
+$(ROOTDIR)/contract/%: contract/%
+ $(INS.file)
+
+$(ROOTDIR)/usb/%: usb/%
+ $(INS.file)
+
+$(ROOTDIR)/usb/hubd/%: usb/hubd/%
+ $(INS.file)
+
+$(ROOTDIR)/usb/clients/hid/%: usb/clients/hid/%
+ $(INS.file)
+
+$(ROOTDIR)/usb/clients/mass_storage/%: usb/clients/mass_storage/%
+ $(INS.file)
+
+$(ROOTDIR)/dktp/%: dktp/%
+ $(INS.file)
+
+$(ROOTDIR)/1394/%: 1394/%
+ $(INS.file)
+
+$(ROOTDIR)/rsm/%: rsm/%
+ $(INS.file)
+
+$(ROOTDIRS):
+ $(INS.dir)
+
diff --git a/usr/src/uts/i86pc/Makefile b/usr/src/uts/i86pc/Makefile
index 96093f4cc4..90cc8f9dd2 100644
--- a/usr/src/uts/i86pc/Makefile
+++ b/usr/src/uts/i86pc/Makefile
@@ -45,6 +45,7 @@ INTEL_LINTS = genunix
LINT_LIBS = $(LINT_LIB) \
$(KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
+ $(CLOSED_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
$(INTEL_LINTS:%=$(INTEL_LIB_DIR)/llib-l%.ln)
#
@@ -58,27 +59,52 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
machmodlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist modlist.intel := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
.KEEP_STATE:
-.PARALLEL: $(KMODS) $(XMODS)
+.PARALLEL: $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
+ modlist modlist.intel
-def all clean clobber clean.lint: genassym unix .WAIT $(KMODS) $(XMODS)
+def all clean clobber clean.lint: genassym unix .WAIT \
+ $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS)
-install: install_platforms genassym unix .WAIT $(KMODS) $(XMODS)
+install: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \
+ $(XMODS) $(CLOSED_XMODS)
+
+# list the modules under i86pc.
+modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS)
+
+# list the modules for Install -k i86pc.
+modlist.karch: modlist modlist.intel
+
+modlist.intel:
+ @cd $(SRC)/uts/intel; pwd; $(MAKE) $(NO_STATE) modlist
lintlib: unix
-modlintlib: $(KMODS)
+modlintlib: $(KMODS) $(CLOSED_KMODS)
genassym unix $(KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(XMODS): FRC
@if [ -f $@/Makefile ]; then \
- cd $@; pwd; $(MAKE) $(TARGET); \
+ cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
+ else \
+ true; \
+ fi
+
+$(CLOSED_KMODS): FRC
+ cd $(CLOSED)/uts/i86pc/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(CLOSED_XMODS): FRC
+ @if [ -f $(CLOSED)/uts/i86pc/$@/Makefile ]; then \
+ cd $(CLOSED)/uts/i86pc/$@; pwd; \
+ $(MAKE) $(NO_STATE) $(TARGET); \
else \
true; \
fi
@@ -144,7 +170,9 @@ include ../Makefile.targ
# Cross-reference customization: build a cross-reference over all of the
# i86pc-related directories.
#
-XRDIRS = ../i86pc ../intel ../common
+SHARED_XRDIRS = ../i86pc ../intel ../common
+XRDIRS = $(SHARED_XRDIRS)
+$(CLOSED_BUILD)XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%)
XRPRUNE = sun4u sun4
cscope.out tags: FRC
diff --git a/usr/src/uts/i86pc/Makefile.files b/usr/src/uts/i86pc/Makefile.files
index c1521e2966..ff2999c94c 100644
--- a/usr/src/uts/i86pc/Makefile.files
+++ b/usr/src/uts/i86pc/Makefile.files
@@ -25,8 +25,8 @@
#
#ident "%Z%%M% %I% %E% SMI"
#
-# This Makefile defines all file modules in the directory uts/i86pc
-# and it's children. These are the source files which i86pc
+# This Makefile defines file modules in the directory uts/i86pc
+# and its children. These are the source files which are i86pc
# "implementation architecture" dependent.
#
@@ -112,33 +112,20 @@ PCINEXUS_OBJS += pci.o pci_common.o pci_kstats.o pci_tools.o
TCIC_OBJS += tcic.o
-ATA_OBJS += $(GHD_OBJS) ata_blacklist.o ata_common.o ata_disk.o \
- ata_dma.o atapi.o atapi_fsm.o ata_debug.o \
- sil3xxx.o
-
-NCRS_OBJS += glm.o
-ELXL_OBJS += elxl.o elxl_cmn.o mii.o
-
FD_OBJS += fd.o
PCN_OBJS += mii.o
-SBPRO_OBJS += sbpro.o
DNET_OBJS += dnet.o mii.o
-IPRB_OBJS += iprb.o mii.o
-BMC_OBJS += bmc_fe.o bmc_kcs.o
LOGI_OBJS += logi.o
MSCSI_OBJS += mscsi.o
MSMOUSE_OBJS += msm.o
PCPLUSMP_OBJS += apic.o psm_common.o apic_introp.o
RTLS_OBJS += rtls.o
-SPWR_OBJS += spwr.o 9432.o lm9432.o lm9432cf.o
AGPGART_OBJS += agpgart.o \
agp_kstat.o
AGPTARGET_OBJS += agptarget.o
AMD64GART_OBJS += amd64_gart.o
-BSCV_OBJS += bscv.o
-BSCBUS_OBJS += bscbus.o
#
# PCI-Express driver modules
diff --git a/usr/src/uts/i86pc/Makefile.i86pc b/usr/src/uts/i86pc/Makefile.i86pc
index fb651d4374..041f425e02 100644
--- a/usr/src/uts/i86pc/Makefile.i86pc
+++ b/usr/src/uts/i86pc/Makefile.i86pc
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -20,303 +19,12 @@
#
#
-# uts/i86pc/Makefile.i86pc
-#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
-# This makefile contains the common definitions for the i86pc unix
-# and all i86pc implementation architecture dependent modules.
-#
-
-#
-# Machine type (implementation architecture):
-#
-PLATFORM = i86pc
-
-#
-# Everybody needs to know how to build modstubs.o and to locate unix.o
-#
-UNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix
-GENLIB_DIR = $(UTSBASE)/intel/genunix
-MODSTUBS_DIR = $(UNIX_DIR)
-DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
-LINTS_DIR = $(OBJS_DIR)
-LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
-GEN_LINT_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
-
-DTRACESTUBS_O = $(OBJS_DIR)/dtracestubs.o
-DTRACESTUBS = $(OBJS_DIR)/libdtracestubs.so
-
-SYM_MOD = $(OBJS_DIR)/unix.sym
-
-UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
-MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
-GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
-LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
-GEN_LINT_LIB = $(GEN_LINT_LIB_DIR)/llib-lgenunix.ln
-
-#
-# Include the makefiles which define build rule templates, the
-# collection of files per module, and a few specific flags. Note
-# that order is significant, just as with an include path. The
-# first build rule template which matches the files name will be
-# used. By including these in order from most machine dependent
-# to most machine independent, we allow a machine dependent file
-# to be used in preference over a machine independent version
-# (Such as a machine specific optimization, which preserves the
-# interfaces.)
-#
-include $(UTSBASE)/$(PLATFORM)/Makefile.files
-include $(UTSBASE)/intel/Makefile.files
-include $(UTSBASE)/common/Makefile.files
-
-#
-# Include machine independent rules. Note that this does not imply
-# that the resulting module from rules in Makefile.uts is machine
-# independent. Only that the build rules are machine independent.
-#
-include $(UTSBASE)/Makefile.uts
-
-#
-# Define supported builds
-#
-DEF_BUILDS = $(DEF_BUILDS64) $(DEF_BUILDS32)
-ALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32)
-
-#
-# x86 or amd64 inline templates
-#
-INLINES_32 = $(UTSBASE)/intel/ia32/ml/ia32.il
-INLINES_64 = $(UTSBASE)/intel/amd64/ml/amd64.il
-INLINES += $(INLINES_$(CLASS))
-
-#
-# kernel-specific optimizations; override default in Makefile.master
-#
-
-CFLAGS_XARCH_32 = $(i386_CFLAGS)
-CFLAGS_XARCH_64 = $(amd64_CFLAGS)
-CFLAGS_XARCH = $(CFLAGS_XARCH_$(CLASS))
-
-COPTFLAG_32 = $(COPTFLAG)
-COPTFLAG_64 = $(COPTFLAG64)
-COPTIMIZE = $(COPTFLAG_$(CLASS))
-
-CFLAGS = $(CFLAGS_XARCH)
-CFLAGS += $(COPTIMIZE)
-CFLAGS += $(INLINES) -D_ASM_INLINES
-CFLAGS += $(CCMODE)
-CFLAGS += $(SPACEFLAG)
-CFLAGS += $(CCUNBOUND)
-CFLAGS += $(CFLAGS_uts)
-
-ASFLAGS_XARCH_32 = $(i386_ASFLAGS)
-ASFLAGS_XARCH_64 = $(amd64_ASFLAGS)
-ASFLAGS_XARCH = $(ASFLAGS_XARCH_$(CLASS))
-
-ASFLAGS += $(ASFLAGS_XARCH)
-
-AS_INC_PATH += -I$(DSF_DIR)/$(OBJS_DIR)
-
-#
-# The following must be defined for all implementations:
-#
-# MAPFILE: ld mapfile for the build of kernel/unix.
-# MODSTUBS: Module stubs source file.
-# GENASSYM_SRC: genassym.c
-#
-MAPFILE = $(UTSBASE)/$(PLATFORM)/conf/Mapfile
-MODSTUBS = $(UTSBASE)/intel/ia32/ml/modstubs.s
-GENASSYM_SRC = $(UTSBASE)/$(PLATFORM)/ml/genassym.c
-OFFSETS_SRC = $(UTSBASE)/$(PLATFORM)/ml/offsets.in
-PLATFORM_OFFSETS_32 = $(UTSBASE)/$(PLATFORM)/ml/mach_offsets.in
-PLATFORM_OFFSETS_64 = $(UTSBASE)/intel/amd64/ml/mach_offsets.in
-PLATFORM_OFFSETS_SRC = $(PLATFORM_OFFSETS_$(CLASS))
-
-#
-# Define the actual specific platforms
-#
-MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP
-
-#
-# Software workarounds for hardware "features"
-#
-include $(UTSBASE)/$(PLATFORM)/Makefile.workarounds
-
-#
-# Simulator flag
-#
-i386_SIMULATOR = -D_SIMULATOR_SUPPORT
-amd64_SIMULATOR = -D_SIMULATOR_SUPPORT
-
-SIMULATOR = $($(MACH)_SIMULATOR)
-
-#
-# Debugging level
-#
-# Special knowledge of which special debugging options effect which
-# file is used to optimize the build if these flags are changed.
-#
-# XXX: The above could possibly be done for more flags and files, but
-# is left as an experiment to the interested reader. Be forewarned,
-# that excessive use could lead to maintenance difficulties.
-#
-DEBUG_DEFS_OBJ32 =
-DEBUG_DEFS_DBG32 = -DDEBUG
-DEBUG_DEFS_DBG32 += $(SIMULATOR)
-DEBUG_DEFS_OBJ64 =
-DEBUG_DEFS_DBG64 = -DDEBUG
-DEBUG_DEFS_DBG64 += $(SIMULATOR)
-DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
+UTSTREE=$(UTSBASE)
-DEBUG_COND_OBJ32 :sh = echo \\043
-DEBUG_COND_DBG32 =
-DEBUG_COND_OBJ64 :sh = echo \\043
-DEBUG_COND_DBG64 =
-IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
-
-$(IF_DEBUG_OBJ)trap.o := DEBUG_DEFS += -DTRAPDEBUG -DTRAPTRACE
-$(IF_DEBUG_OBJ)syscall_asm.o := DEBUG_DEFS += -DSYSCALLTRACE -DTRAPTRACE
-$(IF_DEBUG_OBJ)syscall_asm_amd64.o := DEBUG_DEFS += -DSYSCALLTRACE -DTRAPTRACE
-$(IF_DEBUG_OBJ)fast_trap_asm.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_DEBUG_OBJ)interrupt.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_DEBUG_OBJ)locore.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_DEBUG_OBJ)mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_DEBUG_OBJ)machdep.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_DEBUG_OBJ)exception.o := DEBUG_DEFS += -DTRAPTRACE
-
-#
-# Build `options'. These are historical and the need for these
-# was removed by the module technology.
-#
-OPTION_DEFS = -DC2_AUDIT
-
-#
-# Collect the preprocessor definitions to be associated with *all*
-# files.
-#
-ALL_DEFS = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \
- $(OPTION_DEFS)
-GENASSYM_DEFS = $(MACHINE_DEFS) $(OPTION_DEFS) \
- -_gcc=-fno-eliminate-unused-debug-symbols \
- -_gcc=-fno-eliminate-unused-debug-types
-
-#
-# ----- TRANSITIONAL SECTION --------------------------------------------------
-#
-
-#
-# Not everything which *should* be a module is a module yet. The
-# following is a list of such objects which are currently part of
-# the base kernel but should soon become kmods.
-#
-# XXX: $(KMACCT_OBJS) is neither in the MT kernel nor was it ever
-# made into a module. If it is made MT safe before being made
-# into a module, it should be added to this list. It was in
-# this list pre ON-4.0.
-#
-#
-MACH_NOT_YET_KMODS = $(AUTOCONF_OBJS)
-
-#
-# ----- END OF TRANSITIONAL SECTION -------------------------------------------
-#
-
-#
-# The kernels modules which are "implementation architecture"
-# specific for this machine are enumerated below. Note that most
-# of these modules must exist (in one form or another) for each
-# architecture.
-#
-# Machine Specific Driver Modules (/kernel/drv)
-# DRV_KMODS are built both 32-bit and 64-bit
-# DRV_KMODS_32 are built only 32-bit
-# DRV_KMODS_64 are built only 64-bit
-#
-# XXX: How many of these are really machine specific?
-#
-DRV_KMODS += rootnex
-DRV_KMODS += isa
-DRV_KMODS += pci
-DRV_KMODS += pcic
-DRV_KMODS += pcie_pci
-DRV_KMODS += npe
-
-DRV_KMODS_32 += bscv
-DRV_KMODS_32 += bscbus
-DRV_KMODS += elxl
-DRV_KMODS += fd
-DRV_KMODS += fdc
-DRV_KMODS += kb8042
-DRV_KMODS += pci-ide
-DRV_KMODS += pcn
-DRV_KMODS_32 += ncrs
-DRV_KMODS_32 += sbpro
-DRV_KMODS += audiovia823x
-DRV_KMODS += audio810
-DRV_KMODS += audioens
-
-DRV_KMODS += ata
-DRV_KMODS_32 += dnet
-DRV_KMODS += iprb
-DRV_KMODS += bmc
-DRV_KMODS += logi
-DRV_KMODS_32 += mscsi
-DRV_KMODS_32 += msm
-DRV_KMODS += pcplusmp
-DRV_KMODS += rtls
-DRV_KMODS += agpgart
-DRV_KMODS += agptarget
-DRV_KMODS += amd64_gart
-
-DRV_KMODS += cpc
-
-DRV_KMODS += power
-
-#
-# Exec Class Modules (/kernel/exec):
-#
-EXEC_KMODS +=
-
-#
-# Scheduling Class Modules (/kernel/sched):
-#
-SCHED_KMODS +=
-
-#
-# File System Modules (/kernel/fs):
-#
-FS_KMODS +=
-
-#
-# Streams Modules (/kernel/strmod):
-#
-STRMOD_KMODS += vuid2ps2
-STRMOD_KMODS += vuid3ps2
-STRMOD_KMODS += vuidm3p
-STRMOD_KMODS += vuidm4p
-STRMOD_KMODS += vuidm5p
-
-#
-# 'System' Modules (/kernel/sys):
-#
-SYS_KMODS +=
-
-#
-# 'Misc' Modules (/kernel/misc):
-#
-MISC_KMODS += pci_autoconfig bootdev acpica pciehpc gfx_private
-
-#
-# 'Mach' Modules (/kernel/mach):
-#
-MACH_KMODS += uppc
-
-#
-# Modules excluded from the product:
-#
-XMODS += spwr
+include $(UTSBASE)/i86pc/Makefile.i86pc.shared
diff --git a/usr/src/uts/i86pc/Makefile.i86pc.shared b/usr/src/uts/i86pc/Makefile.i86pc.shared
new file mode 100644
index 0000000000..c983d2a6ca
--- /dev/null
+++ b/usr/src/uts/i86pc/Makefile.i86pc.shared
@@ -0,0 +1,321 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/i86pc/Makefile.i86pc
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This makefile contains the common definitions for the i86pc unix
+# and all i86pc implementation architecture dependent modules.
+#
+
+#
+# Machine type (implementation architecture):
+#
+PLATFORM = i86pc
+
+#
+# Everybody needs to know how to build modstubs.o and to locate unix.o
+#
+UNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix
+GENLIB_DIR = $(UTSBASE)/intel/genunix
+MODSTUBS_DIR = $(UNIX_DIR)
+DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
+LINTS_DIR = $(OBJS_DIR)
+LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
+GEN_LINT_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
+
+DTRACESTUBS_O = $(OBJS_DIR)/dtracestubs.o
+DTRACESTUBS = $(OBJS_DIR)/libdtracestubs.so
+
+SYM_MOD = $(OBJS_DIR)/unix.sym
+
+UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
+MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
+GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
+LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
+GEN_LINT_LIB = $(GEN_LINT_LIB_DIR)/llib-lgenunix.ln
+
+#
+# Include the makefiles which define build rule templates, the
+# collection of files per module, and a few specific flags. Note
+# that order is significant, just as with an include path. The
+# first build rule template which matches the files name will be
+# used. By including these in order from most machine dependent
+# to most machine independent, we allow a machine dependent file
+# to be used in preference over a machine independent version
+# (Such as a machine specific optimization, which preserves the
+# interfaces.)
+#
+include $(UTSTREE)/$(PLATFORM)/Makefile.files
+include $(UTSTREE)/intel/Makefile.files
+include $(UTSTREE)/common/Makefile.files
+
+#
+# Include machine independent rules. Note that this does not imply
+# that the resulting module from rules in Makefile.uts is machine
+# independent. Only that the build rules are machine independent.
+#
+include $(UTSBASE)/Makefile.uts
+
+#
+# Define supported builds
+#
+DEF_BUILDS = $(DEF_BUILDS64) $(DEF_BUILDS32)
+ALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32)
+
+#
+# x86 or amd64 inline templates
+#
+INLINES_32 = $(UTSBASE)/intel/ia32/ml/ia32.il
+INLINES_64 = $(UTSBASE)/intel/amd64/ml/amd64.il
+INLINES += $(INLINES_$(CLASS))
+
+#
+# kernel-specific optimizations; override default in Makefile.master
+#
+
+CFLAGS_XARCH_32 = $(i386_CFLAGS)
+CFLAGS_XARCH_64 = $(amd64_CFLAGS)
+CFLAGS_XARCH = $(CFLAGS_XARCH_$(CLASS))
+
+COPTFLAG_32 = $(COPTFLAG)
+COPTFLAG_64 = $(COPTFLAG64)
+COPTIMIZE = $(COPTFLAG_$(CLASS))
+
+CFLAGS = $(CFLAGS_XARCH)
+CFLAGS += $(COPTIMIZE)
+CFLAGS += $(INLINES) -D_ASM_INLINES
+CFLAGS += $(CCMODE)
+CFLAGS += $(SPACEFLAG)
+CFLAGS += $(CCUNBOUND)
+CFLAGS += $(CFLAGS_uts)
+
+ASFLAGS_XARCH_32 = $(i386_ASFLAGS)
+ASFLAGS_XARCH_64 = $(amd64_ASFLAGS)
+ASFLAGS_XARCH = $(ASFLAGS_XARCH_$(CLASS))
+
+ASFLAGS += $(ASFLAGS_XARCH)
+
+AS_INC_PATH += -I$(DSF_DIR)/$(OBJS_DIR)
+
+#
+# The following must be defined for all implementations:
+#
+# MAPFILE: ld mapfile for the build of kernel/unix.
+# MODSTUBS: Module stubs source file.
+# GENASSYM_SRC: genassym.c
+#
+MAPFILE = $(UTSBASE)/$(PLATFORM)/conf/Mapfile
+MODSTUBS = $(UTSBASE)/intel/ia32/ml/modstubs.s
+GENASSYM_SRC = $(UTSBASE)/$(PLATFORM)/ml/genassym.c
+OFFSETS_SRC = $(UTSBASE)/$(PLATFORM)/ml/offsets.in
+PLATFORM_OFFSETS_32 = $(UTSBASE)/$(PLATFORM)/ml/mach_offsets.in
+PLATFORM_OFFSETS_64 = $(UTSBASE)/intel/amd64/ml/mach_offsets.in
+PLATFORM_OFFSETS_SRC = $(PLATFORM_OFFSETS_$(CLASS))
+
+#
+# Define the actual specific platforms
+#
+MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP
+
+#
+# Software workarounds for hardware "features"
+#
+
+include $(UTSBASE)/$(PLATFORM)/Makefile.workarounds
+
+#
+# Simulator flag
+#
+i386_SIMULATOR = -D_SIMULATOR_SUPPORT
+amd64_SIMULATOR = -D_SIMULATOR_SUPPORT
+
+SIMULATOR = $($(MACH)_SIMULATOR)
+
+#
+# Debugging level
+#
+# Special knowledge of which special debugging options effect which
+# file is used to optimize the build if these flags are changed.
+#
+# XXX: The above could possibly be done for more flags and files, but
+# is left as an experiment to the interested reader. Be forewarned,
+# that excessive use could lead to maintenance difficulties.
+#
+DEBUG_DEFS_OBJ32 =
+DEBUG_DEFS_DBG32 = -DDEBUG
+DEBUG_DEFS_DBG32 += $(SIMULATOR)
+DEBUG_DEFS_OBJ64 =
+DEBUG_DEFS_DBG64 = -DDEBUG
+DEBUG_DEFS_DBG64 += $(SIMULATOR)
+DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
+
+DEBUG_COND_OBJ32 :sh = echo \\043
+DEBUG_COND_DBG32 =
+DEBUG_COND_OBJ64 :sh = echo \\043
+DEBUG_COND_DBG64 =
+IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
+
+$(IF_DEBUG_OBJ)trap.o := DEBUG_DEFS += -DTRAPDEBUG -DTRAPTRACE
+$(IF_DEBUG_OBJ)syscall_asm.o := DEBUG_DEFS += -DSYSCALLTRACE -DTRAPTRACE
+$(IF_DEBUG_OBJ)syscall_asm_amd64.o := DEBUG_DEFS += -DSYSCALLTRACE -DTRAPTRACE
+$(IF_DEBUG_OBJ)fast_trap_asm.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_DEBUG_OBJ)interrupt.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_DEBUG_OBJ)locore.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_DEBUG_OBJ)mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_DEBUG_OBJ)machdep.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_DEBUG_OBJ)exception.o := DEBUG_DEFS += -DTRAPTRACE
+
+#
+# Build `options'. These are historical and the need for these
+# was removed by the module technology.
+#
+OPTION_DEFS = -DC2_AUDIT
+
+#
+# Collect the preprocessor definitions to be associated with *all*
+# files.
+#
+ALL_DEFS = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \
+ $(OPTION_DEFS)
+GENASSYM_DEFS = $(MACHINE_DEFS) $(OPTION_DEFS) \
+ -_gcc=-fno-eliminate-unused-debug-symbols \
+ -_gcc=-fno-eliminate-unused-debug-types
+
+#
+# ----- TRANSITIONAL SECTION --------------------------------------------------
+#
+
+#
+# Not everything which *should* be a module is a module yet. The
+# following is a list of such objects which are currently part of
+# the base kernel but should soon become kmods.
+#
+# XXX: $(KMACCT_OBJS) is neither in the MT kernel nor was it ever
+# made into a module. If it is made MT safe before being made
+# into a module, it should be added to this list. It was in
+# this list pre ON-4.0.
+#
+#
+MACH_NOT_YET_KMODS = $(AUTOCONF_OBJS)
+
+#
+# ----- END OF TRANSITIONAL SECTION -------------------------------------------
+#
+
+#
+# The kernels modules which are "implementation architecture"
+# specific for this machine are enumerated below. Note that most
+# of these modules must exist (in one form or another) for each
+# architecture.
+#
+# Machine Specific Driver Modules (/kernel/drv)
+# DRV_KMODS are built both 32-bit and 64-bit
+# DRV_KMODS_32 are built only 32-bit
+# DRV_KMODS_64 are built only 64-bit
+#
+# XXX: How many of these are really machine specific?
+#
+DRV_KMODS += rootnex
+DRV_KMODS += isa
+DRV_KMODS += pci
+DRV_KMODS += pcie_pci
+DRV_KMODS += npe
+
+DRV_KMODS += fd
+DRV_KMODS += fdc
+DRV_KMODS += kb8042
+DRV_KMODS += pci-ide
+DRV_KMODS += audio810
+
+DRV_KMODS_32 += dnet
+DRV_KMODS += logi
+DRV_KMODS_32 += mscsi
+DRV_KMODS_32 += msm
+DRV_KMODS += pcplusmp
+DRV_KMODS += agpgart
+DRV_KMODS += agptarget
+DRV_KMODS += amd64_gart
+
+DRV_KMODS += cpc
+DRV_KMODS += power
+
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += ata
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += audiovia823x
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += audioens
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += bmc
+$(CLOSED_BUILD)CLOSED_DRV_KMODS_32 += bscbus
+$(CLOSED_BUILD)CLOSED_DRV_KMODS_32 += bscv
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += elxl
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += iprb
+$(CLOSED_BUILD)CLOSED_DRV_KMODS_32 += ncrs
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcic
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcn
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += rtls
+$(CLOSED_BUILD)CLOSED_DRV_KMODS_32 += sbpro
+
+#
+# Exec Class Modules (/kernel/exec):
+#
+EXEC_KMODS +=
+
+#
+# Scheduling Class Modules (/kernel/sched):
+#
+SCHED_KMODS +=
+
+#
+# File System Modules (/kernel/fs):
+#
+FS_KMODS +=
+
+#
+# Streams Modules (/kernel/strmod):
+#
+STRMOD_KMODS += vuid2ps2
+STRMOD_KMODS += vuid3ps2
+STRMOD_KMODS += vuidm3p
+STRMOD_KMODS += vuidm4p
+STRMOD_KMODS += vuidm5p
+
+#
+# 'System' Modules (/kernel/sys):
+#
+SYS_KMODS +=
+
+#
+# 'Misc' Modules (/kernel/misc):
+#
+MISC_KMODS += pci_autoconfig bootdev acpica pciehpc gfx_private
+
+#
+# 'Mach' Modules (/kernel/mach):
+#
+MACH_KMODS += uppc
+
+#
+# Modules excluded from the product:
+#
+$(CLOSED_BUILD)CLOSED_XMODS += spwr
diff --git a/usr/src/uts/i86pc/Makefile.rules b/usr/src/uts/i86pc/Makefile.rules
index 08cf9503b6..a272f48bf5 100644
--- a/usr/src/uts/i86pc/Makefile.rules
+++ b/usr/src/uts/i86pc/Makefile.rules
@@ -49,18 +49,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/dktp/hba/ncrs/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/iprb/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/bmc/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/pci/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -87,14 +75,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/psm/%.c
$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/psm/%.s
$(COMPILE.s) -o $@ $<
-$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/rtls/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/spwr/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/ml/%.s
$(COMPILE.s) -o $@ $<
@@ -110,18 +90,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/io/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/dktp/controller/ata/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/dktp/hba/ghd/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/elxl/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/common/os/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -214,15 +182,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/conf/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/dktp/hba/ncrs/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/iprb/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/bmc/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/pci/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -244,12 +203,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/psm/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/psm/%.s
@($(LHEAD) $(LINT.s) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/rtls/%.c
- @($(LHEAD) $(LINT.s) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/spwr/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/ml/%.s
@($(LHEAD) $(LINT.s) $< $(LTAIL))
@@ -262,15 +215,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/vm/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/dktp/controller/ata/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/dktp/hba/ghd/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/elxl/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/common/os/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
diff --git a/usr/src/uts/i86pc/Makefile.targ b/usr/src/uts/i86pc/Makefile.targ
index 89a23b5838..3e889bbbcc 100644
--- a/usr/src/uts/i86pc/Makefile.targ
+++ b/usr/src/uts/i86pc/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,28 +18,12 @@
#
# CDDL HEADER END
#
-#
-# uts/i86pc/Makefile.targ
-#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# This Makefile defines the set of all required, target containing
-# included Makefiles for the i86pc "implementation architecture".
+# ident "%Z%%M% %I% %E% SMI"
#
-#
-# Targets for all implementations:
-#
-include $(UTSBASE)/Makefile.targ
-
-#
-# Target set for i86pc (order is not important, as it is with the
-# isomorphic Makefile.files set).
-#
-include $(UTSBASE)/i86pc/Makefile.rules
-include $(UTSBASE)/intel/Makefile.rules
-include $(UTSBASE)/common/Makefile.rules
+UTSTREE=$(UTSBASE)
+include $(UTSBASE)/i86pc/Makefile.targ.shared
diff --git a/usr/src/uts/i86pc/Makefile.targ.shared b/usr/src/uts/i86pc/Makefile.targ.shared
new file mode 100644
index 0000000000..4ffd2669d6
--- /dev/null
+++ b/usr/src/uts/i86pc/Makefile.targ.shared
@@ -0,0 +1,46 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/i86pc/Makefile.targ
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# This Makefile defines the set of all required, target containing
+# included Makefiles for the i86pc "implementation architecture".
+#
+
+#
+# Targets for all implementations:
+#
+include $(UTSBASE)/Makefile.targ
+
+#
+# Target set for i86pc (order is not important, as it is with the
+# isomorphic Makefile.files set).
+#
+include $(UTSTREE)/i86pc/Makefile.rules
+include $(UTSTREE)/intel/Makefile.rules
+include $(UTSTREE)/common/Makefile.rules
+
diff --git a/usr/src/uts/intel/Makefile b/usr/src/uts/intel/Makefile
index c8a3880452..b935dec98e 100644
--- a/usr/src/uts/intel/Makefile
+++ b/usr/src/uts/intel/Makefile
@@ -35,15 +35,16 @@ UTSBASE = ..
include Makefile.intel
LINT_LIBS = $(LINT_LIB) $(GEN_LINT_LIB) \
- $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
+ $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
+ $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
# EXPORT DELETE START
LINT_LIBS += $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
-LINT_XMODLIBS3 = $(XMODS:lsimega=)
-LINT_XMODLIBS2 = $(LINT_XMODLIBS3:adpu320=)
-LINT_XMODLIBS1 = $(LINT_XMODLIBS2:e1000g=)
-LINT_XMODLIBS = $(LINT_XMODLIBS1:nge=)
-LINT_LIBS += $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln)
+$(CLOSED_BUILD)LINT_CLOSED_XMOD3 = $(CLOSED_XMODS:lsimega=)
+$(CLOSED_BUILD)LINT_CLOSED_XMOD2 = $(LINT_CLOSED_XMOD3:adpu320=)
+$(CLOSED_BUILD)LINT_CLOSED_XMOD1 = $(LINT_CLOSED_XMOD2:e1000g=)
+$(CLOSED_BUILD)LINT_XMODLIBS = $(LINT_CLOSED_XMOD1:nge=)
+$(CLOSED_BUILD)LINT_LIBS += $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln)
#
# dprov is delivered in the SUNWcrtptoint package.
@@ -56,9 +57,12 @@ DRV_KMODS += dprov
# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
# should not be listed in the lint target.
#
-CRYPTO_EK_KMODS += aes256
-CRYPTO_EK_KMODS += arcfour2048
-CRYPTO_EK_KMODS += blowfish448
+# Don't build these for OpenSolaris, since they will be replaced by
+# binaries that are signed by Sun RE.
+#
+$(CLOSED_BUILD)CRYPTO_EK_KMODS += aes256
+$(CLOSED_BUILD)CRYPTO_EK_KMODS += arcfour2048
+$(CLOSED_BUILD)CRYPTO_EK_KMODS += blowfish448
# EXPORT DELETE END
@@ -71,24 +75,40 @@ clean := TARGET= clean
clobber := TARGET= clobber
lint := TARGET= lint
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
install_h := TARGET= install_h
.KEEP_STATE:
-.PARALLEL: $(KMODS) $(SVVS) $(XMODS) config $(LINT_DEPS)
+.PARALLEL: $(KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) $(CLOSED_XMODS) \
+ config $(LINT_DEPS)
-def all install clean clobber: $(KMODS) $(SVVS) $(XMODS) config
+def all install clean clobber modlist: $(KMODS) $(CLOSED_KMODS) \
+ $(SVVS) $(XMODS) $(CLOSED_XMODS) config
-modlintlib clean.lint: $(LINT_KMODS) $(SVVS) $(XMODS)
+modlintlib clean.lint: $(LINT_KMODS) $(CLOSED_LINT_KMODS) $(SVVS) \
+ $(XMODS) $(CLOSED_XMODS)
$(KMODS) $(SUBDIRS) config: FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(CLOSED_KMODS): FRC
+ cd $(CLOSED)/uts/intel/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
-$(SVVS) $(XMODS): FRC
+$(XMODS): FRC
@if [ -f $@/Makefile ]; then \
- cd $@; pwd; $(MAKE) $(TARGET); \
+ cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
+ else \
+ true; \
+ fi
+
+$(SVVS) $(CLOSED_XMODS): FRC
+ @if [ -f $(CLOSED)/uts/intel/$@/Makefile ]; then \
+ cd $(CLOSED)/uts/intel/$@; pwd; \
+ $(MAKE) $(NO_STATE) $(TARGET); \
else \
true; \
fi
diff --git a/usr/src/uts/intel/Makefile.files b/usr/src/uts/intel/Makefile.files
index 20c8a70c23..e4eda3b320 100644
--- a/usr/src/uts/intel/Makefile.files
+++ b/usr/src/uts/intel/Makefile.files
@@ -28,7 +28,7 @@
# ident "%Z%%M% %I% %E% SMI"
#
# This Makefile defines all file modules and build rules for the
-# directory uts/intel and it's children. These are the source files which
+# directory uts/intel and its children. These are the source files which
# are specific to x86 processor architectures.
#
@@ -146,14 +146,6 @@ FBT_OBJS += fbt.o
SDT_OBJS += sdt.o
#
-# adpu320 module
-#
-ADPU320_OBJS = adpu320.o hwminit.o hwmhrst.o hwmtask.o \
- hwmutil.o hwmptcl.o hwmintr.o hwmdlvr.o \
- hwmse2.o hwmdiag.o rsminit.o rsmtask.o \
- rsmutil.o xlminit.o xlmtask.o xlmutil.o
-
-#
# Pentium Performance Counter BackEnd module
#
P123_PCBE_OBJS = p123_pcbe.o
@@ -179,11 +171,6 @@ AAC_OBJS = aac.o
AMR_OBJS = amr.o
#
-# LSIMEGA module
-#
-LSIMEGA_OBJS = lsimega.o
-
-#
# special files
#
MODSTUB_OBJ += \
diff --git a/usr/src/uts/intel/Makefile.intel b/usr/src/uts/intel/Makefile.intel
index 24a72bf10f..a440c99348 100644
--- a/usr/src/uts/intel/Makefile.intel
+++ b/usr/src/uts/intel/Makefile.intel
@@ -19,532 +19,14 @@
#
# CDDL HEADER END
#
+
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
-#
-# This makefile contains the common definitions for all intel
-# implementation architecture independent modules.
-
-#
-# Machine type (implementation architecture):
-#
-PLATFORM = i86pc
-#
-# Everybody needs to know how to build modstubs.o and to locate unix.o.
-# Note that unix.o must currently be selected from among the possible
-# "implementation architectures". Note further, that unix.o is only
-# used as an optional error check for undefines so (theoretically)
-# any "implementation architectures" could be used. We choose i86pc
-# because it is the reference port.
-#
-UNIX_DIR = $(UTSBASE)/i86pc/unix
-GENLIB_DIR = $(UTSBASE)/intel/genunix
-IPDRV_DIR = $(UTSBASE)/intel/ip
-MODSTUBS_DIR = $(UNIX_DIR)
-DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
-LINTS_DIR = $(OBJS_DIR)
-LINT_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
-
-UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
-GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
-MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
-LINT_LIB = $(UTSBASE)/i86pc/lint-libs/$(OBJS_DIR)/llib-lunix.ln
-GEN_LINT_LIB = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
+UTSTREE=$(UTSBASE)
-#
-# Include the makefiles which define build rule templates, the
-# collection of files per module, and a few specific flags. Note
-# that order is significant, just as with an include path. The
-# first build rule template which matches the files name will be
-# used. By including these in order from most machine dependent
-# to most machine independent, we allow a machine dependent file
-# to be used in preference over a machine independent version
-# (Such as a machine specific optimization, which preserves the
-# interfaces.)
-#
-include $(UTSBASE)/intel/Makefile.files
-include $(UTSBASE)/common/Makefile.files
-
-#
-# Include machine independent rules. Note that this does not imply
-# that the resulting module from rules in Makefile.uts is machine
-# independent. Only that the build rules are machine independent.
-#
-include $(UTSBASE)/Makefile.uts
-
-#
-# The following must be defined for all implementations:
-#
-MODSTUBS = $(UTSBASE)/intel/ia32/ml/modstubs.s
-
-#
-# Define supported builds
-#
-DEF_BUILDS = $(DEF_BUILDS64) $(DEF_BUILDS32)
-ALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32)
-
-#
-# x86 or amd64 inline templates
-#
-INLINES_32 = $(UTSBASE)/intel/ia32/ml/ia32.il
-INLINES_64 = $(UTSBASE)/intel/amd64/ml/amd64.il
-INLINES += $(INLINES_$(CLASS))
-
-#
-# kernel-specific optimizations; override default in Makefile.master
-#
-
-CFLAGS_XARCH_32 = $(i386_CFLAGS)
-CFLAGS_XARCH_64 = $(amd64_CFLAGS)
-CFLAGS_XARCH = $(CFLAGS_XARCH_$(CLASS))
-
-COPTFLAG_32 = $(COPTFLAG)
-COPTFLAG_64 = $(COPTFLAG64)
-COPTIMIZE = $(COPTFLAG_$(CLASS))
-
-CFLAGS = $(CFLAGS_XARCH)
-CFLAGS += $(COPTIMIZE)
-CFLAGS += $(INLINES) -D_ASM_INLINES
-CFLAGS += $(CCMODE)
-CFLAGS += $(SPACEFLAG)
-CFLAGS += $(CCUNBOUND)
-CFLAGS += $(CFLAGS_uts)
-
-ASFLAGS_XARCH_32 = $(i386_ASFLAGS)
-ASFLAGS_XARCH_64 = $(amd64_ASFLAGS)
-ASFLAGS_XARCH = $(ASFLAGS_XARCH_$(CLASS))
-
-ASFLAGS += $(ASFLAGS_XARCH)
-
-#
-# Define the base directory for installation.
-#
-BASE_INS_DIR = $(ROOT)
-
-#
-#
-# Simulator flag
-#
-i386_SIMULATOR = -D_SIMULATOR_SUPPORT
-amd64_SIMULATOR = -D_SIMULATOR_SUPPORT
-
-SIMULATOR = $($(MACH)_SIMULATOR)
-
-
-#
-# Debugging level
-#
-# Special knowledge of which special debugging options affect which
-# file is used to optimize the build if these flags are changed.
-#
-DEBUG_DEFS_OBJ32 =
-DEBUG_DEFS_DBG32 = -DDEBUG
-DEBUG_DEFS_DBG32 += $(SIMULATOR)
-DEBUG_DEFS_OBJ64 =
-DEBUG_DEFS_DBG64 = -DDEBUG
-DEBUG_DEFS_DBG64 += $(SIMULATOR)
-DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
-
-DEBUG_COND_OBJ32 :sh = echo \\043
-DEBUG_COND_DBG32 =
-DEBUG_COND_OBJ64 :sh = echo \\043
-DEBUG_COND_DBG64 =
-IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
-
-$(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
-$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
-
-#
-# This rather strange collection of definitions ensures that lint sees
-# 'struct cpu' containing a fully declared embedded 'struct machcpu'
-#
-# There's something deeply dissatisfying about this.
-#
-LINTMACHFLAGS = -D_MACHDEP -I../../i86pc
-$(LINTS_DIR)/kcpc.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/kdi.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/msacct.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/thread.ln := LINTFLAGS += $(LINTMACHFLAGS)
-
-#
-# Build `options'. These are entirely historical and the need for these
-# is completely removed by the module technology.
-#
-OPTION_DEFS = -DC2_AUDIT
-
-#
-# Collect the preprocessor definitions to be associated with *all*
-# files.
-#
-ALL_DEFS = $(DEBUG_DEFS) $(OPTION_DEFS)
-
-#
-# ----- TRANSITIONAL SECTION --------------------------------------------------
-#
-
-#
-# Not everything which *should* be a module is a module yet. The
-# following is a list of such objects which are currently part of
-# the base kernel but should soon become kmods.
-#
-NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(MOD_OBJS)
-
-#
-# ----- END OF TRANSITIONAL SECTION -------------------------------------------
-
-#
-# The kernels modules which are "implementation architecture"
-# specific for this machine are enumerated below. Note that most
-# of these modules must exist (in one form or another) for each
-# architecture.
-#
-# Common Drivers (usually pseudo drivers) (/kernel/drv)
-# DRV_KMODS are built both 32-bit and 64-bit
-# DRV_KMODS_32 are built only 32-bit
-# DRV_KMODS_64 are built only 64-bit
-#
-DRV_KMODS += aac
-DRV_KMODS += aggr
-DRV_KMODS += amr
-DRV_KMODS += arp
-DRV_KMODS += asy
-DRV_KMODS += bl
-DRV_KMODS += bge
-DRV_KMODS += bofi
-DRV_KMODS += clone
-DRV_KMODS += cmdk
-DRV_KMODS += cn
-DRV_KMODS += conskbd
-DRV_KMODS += consms
-DRV_KMODS += cpuid
-DRV_KMODS += crypto
-DRV_KMODS += cryptoadm
-DRV_KMODS += dca
-DRV_KMODS += devinfo
-DRV_KMODS += dld
-DRV_KMODS += dump
-DRV_KMODS += ecpp
-DRV_KMODS += fssnap
-DRV_KMODS += glm
-DRV_KMODS += i8042
-DRV_KMODS += icmp
-DRV_KMODS += icmp6
-DRV_KMODS += ip
-DRV_KMODS += ip6
-DRV_KMODS += ipf
-DRV_KMODS += ippctl
-DRV_KMODS += ipsecah
-DRV_KMODS += ipsecesp
-DRV_KMODS += iwscn
-DRV_KMODS += keysock
-DRV_KMODS += kstat
-DRV_KMODS += ksyms
-DRV_KMODS += kmdb
-DRV_KMODS += llc1
-DRV_KMODS += llc2
-DRV_KMODS += lofi
-DRV_KMODS += log
-DRV_KMODS += logindmux
-DRV_KMODS += kssl
-DRV_KMODS += mm
-DRV_KMODS += mouse8042
-DRV_KMODS += mpt
-DRV_KMODS += nca
-DRV_KMODS += openeepr
-DRV_KMODS += pfil
-DRV_KMODS += pm
-DRV_KMODS += poll
-DRV_KMODS += pool
-DRV_KMODS += pseudo
-DRV_KMODS += ptc
-DRV_KMODS += ptm
-DRV_KMODS += pts
-DRV_KMODS += ptsl
-DRV_KMODS += ramdisk
-DRV_KMODS += random
-DRV_KMODS += rpcib
-DRV_KMODS += rsm
-DRV_KMODS += rts
-DRV_KMODS += sad
-DRV_KMODS += sctp
-DRV_KMODS += sctp6
-DRV_KMODS += sd
-DRV_KMODS += sgen
-DRV_KMODS += smbios
-DRV_KMODS += spdsock
-DRV_KMODS += sppp
-DRV_KMODS += sppptun
-DRV_KMODS += st
-DRV_KMODS += sy
-DRV_KMODS += sysevent
-DRV_KMODS += sysmsg
-DRV_KMODS += tcp
-DRV_KMODS += tcp6
-DRV_KMODS += tl
-DRV_KMODS += tnf
-DRV_KMODS += udp
-DRV_KMODS += udp6
-DRV_KMODS += vgatext
-DRV_KMODS += vni
-DRV_KMODS += vol
-DRV_KMODS += wc
-DRV_KMODS += winlock
-DRV_KMODS += xge
-DRV_KMODS += chxge
-DRV_KMODS += zcons
-DRV_KMODS += ath
-
-#
-# Common code drivers
-#
-DRV_KMODS += ixgb
-DRV_KMODS += rge
-
-#
-# DTrace and DTrace Providers
-#
-DRV_KMODS += dtrace
-DRV_KMODS += fbt
-DRV_KMODS += lockstat
-DRV_KMODS += profile
-DRV_KMODS += sdt
-DRV_KMODS += systrace
-DRV_KMODS += fasttrap
-
-#
-# I/O framework test drivers
-#
-DRV_KMODS += pshot
-DRV_KMODS += gen_drv
-DRV_KMODS += tvhci tphci tclient
-DRV_KMODS += emul64
-
-#
-# Machine Specific Driver Modules (/kernel/drv):
-#
-DRV_KMODS += pci_pci
-DRV_KMODS += options
-DRV_KMODS += scsi_vhci
-
-#
-# PCMCIA specific module(s)
-#
-DRV_KMODS += pem pcs
-DRV_KMODS += pcata pcelx pcmem pcram pcser
-
-#
-# I2O specific module(s)
-#
-DRV_KMODS_32 += pci_to_i2o i2o_bs i2o_scsi
-
-#
-# SCSI Enclosure Services driver
-#
-DRV_KMODS += ses
-
-#
-# USB specific modules
-#
-DRV_KMODS += hid
-DRV_KMODS += hubd
-DRV_KMODS += uhci
-DRV_KMODS += ehci
-DRV_KMODS += ohci
-DRV_KMODS += usb_mid
-DRV_KMODS += scsa2usb
-DRV_KMODS += usbprn
-DRV_KMODS += ugen
-DRV_KMODS += usbser
-DRV_KMODS += usbser_edge
-DRV_KMODS += usbsksp
-DRV_KMODS += usbsprl
-DRV_KMODS += usb_ac
-DRV_KMODS += usb_as
-DRV_KMODS += usbskel
-
-#
-# 1394 modules
-#
-MISC_KMODS += s1394 sbp2
-DRV_KMODS += hci1394 scsa1394
-DRV_KMODS += av1394
-DRV_KMODS += dcam1394
-
-#
-# InfiniBand pseudo drivers
-#
-DRV_KMODS += ib ibd
-
-#
-# LVM modules
-#
-DRV_KMODS += md
-MISC_KMODS += md_stripe md_hotspares md_mirror md_raid md_trans md_notify
-MISC_KMODS += md_sp
-
-#
-# Exec Class Modules (/kernel/exec):
-#
-EXEC_KMODS += elfexec intpexec javaexec
-
-#
-# Scheduling Class Modules (/kernel/sched):
-#
-SCHED_KMODS += IA RT TS RT_DPTBL TS_DPTBL FSS FX FX_DPTBL
-
-#
-# File System Modules (/kernel/fs):
-#
-FS_KMODS += autofs cachefs ctfs devfs fdfs fifofs hsfs lofs
-FS_KMODS += mntfs namefs nfs objfs zfs
-FS_KMODS += pcfs procfs sockfs specfs tmpfs udfs ufs xmemfs
-
-#
-# Streams Modules (/kernel/strmod):
-#
-STRMOD_KMODS += 6to4tun atun bufmod connld dedump ldterm pckt pfmod pipemod
-STRMOD_KMODS += ptem redirmod rpcmod rlmod telmod timod
-STRMOD_KMODS += spppasyn spppcomp
-STRMOD_KMODS += tirdwr ttcompat tun
-STRMOD_KMODS += usbkbm
-STRMOD_KMODS += usbms
-STRMOD_KMODS += usb_ah
-STRMOD_KMODS += drcompat
-STRMOD_KMODS += nattymod
-STRMOD_KMODS += cryptmod
-
-#
-# 'System' Modules (/kernel/sys):
-#
-SYS_KMODS += c2audit
-SYS_KMODS += doorfs
-SYS_KMODS += exacctsys
-SYS_KMODS += inst_sync
-SYS_KMODS += kaio
-SYS_KMODS += msgsys
-SYS_KMODS += pipe
-SYS_KMODS += portfs
-SYS_KMODS += pset
-SYS_KMODS += semsys
-SYS_KMODS += shmsys
-SYS_KMODS += sysacct
-SYS_KMODS += acctctl
-
-#
-# 'Misc' Modules (/kernel/misc)
-# MISC_KMODS are built both 32-bit and 64-bit
-# MISC_KMODS_32 are built only 32-bit
-# MISC_KMODS_64 are built only 64-bit
-#
-MISC_KMODS += amsrc1 amsrc2
-MISC_KMODS += audiosup
-MISC_KMODS += busra
-MISC_KMODS += cmlb
-MISC_KMODS += consconfig
-MISC_KMODS += ctf
-MISC_KMODS += dadk
-MISC_KMODS += diaudio
-MISC_KMODS += dls
-MISC_KMODS += fssnap_if
-MISC_KMODS += gda
-MISC_KMODS += gld
-MISC_KMODS += hidparser
-MISC_KMODS += hpcsvc
-MISC_KMODS_32 += i2o_msg
-MISC_KMODS += ibcm
-MISC_KMODS += ibdm
-MISC_KMODS += ibmf
-MISC_KMODS += ibtl
-MISC_KMODS += ipc
-MISC_KMODS += kbtrans
-MISC_KMODS += kcf
-MISC_KMODS += kgssapi
-MISC_KMODS += klmmod klmops
-MISC_KMODS += kmech_dummy
-MISC_KMODS += kmech_krb5
-MISC_KMODS += krtld
-MISC_KMODS += mac
-MISC_KMODS += mixer
-MISC_KMODS += nfs_dlboot
-MISC_KMODS += nfssrv
-MISC_KMODS += pcicfg
-MISC_KMODS += pcihp
-MISC_KMODS += pcmcia
-MISC_KMODS += phx
-MISC_KMODS += rpcsec
-MISC_KMODS += rpcsec_gss
-MISC_KMODS += rsmops
-MISC_KMODS += scsi
-MISC_KMODS += strategy
-MISC_KMODS += strplumb
-MISC_KMODS += sysinit
-MISC_KMODS += terminal-emulator
-MISC_KMODS += tlimod
-MISC_KMODS += usba usba10
-MISC_KMODS += zmod
-
-#
-# Software Cryptographic Providers (/kernel/crypto):
-#
-CRYPTO_KMODS += aes
-CRYPTO_KMODS += arcfour
-CRYPTO_KMODS += blowfish
-CRYPTO_KMODS += des
-CRYPTO_KMODS += md5
-CRYPTO_KMODS += rsa
-CRYPTO_KMODS += sha1
-CRYPTO_KMODS += sha2
-CRYPTO_KMODS += swrand
-
-#
-# IP Policy Modules (/kernel/ipp)
-#
-IPP_KMODS += dlcosmk
-IPP_KMODS += flowacct
-IPP_KMODS += ipgpc
-IPP_KMODS += dscpmk
-IPP_KMODS += tokenmt
-IPP_KMODS += tswtclmt
-
-#
-# 'Dacf' modules (/kernel/dacf)
-#
-DACF_KMODS += consconfig_dacf
-
-#
-# generic-unix module (/kernel/genunix):
-#
-GENUNIX_KMODS += genunix
-
-#
-# SVVS Testing Modules (/kernel/strmod):
-#
-# These are streams and driver modules which are not to be
-# delivered with a released system. However, during development
-# it is convenient to build and install the SVVS kernel modules.
-#
-SVVS_KMODS += lmodb lmode lmodr lmodt lo tidg tivc tmux
-
-SVVS += svvs
-
-#
-# Modules eXcluded from the product:
-#
-XMODS += e1000g adpu320 nge lsimega
-XMODS += tavor daplt
-
-
-#
-# 'Dacf' Modules (/kernel/dacf):
-#
-DACF_KMODS += usb_ac_dacf
-
-#
-# Performance Counter BackEnd modules (/usr/kernel/pcbe)
-#
-PCBE_KMODS += p123_pcbe p4_pcbe opteron_pcbe
+include $(UTSBASE)/intel/Makefile.intel.shared
diff --git a/usr/src/uts/intel/Makefile.intel.shared b/usr/src/uts/intel/Makefile.intel.shared
new file mode 100644
index 0000000000..a288e0be93
--- /dev/null
+++ b/usr/src/uts/intel/Makefile.intel.shared
@@ -0,0 +1,566 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+#
+# This makefile contains the common definitions for all intel
+# implementation architecture independent modules.
+
+#
+# Machine type (implementation architecture):
+#
+PLATFORM = i86pc
+
+#
+# Everybody needs to know how to build modstubs.o and to locate unix.o.
+# Note that unix.o must currently be selected from among the possible
+# "implementation architectures". Note further, that unix.o is only
+# used as an optional error check for undefines so (theoretically)
+# any "implementation architectures" could be used. We choose i86pc
+# because it is the reference port.
+#
+UNIX_DIR = $(UTSBASE)/i86pc/unix
+GENLIB_DIR = $(UTSBASE)/intel/genunix
+IPDRV_DIR = $(UTSBASE)/intel/ip
+MODSTUBS_DIR = $(UNIX_DIR)
+DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
+LINTS_DIR = $(OBJS_DIR)
+LINT_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)
+
+UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
+GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
+MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
+LINT_LIB = $(UTSBASE)/i86pc/lint-libs/$(OBJS_DIR)/llib-lunix.ln
+GEN_LINT_LIB = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
+
+#
+# Include the makefiles which define build rule templates, the
+# collection of files per module, and a few specific flags. Note
+# that order is significant, just as with an include path. The
+# first build rule template which matches the files name will be
+# used. By including these in order from most machine dependent
+# to most machine independent, we allow a machine dependent file
+# to be used in preference over a machine independent version
+# (Such as a machine specific optimization, which preserves the
+# interfaces.)
+#
+include $(UTSTREE)/intel/Makefile.files
+include $(UTSTREE)/common/Makefile.files
+
+#
+# Include machine independent rules. Note that this does not imply
+# that the resulting module from rules in Makefile.uts is machine
+# independent. Only that the build rules are machine independent.
+#
+include $(UTSBASE)/Makefile.uts
+
+#
+# The following must be defined for all implementations:
+#
+MODSTUBS = $(UTSBASE)/intel/ia32/ml/modstubs.s
+
+#
+# Define supported builds
+#
+DEF_BUILDS = $(DEF_BUILDS64) $(DEF_BUILDS32)
+ALL_BUILDS = $(ALL_BUILDS64) $(ALL_BUILDS32)
+
+#
+# x86 or amd64 inline templates
+#
+INLINES_32 = $(UTSBASE)/intel/ia32/ml/ia32.il
+INLINES_64 = $(UTSBASE)/intel/amd64/ml/amd64.il
+INLINES += $(INLINES_$(CLASS))
+
+#
+# kernel-specific optimizations; override default in Makefile.master
+#
+
+CFLAGS_XARCH_32 = $(i386_CFLAGS)
+CFLAGS_XARCH_64 = $(amd64_CFLAGS)
+CFLAGS_XARCH = $(CFLAGS_XARCH_$(CLASS))
+
+COPTFLAG_32 = $(COPTFLAG)
+COPTFLAG_64 = $(COPTFLAG64)
+COPTIMIZE = $(COPTFLAG_$(CLASS))
+
+CFLAGS = $(CFLAGS_XARCH)
+CFLAGS += $(COPTIMIZE)
+CFLAGS += $(INLINES) -D_ASM_INLINES
+CFLAGS += $(CCMODE)
+CFLAGS += $(SPACEFLAG)
+CFLAGS += $(CCUNBOUND)
+CFLAGS += $(CFLAGS_uts)
+
+ASFLAGS_XARCH_32 = $(i386_ASFLAGS)
+ASFLAGS_XARCH_64 = $(amd64_ASFLAGS)
+ASFLAGS_XARCH = $(ASFLAGS_XARCH_$(CLASS))
+
+ASFLAGS += $(ASFLAGS_XARCH)
+
+#
+# Define the base directory for installation.
+#
+BASE_INS_DIR = $(ROOT)
+
+#
+#
+# Simulator flag
+#
+i386_SIMULATOR = -D_SIMULATOR_SUPPORT
+amd64_SIMULATOR = -D_SIMULATOR_SUPPORT
+
+SIMULATOR = $($(MACH)_SIMULATOR)
+
+
+#
+# Debugging level
+#
+# Special knowledge of which special debugging options affect which
+# file is used to optimize the build if these flags are changed.
+#
+DEBUG_DEFS_OBJ32 =
+DEBUG_DEFS_DBG32 = -DDEBUG
+DEBUG_DEFS_DBG32 += $(SIMULATOR)
+DEBUG_DEFS_OBJ64 =
+DEBUG_DEFS_DBG64 = -DDEBUG
+DEBUG_DEFS_DBG64 += $(SIMULATOR)
+DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
+
+DEBUG_COND_OBJ32 :sh = echo \\043
+DEBUG_COND_DBG32 =
+DEBUG_COND_OBJ64 :sh = echo \\043
+DEBUG_COND_DBG64 =
+IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
+
+$(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
+$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
+
+#
+# This rather strange collection of definitions ensures that lint sees
+# 'struct cpu' containing a fully declared embedded 'struct machcpu'
+#
+# There's something deeply dissatisfying about this.
+#
+LINTMACHFLAGS = -D_MACHDEP -I../../i86pc
+$(LINTS_DIR)/kcpc.ln := LINTFLAGS += $(LINTMACHFLAGS)
+$(LINTS_DIR)/kdi.ln := LINTFLAGS += $(LINTMACHFLAGS)
+$(LINTS_DIR)/msacct.ln := LINTFLAGS += $(LINTMACHFLAGS)
+$(LINTS_DIR)/thread.ln := LINTFLAGS += $(LINTMACHFLAGS)
+
+#
+# Build `options'. These are entirely historical and the need for these
+# is completely removed by the module technology.
+#
+OPTION_DEFS = -DC2_AUDIT
+
+#
+# Collect the preprocessor definitions to be associated with *all*
+# files.
+#
+ALL_DEFS = $(DEBUG_DEFS) $(OPTION_DEFS)
+
+#
+# ----- TRANSITIONAL SECTION --------------------------------------------------
+#
+
+#
+# Not everything which *should* be a module is a module yet. The
+# following is a list of such objects which are currently part of
+# the base kernel but should soon become kmods.
+#
+NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(MOD_OBJS)
+
+#
+# ----- END OF TRANSITIONAL SECTION -------------------------------------------
+
+#
+# The kernels modules which are "implementation architecture"
+# specific for this machine are enumerated below. Note that most
+# of these modules must exist (in one form or another) for each
+# architecture.
+#
+# Common Drivers (usually pseudo drivers) (/kernel/drv)
+# DRV_KMODS are built both 32-bit and 64-bit
+# DRV_KMODS_32 are built only 32-bit
+# DRV_KMODS_64 are built only 64-bit
+#
+DRV_KMODS += aac
+DRV_KMODS += aggr
+DRV_KMODS += amr
+DRV_KMODS += arp
+DRV_KMODS += asy
+DRV_KMODS += ath
+DRV_KMODS += bl
+DRV_KMODS += bge
+DRV_KMODS += bofi
+DRV_KMODS += clone
+DRV_KMODS += cmdk
+DRV_KMODS += cn
+DRV_KMODS += conskbd
+DRV_KMODS += consms
+DRV_KMODS += cpuid
+DRV_KMODS += crypto
+DRV_KMODS += cryptoadm
+DRV_KMODS += dca
+DRV_KMODS += devinfo
+DRV_KMODS += dld
+DRV_KMODS += dump
+DRV_KMODS += ecpp
+DRV_KMODS += fssnap
+DRV_KMODS += i8042
+DRV_KMODS += icmp
+DRV_KMODS += icmp6
+DRV_KMODS += ip
+DRV_KMODS += ip6
+DRV_KMODS += ipf
+DRV_KMODS += ippctl
+DRV_KMODS += ipsecah
+DRV_KMODS += ipsecesp
+DRV_KMODS += iwscn
+DRV_KMODS += keysock
+DRV_KMODS += kssl
+DRV_KMODS += kstat
+DRV_KMODS += ksyms
+DRV_KMODS += kmdb
+DRV_KMODS += llc1
+DRV_KMODS += lofi
+DRV_KMODS += log
+DRV_KMODS += logindmux
+DRV_KMODS += mm
+DRV_KMODS += mouse8042
+DRV_KMODS += nca
+DRV_KMODS += openeepr
+DRV_KMODS += pfil
+DRV_KMODS += pm
+DRV_KMODS += poll
+DRV_KMODS += pool
+DRV_KMODS += pseudo
+DRV_KMODS += ptc
+DRV_KMODS += ptm
+DRV_KMODS += pts
+DRV_KMODS += ptsl
+DRV_KMODS += ramdisk
+DRV_KMODS += random
+DRV_KMODS += rpcib
+DRV_KMODS += rsm
+DRV_KMODS += rts
+DRV_KMODS += sad
+DRV_KMODS += sctp
+DRV_KMODS += sctp6
+DRV_KMODS += sd
+DRV_KMODS += spdsock
+DRV_KMODS += smbios
+DRV_KMODS += sppp
+DRV_KMODS += sppptun
+DRV_KMODS += st
+DRV_KMODS += sy
+DRV_KMODS += sysevent
+DRV_KMODS += sysmsg
+DRV_KMODS += tcp
+DRV_KMODS += tcp6
+DRV_KMODS += tl
+DRV_KMODS += tnf
+DRV_KMODS += udp
+DRV_KMODS += udp6
+DRV_KMODS += vgatext
+DRV_KMODS += vni
+DRV_KMODS += vol
+DRV_KMODS += wc
+DRV_KMODS += winlock
+DRV_KMODS += zcons
+
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += chxge
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += glm
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += llc2
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += mpt
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += sgen
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += xge
+
+#
+# Common code drivers
+#
+
+DRV_KMODS += rge
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += ixgb
+
+#
+# DTrace and DTrace Providers
+#
+DRV_KMODS += dtrace
+DRV_KMODS += fbt
+DRV_KMODS += lockstat
+DRV_KMODS += profile
+DRV_KMODS += sdt
+DRV_KMODS += systrace
+DRV_KMODS += fasttrap
+
+#
+# I/O framework test drivers
+#
+DRV_KMODS += pshot
+DRV_KMODS += gen_drv
+DRV_KMODS += tvhci tphci tclient
+DRV_KMODS += emul64
+
+#
+# Machine Specific Driver Modules (/kernel/drv):
+#
+DRV_KMODS += pci_pci
+DRV_KMODS += options
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += scsi_vhci
+
+#
+# PCMCIA specific module(s)
+#
+DRV_KMODS += pcs
+DRV_KMODS += pcata pcmem pcram
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += pem
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcelx
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcser
+
+#
+# I2O specific module(s)
+#
+DRV_KMODS_32 += pci_to_i2o i2o_bs i2o_scsi
+
+#
+# SCSI Enclosure Services driver
+#
+DRV_KMODS += ses
+
+#
+# USB specific modules
+#
+DRV_KMODS += hid
+DRV_KMODS += hubd
+DRV_KMODS += uhci
+DRV_KMODS += ehci
+DRV_KMODS += ohci
+DRV_KMODS += usb_mid
+DRV_KMODS += scsa2usb
+DRV_KMODS += usbprn
+DRV_KMODS += ugen
+DRV_KMODS += usbser
+DRV_KMODS += usbsksp
+DRV_KMODS += usbsprl
+DRV_KMODS += usb_ac
+DRV_KMODS += usb_as
+DRV_KMODS += usbskel
+
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += usbser_edge
+
+#
+# 1394 modules
+#
+MISC_KMODS += s1394 sbp2
+DRV_KMODS += hci1394 scsa1394
+DRV_KMODS += av1394
+DRV_KMODS += dcam1394
+
+#
+# InfiniBand pseudo drivers
+#
+DRV_KMODS += ib ibd
+
+#
+# LVM modules
+#
+DRV_KMODS += md
+MISC_KMODS += md_stripe md_hotspares md_mirror md_raid md_trans md_notify
+MISC_KMODS += md_sp
+
+#
+# Exec Class Modules (/kernel/exec):
+#
+EXEC_KMODS += elfexec intpexec javaexec
+
+#
+# Scheduling Class Modules (/kernel/sched):
+#
+SCHED_KMODS += IA RT TS RT_DPTBL TS_DPTBL FSS FX FX_DPTBL
+
+#
+# File System Modules (/kernel/fs):
+#
+FS_KMODS += autofs cachefs ctfs devfs fdfs fifofs hsfs lofs
+FS_KMODS += mntfs namefs nfs objfs zfs
+FS_KMODS += pcfs procfs sockfs specfs tmpfs udfs ufs xmemfs
+
+#
+# Streams Modules (/kernel/strmod):
+#
+STRMOD_KMODS += 6to4tun atun bufmod connld dedump ldterm pckt pfmod pipemod
+STRMOD_KMODS += ptem redirmod rpcmod rlmod telmod timod
+STRMOD_KMODS += spppasyn spppcomp
+STRMOD_KMODS += tirdwr ttcompat tun
+STRMOD_KMODS += usbkbm
+STRMOD_KMODS += usbms
+STRMOD_KMODS += usb_ah
+STRMOD_KMODS += drcompat
+STRMOD_KMODS += nattymod
+STRMOD_KMODS += cryptmod
+
+#
+# 'System' Modules (/kernel/sys):
+#
+SYS_KMODS += c2audit
+SYS_KMODS += doorfs
+SYS_KMODS += exacctsys
+SYS_KMODS += inst_sync
+SYS_KMODS += kaio
+SYS_KMODS += msgsys
+SYS_KMODS += pipe
+SYS_KMODS += portfs
+SYS_KMODS += pset
+SYS_KMODS += semsys
+SYS_KMODS += shmsys
+SYS_KMODS += sysacct
+SYS_KMODS += acctctl
+
+#
+# 'Misc' Modules (/kernel/misc)
+# MISC_KMODS are built both 32-bit and 64-bit
+# MISC_KMODS_32 are built only 32-bit
+# MISC_KMODS_64 are built only 64-bit
+#
+MISC_KMODS += amsrc2
+MISC_KMODS += audiosup
+MISC_KMODS += busra
+MISC_KMODS += cmlb
+MISC_KMODS += consconfig
+MISC_KMODS += ctf
+MISC_KMODS += dadk
+MISC_KMODS += diaudio
+MISC_KMODS += dls
+MISC_KMODS += fssnap_if
+MISC_KMODS += gda
+MISC_KMODS += gld
+MISC_KMODS += hidparser
+MISC_KMODS += hpcsvc
+MISC_KMODS_32 += i2o_msg
+MISC_KMODS += ibcm
+MISC_KMODS += ibdm
+MISC_KMODS += ibmf
+MISC_KMODS += ibtl
+MISC_KMODS += ipc
+MISC_KMODS += kbtrans
+MISC_KMODS += kcf
+MISC_KMODS += kgssapi
+MISC_KMODS += kmech_dummy
+MISC_KMODS += kmech_krb5
+MISC_KMODS += krtld
+MISC_KMODS += mac
+MISC_KMODS += mixer
+MISC_KMODS += nfs_dlboot
+MISC_KMODS += nfssrv
+MISC_KMODS += pcicfg
+MISC_KMODS += pcihp
+MISC_KMODS += pcmcia
+MISC_KMODS += rpcsec
+MISC_KMODS += rpcsec_gss
+MISC_KMODS += rsmops
+MISC_KMODS += scsi
+MISC_KMODS += strategy
+MISC_KMODS += strplumb
+MISC_KMODS += sysinit
+MISC_KMODS += terminal-emulator
+MISC_KMODS += tlimod
+MISC_KMODS += usba usba10
+MISC_KMODS += zmod
+
+$(CLOSED_BUILD)CLOSED_MISC_KMODS += amsrc1
+$(CLOSED_BUILD)CLOSED_MISC_KMODS += klmmod klmops
+$(CLOSED_BUILD)CLOSED_MISC_KMODS += phx
+
+#
+# Software Cryptographic Providers (/kernel/crypto):
+#
+# Don't build some of these for OpenSolaris, since they will be
+# replaced by binaries that are signed by Sun RE.
+#
+$(CLOSED_BUILD)CRYPTO_KMODS += aes
+$(CLOSED_BUILD)CRYPTO_KMODS += arcfour
+$(CLOSED_BUILD)CRYPTO_KMODS += blowfish
+$(CLOSED_BUILD)CRYPTO_KMODS += des
+CRYPTO_KMODS += md5
+CRYPTO_KMODS += rsa
+CRYPTO_KMODS += sha1
+CRYPTO_KMODS += sha2
+CRYPTO_KMODS += swrand
+
+#
+# IP Policy Modules (/kernel/ipp)
+#
+IPP_KMODS += dlcosmk
+IPP_KMODS += flowacct
+IPP_KMODS += ipgpc
+IPP_KMODS += dscpmk
+IPP_KMODS += tokenmt
+IPP_KMODS += tswtclmt
+
+#
+# 'Dacf' modules (/kernel/dacf)
+#
+DACF_KMODS += consconfig_dacf
+
+#
+# generic-unix module (/kernel/genunix):
+#
+GENUNIX_KMODS += genunix
+
+#
+# SVVS Testing Modules (/kernel/strmod):
+#
+# These are streams and driver modules which are not to be
+# delivered with a released system. However, during development
+# it is convenient to build and install the SVVS kernel modules.
+#
+SVVS_KMODS += lmodb lmode lmodr lmodt lo tidg tivc tmux
+
+SVVS += svvs
+
+#
+# Modules eXcluded from the product:
+#
+$(CLOSED_BUILD)CLOSED_XMODS = \
+ adpu320 \
+ daplt \
+ e1000g \
+ lsimega \
+ nge \
+ tavor
+
+
+#
+# 'Dacf' Modules (/kernel/dacf):
+#
+DACF_KMODS += usb_ac_dacf
+
+#
+# Performance Counter BackEnd modules (/usr/kernel/pcbe)
+#
+PCBE_KMODS += p123_pcbe p4_pcbe opteron_pcbe
diff --git a/usr/src/uts/intel/Makefile.rules b/usr/src/uts/intel/Makefile.rules
index 35e852ab35..8ea1d6a4b1 100644
--- a/usr/src/uts/intel/Makefile.rules
+++ b/usr/src/uts/intel/Makefile.rules
@@ -89,31 +89,10 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/amr/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/lsimega/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/scsi/targets/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(DRVDIR)/%.c $(ADPU_HEADERS) $(DRVDIR)/adpu320.h \
- $(DRVDIR)/release.h
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(CHIMDIR)/hwm/%.c $(ADPU_HEADERS)
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(CHIMDIR)/rsm/%.c $(ADPU_HEADERS)
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(CHIMDIR)/xlm/%.c $(ADPU_HEADERS)
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/vgatext/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -184,9 +163,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/aac/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/amr/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/lsimega/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/scsi/targets/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
diff --git a/usr/src/uts/intel/Makefile.targ b/usr/src/uts/intel/Makefile.targ
index 3fae04c0a0..36c3ab4216 100644
--- a/usr/src/uts/intel/Makefile.targ
+++ b/usr/src/uts/intel/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,26 +18,12 @@
#
# CDDL HEADER END
#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
-# uts/intel/Makefile.targ
-#
-# Copyright (c) 1991-1999 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# This Makefile defines the set of all required, target containing
-# included Makefiles for the intel "implementation architecture".
+# ident "%Z%%M% %I% %E% SMI"
#
-#
-# Targets for all implementations:
-#
-include $(UTSBASE)/Makefile.targ
+UTSTREE=$(UTSBASE)
-#
-# Target set for intel (order is not important, as it is with the
-# isomorphic Makefile.files set).
-#
-include $(UTSBASE)/intel/Makefile.rules
-include $(UTSBASE)/common/Makefile.rules
+include $(UTSBASE)/intel/Makefile.targ.shared
diff --git a/usr/src/uts/intel/Makefile.targ.shared b/usr/src/uts/intel/Makefile.targ.shared
new file mode 100644
index 0000000000..8c63e6e95f
--- /dev/null
+++ b/usr/src/uts/intel/Makefile.targ.shared
@@ -0,0 +1,44 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/intel/Makefile.targ
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# This Makefile defines the set of all required, target containing
+# included Makefiles for the intel "implementation architecture".
+#
+
+#
+# Targets for all implementations:
+#
+include $(UTSBASE)/Makefile.targ
+
+#
+# Target set for intel (order is not important, as it is with the
+# isomorphic Makefile.files set).
+#
+include $(UTSTREE)/intel/Makefile.rules
+include $(UTSTREE)/common/Makefile.rules
diff --git a/usr/src/uts/intel/kmech_krb5/inc.flg b/usr/src/uts/intel/kmech_krb5/inc.flg
index 7e36f9c9bf..15653f33a3 100644
--- a/usr/src/uts/intel/kmech_krb5/inc.flg
+++ b/usr/src/uts/intel/kmech_krb5/inc.flg
@@ -23,18 +23,21 @@
#
# ident "%Z%%M% %I% %E% SMI"
#
-# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
find_files "s.*.h" usr/src/uts/common/sys
+find_files "s.*.h" usr/closed/uts/common/sys
find_files "s.*.h" usr/src/uts/common/rpc
find_files "s.*.h" usr/src/uts/common/gssapi
find_files "s.*.h" usr/src/uts/common/vm
find_files "s.*.h" usr/src/uts/common/netinet
find_files "s.*.h" usr/src/uts/common/net
find_files "s.*.h" usr/src/uts/intel/sys
+find_files "s.*.h" usr/closed/uts/intel/sys
find_files "s.*.h" usr/src/uts/intel/ia32/sys
find_files "s.*.h" usr/src/lib/krb5/kadm5
find_files "s.*" usr/src/uts/intel/ia32/ml
find_files "s.*" usr/src/uts/common/gssapi/mechs/krb5
find_files "s.*" usr/src/lib/gss_mechs/mech_krb5
+find_files "s.*" usr/closed/lib/gss_mechs/mech_krb5
diff --git a/usr/src/uts/intel/kmech_krb5/req.flg b/usr/src/uts/intel/kmech_krb5/req.flg
index 86833d5366..b1d5e2df03 100644
--- a/usr/src/uts/intel/kmech_krb5/req.flg
+++ b/usr/src/uts/intel/kmech_krb5/req.flg
@@ -23,13 +23,21 @@
#
# ident "%Z%%M% %I% %E% SMI"
#
-# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
echo_file usr/src/uts/intel/Makefile
echo_file usr/src/uts/intel/Makefile.files
+echo_file usr/closed/uts/intel/Makefile.files
echo_file usr/src/uts/intel/Makefile.intel
+echo_file usr/src/uts/intel/Makefile.intel.shared
+echo_file usr/closed/uts/intel/Makefile.intel
echo_file usr/src/uts/intel/Makefile.rules
+echo_file usr/closed/uts/intel/Makefile.rules
echo_file usr/src/uts/intel/Makefile.targ
+echo_file usr/src/uts/intel/Makefile.targ.shared
+echo_file usr/closed/uts/intel/Makefile.targ
echo_file usr/src/uts/common/Makefile.files
+echo_file usr/closed/uts/common/Makefile.files
echo_file usr/src/uts/common/Makefile.rules
+echo_file usr/closed/uts/common/Makefile.rules
diff --git a/usr/src/uts/intel/sys/Makefile b/usr/src/uts/intel/sys/Makefile
index 127a8c24b4..31cb0ddb03 100644
--- a/usr/src/uts/intel/sys/Makefile
+++ b/usr/src/uts/intel/sys/Makefile
@@ -73,7 +73,6 @@ HDRS = \
pte.h \
reg.h \
regset.h \
- sbpro.h \
segment.h \
segments.h \
spl.h \
@@ -90,6 +89,9 @@ HDRS = \
vmparam.h \
x86_archext.h
+CLOSEDHDRS = \
+ sbpro.h
+
SUBHDRS = \
dktp/cdtypes.h \
dktp/mscsi.h \
@@ -113,17 +115,25 @@ ROOTFSDIR= $(ROOTDIR)/fs
ROOTDIRS= $(ROOTDIR) $(ROOTFSDIR)
ROOTHDRS= $(HDRS:%=$(ROOTDIR)/%) $(SUBHDRS:%=$(ROOTDIR)/%)
+$(CLOSED_BUILD)ROOTHDRS += $(CLOSEDHDRS:%=$(ROOTDIR)/%)
+
ROOTFSHDRS= $(FSHDRS:%=$(ROOTDIR)/fs/%)
CHECKHDRS= \
$(HDRS:%.h=%.check) \
$(SUBHDRS:%.h=%.check) \
+ $(CLOSEDHDRS:%.h=$(CLOSED)/uts/intel/sys/%.check) \
$(FSHDRS:%.h=fs/%.check)
+$(CLOSED_BUILD)CHECKHDRS += $(CLOSEDHDRS:%.h=$(CLOSED)/uts/intel/sys/%.check)
+
# install rules
$(ROOTDIR)/%: %
$(INS.file)
+$(ROOTDIR)/%: $(CLOSED)/uts/intel/sys/%
+ $(INS.file)
+
.KEEP_STATE:
.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTFSHDRS)
diff --git a/usr/src/uts/req.flg b/usr/src/uts/req.flg
index b0d3f87d86..4cd20e6b90 100644
--- a/usr/src/uts/req.flg
+++ b/usr/src/uts/req.flg
@@ -43,8 +43,10 @@ find_files "s.*" usr/src/common/util
find_files "s.*" usr/src/common/net/wanboot/crypt
find_files "s.*" usr/src/common/crypto
find_files "s.*" usr/src/common/avl
-find_files "s.*" usr/src/cmd/cmd-crypto/etc/certs
-find_files "s.*" usr/src/cmd/cmd-crypto/etc/keys
+# For full builds (open and closed), we want both etc/certs and
+# etc/keys. For an open source build, there's no etc/keys directory.
+find_files "s.*" usr/src/cmd/cmd-crypto/etc
+find_files "s.*" usr/closed/cmd/cmd-crypto/etc
find_files "s.*" usr/src/common/ipf
find_files "s.*" usr/src/common/mdesc
find_files "s.*" usr/src/common/fs
diff --git a/usr/src/uts/sparc/Makefile b/usr/src/uts/sparc/Makefile
index 3f720c577e..7567b93bff 100644
--- a/usr/src/uts/sparc/Makefile
+++ b/usr/src/uts/sparc/Makefile
@@ -39,20 +39,28 @@ include Makefile.sparc
LINT_LIBS = $(LINT_LIB) $(GEN_LINT_LIB) \
$(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
+$(CLOSED_BUILD)LINT_LIBS += $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
+
# EXPORT DELETE START
LINT_LIBS += $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
-LINT_XMODLIBS = $(XMODS:e1000g=)
LINT_LIBS += $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln)
+$(CLOSED_BUILD)CLOSED_LINT_XMODS = $(CLOSED_XMODS:e1000g=)
+$(CLOSED_BUILD)LINT_LIBS += $(CLOSED_LINT_XMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
+
DRV_KMODS += dprov
+
#
# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*)
# They need to be listed separately since they duplicate global symbols
# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
# should not be listed in the lint target.
#
-CRYPTO_EK_KMODS += aes256
-CRYPTO_EK_KMODS += arcfour2048
-CRYPTO_EK_KMODS += blowfish448
+# Don't build these for OpenSolaris, since they will be replaced by
+# binaries that are signed by Sun RE.
+#
+$(CLOSED_BUILD)CRYPTO_EK_KMODS += aes256
+$(CLOSED_BUILD)CRYPTO_EK_KMODS += arcfour2048
+$(CLOSED_BUILD)CRYPTO_EK_KMODS += blowfish448
# EXPORT DELETE END
#
@@ -65,24 +73,40 @@ clean := TARGET= clean
clobber := TARGET= clobber
lint := TARGET= lint
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
install_h := TARGET= install_h
.KEEP_STATE:
-.PARALLEL: $(KMODS) $(SVVS) $(XMODS) config $(LINT_DEPS)
+.PARALLEL: $(KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) $(CLOSED_XMODS) \
+ config $(LINT_DEPS)
-def all install clean clobber: $(KMODS) $(SVVS) $(XMODS) config
+def all install clean clobber modlist: $(KMODS) $(CLOSED_KMODS) $(SVVS) \
+ $(XMODS) $(CLOSED_XMODS) config
-modlintlib clean.lint: $(LINT_KMODS) $(SVVS) $(XMODS)
+modlintlib clean.lint: $(LINT_KMODS) $(CLOSED_LINT_KMODS) $(SVVS) \
+ $(XMODS) $(CLOSED_LINT_XMODS)
$(KMODS) config: FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(CLOSED_KMODS): FRC
+ cd $(CLOSED)/uts/sparc/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
-$(SVVS) $(XMODS): FRC
+$(XMODS): FRC
@if [ -f $@/Makefile ]; then \
- cd $@; pwd; $(MAKE) $(TARGET); \
+ cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
+ else \
+ true; \
+ fi
+
+$(SVVS) $(CLOSED_XMODS): FRC
+ @if [ -f $(CLOSED)/uts/sparc/$@/Makefile ]; then \
+ cd $(CLOSED)/uts/sparc/$@; pwd; \
+ $(MAKE) $(NO_STATE) $(TARGET); \
else \
true; \
fi
diff --git a/usr/src/uts/sparc/Makefile.sparc b/usr/src/uts/sparc/Makefile.sparc
index 31449ed768..4e94f84aa8 100644
--- a/usr/src/uts/sparc/Makefile.sparc
+++ b/usr/src/uts/sparc/Makefile.sparc
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -25,370 +24,7 @@
#
# ident "%Z%%M% %I% %E% SMI"
#
-# This makefile contains the common definitions for all sparc
-# implementation architecture independent modules.
-#
-
-
-#
-# Define supported builds
-#
-DEF_BUILDS = $(DEF_BUILDS64)
-ALL_BUILDS = $(ALL_BUILDS64)
-
-#
-# Everybody needs to know how to build modstubs.o and to locate unix.o.
-# Note that unix.o must currently be selected from among the possible
-# "implementation architectures". Note further, that unix.o is only
-# used as an optional error check for undefines so (theoretically)
-# any "implementation architectures" could be used. We choose sun4u
-# because it is the reference port.
-#
-UNIX_DIR = $(UTSBASE)/sun4u/unix
-GENLIB_DIR = $(UTSBASE)/sun4u/genunix
-IPDRV_DIR = $(UTSBASE)/sparc/ip
-MODSTUBS_DIR = $(UNIX_DIR)
-DSF_DIR = $(UNIX_DIR)
-LINTS_DIR = $(OBJS_DIR)
-LINT_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
-
-UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
-MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
-GENLIB = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/libgenunix.so
-
-LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln
-GEN_LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
-
-LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln
-GEN_LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
-
-LINT_LIB = $(LINT_LIB_$(CLASS))
-GEN_LINT_LIB = $(GEN_LINT_LIB_$(CLASS))
-
-LINT32_DIRS = $(LINT32_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%)
-LINT32_FILES = $(LINT32_DIRS:%=%/llib-l$(MODULE).ln)
-
-LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%)
-LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln)
-
-#
-# Include the makefiles which define build rule templates, the
-# collection of files per module, and a few specific flags. Note
-# that order is significant, just as with an include path. The
-# first build rule template which matches the files name will be
-# used. By including these in order from most machine dependent
-# to most machine independent, we allow a machine dependent file
-# to be used in preference over a machine independent version
-# (Such as a machine specific optimization, which preserves the
-# interfaces.)
-#
-include $(UTSBASE)/sparc/Makefile.files
-include $(UTSBASE)/sparc/v9/Makefile.files
-include $(UTSBASE)/sun/Makefile.files
-include $(UTSBASE)/common/Makefile.files
-
-#
-# Include machine independent rules. Note that this does not imply
-# that the resulting module from rules in Makefile.uts is machine
-# independent. Only that the build rules are machine independent.
-#
-include $(UTSBASE)/Makefile.uts
-
-#
-# machine specific optimization, override default in Makefile.master
-#
-XARCH_32 = -xarch=v8
-XARCH_64 = -xarch=v9
-XARCH = $(XARCH_$(CLASS))
-
-COPTIMIZE_32 = -xO3
-COPTIMIZE_64 = -xO3
-COPTIMIZE = $(COPTIMIZE_$(CLASS))
-
-CCMODE = -Xa
-
-CFLAGS_32 = -xcg92
-CFLAGS_64 = -xchip=ultra $(CCABS32) $(CCREGSYM)
-CFLAGS = $(CFLAGS_$(CLASS))
-
-CFLAGS += $(XARCH)
-CFLAGS += $(COPTIMIZE)
-CFLAGS += $(EXTRA_CFLAGS)
-CFLAGS += $(XAOPT)
-CFLAGS += $(INLINES) -D_ASM_INLINES
-CFLAGS += $(CCMODE)
-CFLAGS += $(SPACEFLAG)
-CFLAGS += $(CERRWARN)
-CFLAGS += $(CTF_FLAGS)
-CFLAGS += $(C99MODE)
-CFLAGS += $(CCUNBOUND)
-CFLAGS += -xregs=no%float
-
-ASFLAGS += $(XARCH)
-
-LINT_DEFS_32 =
-LINT_DEFS_64 = -Xarch=v9
-LINT_DEFS += $(LINT_DEFS_$(CLASS))
-
-#
-# The following must be defined for all implementations:
-#
-# MODSTUBS: Module stubs source file.
-#
-MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s
-
-#
-# Define the actual specific platforms - obviously none.
-#
-MACHINE_DEFS =
-
-#
-# Debugging level
-#
-# Special knowledge of which special debugging options effect which
-# file is used to optimize the build if these flags are changed.
-#
-# XXX: The above could possibly be done for more flags and files, but
-# is left as an experiment to the interested reader. Be forewarned,
-# that excessive use could lead to maintenance difficulties.
-#
-DEBUG_DEFS_OBJ32 =
-DEBUG_DEFS_DBG32 = -DDEBUG
-DEBUG_DEFS_OBJ64 =
-DEBUG_DEFS_DBG64 = -DDEBUG
-DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
-
-DEBUG_COND_OBJ32 :sh = echo \\043
-DEBUG_COND_DBG32 =
-DEBUG_COND_OBJ64 :sh = echo \\043
-DEBUG_COND_DBG64 =
-IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
-
-$(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
-$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
-
-# Comment these out if you don't want dispatcher lock statistics.
-
-# $(IF_DEBUG_OBJ)disp_lock.o := DEBUG_DEFS += -DDISP_LOCK_STATS
-
-#
-# This rather strange collection of definitions ensures that lint sees
-# 'struct cpu' containing a fully declared embedded 'struct machcpu'
-#
-# There's something deeply dissatisfying about this.
-#
-LINTMACHFLAGS = -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu
-$(LINTS_DIR)/kcpc.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/kdi.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/msacct.ln := LINTFLAGS += $(LINTMACHFLAGS)
-$(LINTS_DIR)/thread.ln := LINTFLAGS += $(LINTMACHFLAGS)
-
-#
-# Build `options'. These are mostly historical and the need for these
-# is largely removed by the module technology. However, the static
-# build will continue to require these.
-#
-OPTION_DEFS = -DC2_AUDIT
-
-#
-# Collect the preprocessor definitions to be associated with *all*
-# files.
-#
-ALL_DEFS = $(MACHINE_DEFS) $(DEBUG_DEFS) $(OPTION_DEFS)
-#
-# ----- TRANSITIONAL SECTION --------------------------------------------------
-#
-#
-# Not everything which *should* be a module is a module yet. The
-# following is a list of such objects which are currently part of
-# the base kernel but should soon become kmods.
-#
-NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(MOD_OBJS)
-
-#
-# ----- END OF TRANSITIONAL SECTION -------------------------------------------
-
-#
-# The kernels modules which are "implementation architecture"
-# specific for this machine are enumerated below. Note that most
-# of these modules must exist (in one form or another) for each
-# architecture.
-#
-# Common Drivers (usually pseudo drivers) (/kernel/drv):
-#
-DRV_KMODS += aggr arp bl bofi clone cn conskbd consms cpuid
-DRV_KMODS += crypto cryptoadm dca devinfo dump
-DRV_KMODS += dtrace fasttrap fbt lockstat profile sdt systrace
-DRV_KMODS += fssnap glm icmp icmp6 ip ip6 ipsecah
-DRV_KMODS += ipsecesp isp iwscn keysock kmdb kstat ksyms llc1 llc2
-DRV_KMODS += lofi
-DRV_KMODS += log logindmux kssl mm mpt nca pm poll pool
-DRV_KMODS += pseudo ptc ptm pts ptsl ramdisk random rsm rts sad se
-DRV_KMODS += spdsock sppp sppptun sy sysevent sysmsg
-DRV_KMODS += tcp tcp6 tl tnf ttymux udp udp6 vol wc winlock zcons
-DRV_KMODS += ippctl sctp sctp6
-DRV_KMODS += dld
-DRV_KMODS += ipf pfil
-DRV_KMODS += rpcib
-DRV_KMODS += vni
-
-#
-# Hardware Drivers in common space
-#
-DRV_KMODS += ixgb
-DRV_KMODS += rge
-
-#
-# Machine Specific Driver Modules (/kernel/drv):
-#
-DRV_KMODS += audio1575 audiovia823x audio810 audiocs audioens audiots
-DRV_KMODS += bge bpp eri esp fas hme
-DRV_KMODS += openeepr options sd ses sgen st
-DRV_KMODS += ssd socal
-DRV_KMODS += ecpp
-DRV_KMODS += uata dad ifp
-DRV_KMODS += hid hubd ehci ohci uhci usb_mid scsa2usb usbprn ugen
-DRV_KMODS += usbser usbser_edge usbsksp usbsprl
-DRV_KMODS += usb_as usb_ac
-DRV_KMODS += usbskel
-DRV_KMODS += hci1394 av1394 scsa1394 dcam1394
-DRV_KMODS += sbp2
-DRV_KMODS += scsi_vhci
-DRV_KMODS += ib ibd
-DRV_KMODS += xge
-DRV_KMODS += chxge
-DRV_KMODS += pci_pci px_pci pcie
-DRV_KMODS += i8042 kb8042 mouse8042
-
-#
-# I/O framework test drivers
-#
-DRV_KMODS += pshot
-DRV_KMODS += gen_drv
-DRV_KMODS += tvhci tphci tclient
-DRV_KMODS += emul64
-
-#
-# PCMCIA specific module(s)
-#
-DRV_KMODS += pem stp4020 pcs pcic
-MISC_KMODS += busra dada pcmcia
-DRV_KMODS += pcata pcelx pcmem pcram pcser
-
-# Add lvm
-#
-DRV_KMODS += md
-MISC_KMODS += md_mirror md_stripe md_hotspares md_raid md_trans md_notify
-MISC_KMODS += md_sp
-
-#
-# Exec Class Modules (/kernel/exec):
-#
-EXEC_KMODS += aoutexec elfexec intpexec javaexec
-
-#
-# Scheduling Class Modules (/kernel/sched):
-#
-SCHED_KMODS += RT TS RT_DPTBL TS_DPTBL IA FSS FX FX_DPTBL
-
-#
-# File System Modules (/kernel/fs):
-#
-FS_KMODS += devfs fdfs fifofs hsfs lofs namefs nfs pcfs tmpfs zfs
-FS_KMODS += specfs udfs ufs autofs cachefs procfs sockfs mntfs
-FS_KMODS += ctfs objfs
-
-#
-# Streams Modules (/kernel/strmod):
-#
-STRMOD_KMODS += 6to4tun atun bufmod connld dedump ldterm ms pckt pfmod
-STRMOD_KMODS += pipemod ptem redirmod rpcmod rlmod telmod timod
-STRMOD_KMODS += spppasyn spppcomp
-STRMOD_KMODS += tirdwr ttcompat tun
-STRMOD_KMODS += usbkbm usbms usb_ah
-STRMOD_KMODS += drcompat
-STRMOD_KMODS += nattymod
-STRMOD_KMODS += cryptmod
-STRMOD_KMODS += vuid3ps2
-
-#
-# 'System' Modules (/kernel/sys):
-#
-SYS_KMODS += c2audit
-SYS_KMODS += exacctsys
-SYS_KMODS += inst_sync kaio msgsys semsys shmsys sysacct pipe
-SYS_KMODS += doorfs pset acctctl portfs
+UTSTREE=$(UTSBASE)
-#
-# 'User' Modules (/kernel/misc):
-#
-MISC_KMODS += amsrc1 amsrc2 audiosup diaudio mixer
-MISC_KMODS += consconfig gld ipc nfs_dlboot nfssrv scsi
-MISC_KMODS += strplumb swapgeneric klmmod klmops tlimod
-MISC_KMODS += krtld
-MISC_KMODS += rpcsec rpcsec_gss kgssapi kmech_dummy
-MISC_KMODS += kmech_krb5
-MISC_KMODS += fssnap_if
-MISC_KMODS += hidparser kbtrans usba usba10
-MISC_KMODS += s1394
-MISC_KMODS += hpcsvc pcicfg pcihp
-MISC_KMODS += rsmops
-MISC_KMODS += phx
-MISC_KMODS += kcf
-MISC_KMODS += ibcm
-MISC_KMODS += ibdm
-MISC_KMODS += ibmf
-MISC_KMODS += ibtl
-MISC_KMODS += ctf
-MISC_KMODS += zmod
-MISC_KMODS += mac dls
-MISC_KMODS += cmlb
-
-#
-# Software Cryptographic Providers (/kernel/crypto):
-#
-CRYPTO_KMODS += aes
-CRYPTO_KMODS += arcfour
-CRYPTO_KMODS += blowfish
-CRYPTO_KMODS += des
-CRYPTO_KMODS += md5
-CRYPTO_KMODS += rsa
-CRYPTO_KMODS += sha1
-CRYPTO_KMODS += sha2
-CRYPTO_KMODS += swrand
-
-#
-# IP Policy Modules (/kernel/ipp):
-#
-IPP_KMODS += dlcosmk
-IPP_KMODS += flowacct
-IPP_KMODS += ipgpc
-IPP_KMODS += dscpmk
-IPP_KMODS += tokenmt
-IPP_KMODS += tswtclmt
-
-#
-# 'Dacf' modules (/kernel/dacf)
-DACF_KMODS += consconfig_dacf
-
-#
-# SVVS Testing Modules (/kernel/strmod):
-#
-# These are streams and driver modules which are not to be
-# delivered with a released system. However, during development
-# it is convenient to build and install the SVVS kernel modules.
-#
-SVVS_KMODS += lmodb lmode lmodr lmodt lo tidg tivc tmux
-
-SVVS += svvs
-
-#
-# Modules eXcluded from the product:
-#
-XMODS += wsdrv tavor daplt e1000g
-
-#
-# 'Dacf' Modules (/kernel/dacf):
-#
-DACF_KMODS += usb_ac_dacf
+include $(UTSBASE)/sparc/Makefile.sparc.shared
diff --git a/usr/src/uts/sparc/Makefile.sparc.shared b/usr/src/uts/sparc/Makefile.sparc.shared
new file mode 100644
index 0000000000..03547665ef
--- /dev/null
+++ b/usr/src/uts/sparc/Makefile.sparc.shared
@@ -0,0 +1,424 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This makefile contains the common definitions for all sparc
+# implementation architecture independent modules.
+#
+
+#
+# Define supported builds
+#
+DEF_BUILDS = $(DEF_BUILDS64)
+ALL_BUILDS = $(ALL_BUILDS64)
+
+#
+# Everybody needs to know how to build modstubs.o and to locate unix.o.
+# Note that unix.o must currently be selected from among the possible
+# "implementation architectures". Note further, that unix.o is only
+# used as an optional error check for undefines so (theoretically)
+# any "implementation architectures" could be used. We choose sun4u
+# because it is the reference port.
+#
+UNIX_DIR = $(UTSBASE)/sun4u/unix
+GENLIB_DIR = $(UTSBASE)/sun4u/genunix
+IPDRV_DIR = $(UTSBASE)/sparc/ip
+MODSTUBS_DIR = $(UNIX_DIR)
+DSF_DIR = $(UNIX_DIR)
+LINTS_DIR = $(OBJS_DIR)
+LINT_LIB_DIR = $(UTSBASE)/sparc/lint-libs/$(OBJS_DIR)
+
+UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
+MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
+GENLIB = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/libgenunix.so
+
+LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln
+GEN_LINT_LIB_32 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
+
+LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lunix.ln
+GEN_LINT_LIB_64 = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
+
+LINT_LIB = $(LINT_LIB_$(CLASS))
+GEN_LINT_LIB = $(GEN_LINT_LIB_$(CLASS))
+
+LINT32_DIRS = $(LINT32_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%)
+LINT32_FILES = $(LINT32_DIRS:%=%/llib-l$(MODULE).ln)
+
+LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/sparc/lint-libs/%)
+LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln)
+
+#
+# Include the makefiles which define build rule templates, the
+# collection of files per module, and a few specific flags. Note
+# that order is significant, just as with an include path. The
+# first build rule template which matches the files name will be
+# used. By including these in order from most machine dependent
+# to most machine independent, we allow a machine dependent file
+# to be used in preference over a machine independent version
+# (Such as a machine specific optimization, which preserves the
+# interfaces.)
+#
+include $(UTSBASE)/sparc/Makefile.files
+include $(UTSBASE)/sparc/v9/Makefile.files
+include $(UTSTREE)/sun/Makefile.files
+include $(UTSTREE)/common/Makefile.files
+
+#
+# Include machine independent rules. Note that this does not imply
+# that the resulting module from rules in Makefile.uts is machine
+# independent. Only that the build rules are machine independent.
+#
+include $(UTSBASE)/Makefile.uts
+
+#
+# machine specific optimization, override default in Makefile.master
+#
+XARCH_32 = -xarch=v8
+XARCH_64 = -xarch=v9
+XARCH = $(XARCH_$(CLASS))
+
+COPTIMIZE_32 = -xO3
+COPTIMIZE_64 = -xO3
+COPTIMIZE = $(COPTIMIZE_$(CLASS))
+
+CCMODE = -Xa
+
+CFLAGS_32 = -xcg92
+CFLAGS_64 = -xchip=ultra $(CCABS32) $(CCREGSYM)
+CFLAGS = $(CFLAGS_$(CLASS))
+
+CFLAGS += $(XARCH)
+CFLAGS += $(COPTIMIZE)
+CFLAGS += $(EXTRA_CFLAGS)
+CFLAGS += $(XAOPT)
+CFLAGS += $(INLINES) -D_ASM_INLINES
+CFLAGS += $(CCMODE)
+CFLAGS += $(SPACEFLAG)
+CFLAGS += $(CERRWARN)
+CFLAGS += $(CTF_FLAGS)
+CFLAGS += $(C99MODE)
+CFLAGS += $(CCUNBOUND)
+CFLAGS += -xregs=no%float
+
+ASFLAGS += $(XARCH)
+
+LINT_DEFS_32 =
+LINT_DEFS_64 = -Xarch=v9
+LINT_DEFS += $(LINT_DEFS_$(CLASS))
+
+#
+# The following must be defined for all implementations:
+#
+# MODSTUBS: Module stubs source file.
+#
+MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s
+
+#
+# Define the actual specific platforms - obviously none.
+#
+MACHINE_DEFS =
+
+#
+# Debugging level
+#
+# Special knowledge of which special debugging options effect which
+# file is used to optimize the build if these flags are changed.
+#
+# XXX: The above could possibly be done for more flags and files, but
+# is left as an experiment to the interested reader. Be forewarned,
+# that excessive use could lead to maintenance difficulties.
+#
+DEBUG_DEFS_OBJ32 =
+DEBUG_DEFS_DBG32 = -DDEBUG
+DEBUG_DEFS_OBJ64 =
+DEBUG_DEFS_DBG64 = -DDEBUG
+DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
+
+DEBUG_COND_OBJ32 :sh = echo \\043
+DEBUG_COND_DBG32 =
+DEBUG_COND_OBJ64 :sh = echo \\043
+DEBUG_COND_DBG64 =
+IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
+
+$(IF_DEBUG_OBJ)syscall.o := DEBUG_DEFS += -DSYSCALLTRACE
+$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=1
+
+# Comment these out if you don't want dispatcher lock statistics.
+
+# $(IF_DEBUG_OBJ)disp_lock.o := DEBUG_DEFS += -DDISP_LOCK_STATS
+
+#
+# This rather strange collection of definitions ensures that lint sees
+# 'struct cpu' containing a fully declared embedded 'struct machcpu'
+#
+# There's something deeply dissatisfying about this.
+#
+LINTMACHFLAGS = -D_MACHDEP -I../../sun4 -I../../$(PLATFORM) -I../../sfmmu
+$(LINTS_DIR)/kcpc.ln := LINTFLAGS += $(LINTMACHFLAGS)
+$(LINTS_DIR)/kdi.ln := LINTFLAGS += $(LINTMACHFLAGS)
+$(LINTS_DIR)/msacct.ln := LINTFLAGS += $(LINTMACHFLAGS)
+$(LINTS_DIR)/thread.ln := LINTFLAGS += $(LINTMACHFLAGS)
+
+#
+# Build `options'. These are mostly historical and the need for these
+# is largely removed by the module technology. However, the static
+# build will continue to require these.
+#
+OPTION_DEFS = -DC2_AUDIT
+
+#
+# Collect the preprocessor definitions to be associated with *all*
+# files.
+#
+ALL_DEFS = $(MACHINE_DEFS) $(DEBUG_DEFS) $(OPTION_DEFS)
+#
+# ----- TRANSITIONAL SECTION --------------------------------------------------
+#
+
+#
+# Not everything which *should* be a module is a module yet. The
+# following is a list of such objects which are currently part of
+# the base kernel but should soon become kmods.
+#
+NOT_YET_KMODS = $(OLDPTY_OBJS) $(PTY_OBJS) $(MOD_OBJS)
+
+#
+# ----- END OF TRANSITIONAL SECTION -------------------------------------------
+
+#
+# The kernels modules which are "implementation architecture"
+# specific for this machine are enumerated below. Note that most
+# of these modules must exist (in one form or another) for each
+# architecture.
+#
+# Common Drivers (usually pseudo drivers) (/kernel/drv):
+#
+DRV_KMODS += aggr arp bl bofi clone cn conskbd consms cpuid
+DRV_KMODS += crypto cryptoadm dca devinfo dump
+DRV_KMODS += dtrace fasttrap fbt lockstat profile sdt systrace
+DRV_KMODS += fssnap icmp icmp6 ip ip6 ipsecah
+DRV_KMODS += ipsecesp iwscn keysock kmdb kstat ksyms llc1
+DRV_KMODS += lofi
+DRV_KMODS += log logindmux kssl mm nca pm poll pool
+DRV_KMODS += pseudo ptc ptm pts ptsl ramdisk random rsm rts sad
+DRV_KMODS += sppp sppptun sy sysevent sysmsg
+DRV_KMODS += spdsock
+DRV_KMODS += tcp tcp6 tl tnf ttymux udp udp6 vol wc winlock zcons
+DRV_KMODS += ippctl sctp sctp6
+DRV_KMODS += dld
+DRV_KMODS += ipf pfil
+DRV_KMODS += rpcib
+DRV_KMODS += vni
+
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += glm
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += isp
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += llc2
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += mpt
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += se
+
+#
+# Hardware Drivers in common space
+#
+
+DRV_KMODS += rge
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += ixgb
+
+#
+# Machine Specific Driver Modules (/kernel/drv):
+#
+DRV_KMODS += audio1575 audio810 audiocs audiots
+DRV_KMODS += bge bpp eri esp fas hme
+DRV_KMODS += openeepr options sd ses st
+DRV_KMODS += ssd
+DRV_KMODS += ecpp
+DRV_KMODS += hid hubd ehci ohci uhci usb_mid scsa2usb usbprn ugen
+DRV_KMODS += usbser usbsksp usbsprl
+DRV_KMODS += usb_as usb_ac
+DRV_KMODS += usbskel
+DRV_KMODS += hci1394 av1394 scsa1394 dcam1394
+DRV_KMODS += sbp2
+DRV_KMODS += ib ibd
+DRV_KMODS += pci_pci px_pci pcie
+DRV_KMODS += i8042 kb8042 mouse8042
+
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += audioens
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += audiovia823x
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += chxge
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += dad
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += ifp
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += scsi_vhci
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += sgen
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += socal
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += uata
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += usbser_edge
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += xge
+
+#
+# I/O framework test drivers
+#
+DRV_KMODS += pshot
+DRV_KMODS += gen_drv
+DRV_KMODS += tvhci tphci tclient
+DRV_KMODS += emul64
+
+#
+# PCMCIA specific module(s)
+#
+DRV_KMODS += stp4020 pcs
+MISC_KMODS += busra dada pcmcia
+DRV_KMODS += pcata pcmem pcram
+
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcelx
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcic
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += pcser
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += pem
+
+# Add lvm
+#
+DRV_KMODS += md
+MISC_KMODS += md_mirror md_stripe md_hotspares md_raid md_trans md_notify
+MISC_KMODS += md_sp
+
+#
+# Exec Class Modules (/kernel/exec):
+#
+EXEC_KMODS += aoutexec elfexec intpexec javaexec
+
+#
+# Scheduling Class Modules (/kernel/sched):
+#
+SCHED_KMODS += RT TS RT_DPTBL TS_DPTBL IA FSS FX FX_DPTBL
+
+#
+# File System Modules (/kernel/fs):
+#
+FS_KMODS += devfs fdfs fifofs hsfs lofs namefs nfs pcfs tmpfs zfs
+FS_KMODS += specfs udfs ufs autofs cachefs procfs sockfs mntfs
+FS_KMODS += ctfs objfs
+
+#
+# Streams Modules (/kernel/strmod):
+#
+STRMOD_KMODS += 6to4tun atun bufmod connld dedump ldterm ms pckt pfmod
+STRMOD_KMODS += pipemod ptem redirmod rpcmod rlmod telmod timod
+STRMOD_KMODS += spppasyn spppcomp
+STRMOD_KMODS += tirdwr ttcompat tun
+STRMOD_KMODS += usbkbm usbms usb_ah
+STRMOD_KMODS += drcompat
+STRMOD_KMODS += nattymod
+STRMOD_KMODS += cryptmod
+STRMOD_KMODS += vuid3ps2
+
+#
+# 'System' Modules (/kernel/sys):
+#
+SYS_KMODS += c2audit
+SYS_KMODS += exacctsys
+SYS_KMODS += inst_sync kaio msgsys semsys shmsys sysacct pipe
+SYS_KMODS += doorfs pset acctctl portfs
+
+#
+# 'User' Modules (/kernel/misc):
+#
+MISC_KMODS += amsrc2 audiosup diaudio mixer
+MISC_KMODS += consconfig gld ipc nfs_dlboot nfssrv scsi
+MISC_KMODS += strplumb swapgeneric tlimod
+MISC_KMODS += krtld
+MISC_KMODS += rpcsec rpcsec_gss kgssapi kmech_dummy
+MISC_KMODS += kmech_krb5
+MISC_KMODS += fssnap_if
+MISC_KMODS += hidparser kbtrans usba usba10
+MISC_KMODS += s1394
+MISC_KMODS += hpcsvc pcicfg pcihp
+MISC_KMODS += rsmops
+MISC_KMODS += kcf
+MISC_KMODS += ibcm
+MISC_KMODS += ibdm
+MISC_KMODS += ibmf
+MISC_KMODS += ibtl
+MISC_KMODS += ctf
+MISC_KMODS += zmod
+MISC_KMODS += mac dls
+MISC_KMODS += cmlb
+
+$(CLOSED_BUILD)CLOSED_MISC_KMODS += amsrc1
+$(CLOSED_BUILD)CLOSED_MISC_KMODS += klmmod klmops
+$(CLOSED_BUILD)CLOSED_MISC_KMODS += phx
+
+#
+# Software Cryptographic Providers (/kernel/crypto):
+#
+# Don't build some of these for OpenSolaris, since they will be
+# replaced by binaries that are signed by Sun RE.
+#
+$(CLOSED_BUILD)CRYPTO_KMODS += aes
+$(CLOSED_BUILD)CRYPTO_KMODS += arcfour
+$(CLOSED_BUILD)CRYPTO_KMODS += blowfish
+$(CLOSED_BUILD)CRYPTO_KMODS += des
+CRYPTO_KMODS += md5
+CRYPTO_KMODS += rsa
+CRYPTO_KMODS += sha1
+CRYPTO_KMODS += sha2
+CRYPTO_KMODS += swrand
+
+#
+# IP Policy Modules (/kernel/ipp):
+#
+IPP_KMODS += dlcosmk
+IPP_KMODS += flowacct
+IPP_KMODS += ipgpc
+IPP_KMODS += dscpmk
+IPP_KMODS += tokenmt
+IPP_KMODS += tswtclmt
+
+#
+# 'Dacf' modules (/kernel/dacf)
+DACF_KMODS += consconfig_dacf
+
+#
+# SVVS Testing Modules (/kernel/strmod):
+#
+# These are streams and driver modules which are not to be
+# delivered with a released system. However, during development
+# it is convenient to build and install the SVVS kernel modules.
+#
+SVVS_KMODS += lmodb lmode lmodr lmodt lo tidg tivc tmux
+
+SVVS += svvs
+
+#
+# Modules eXcluded from the product:
+#
+XMODS +=
+$(CLOSED_BUILD)CLOSED_XMODS = \
+ daplt \
+ e1000g \
+ tavor \
+ wsdrv
+
+#
+# 'Dacf' Modules (/kernel/dacf):
+#
+DACF_KMODS += usb_ac_dacf
diff --git a/usr/src/uts/sparc/Makefile.targ b/usr/src/uts/sparc/Makefile.targ
index 3c360d6afd..60f51356c1 100644
--- a/usr/src/uts/sparc/Makefile.targ
+++ b/usr/src/uts/sparc/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,28 +18,12 @@
#
# CDDL HEADER END
#
-#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# This Makefile defines the set of all required, target containing
-# included Makefiles for the sparc architecture.
+# ident "%Z%%M% %I% %E% SMI"
#
-#
-# Targets for all implementations:
-#
-include $(UTSBASE)/Makefile.targ
+UTSTREE=$(UTSBASE)
-#
-# Target set for sparc (order is not important, as it is with the
-# isomorphic Makefile.files set).
-#
-include $(UTSBASE)/sparc/Makefile.rules
-include $(UTSBASE)/sparc/v9/Makefile.rules
-include $(UTSBASE)/sun/Makefile.rules
-include $(UTSBASE)/common/Makefile.rules
-include $(UTSBASE)/sun4u/Makefile.rules
-include $(UTSBASE)/sun4/Makefile.rules
+include $(UTSBASE)/sparc/Makefile.targ.shared
diff --git a/usr/src/uts/sparc/Makefile.targ.shared b/usr/src/uts/sparc/Makefile.targ.shared
new file mode 100644
index 0000000000..a3d42b3bd8
--- /dev/null
+++ b/usr/src/uts/sparc/Makefile.targ.shared
@@ -0,0 +1,46 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# This Makefile defines the set of all required, target containing
+# included Makefiles for the sparc architecture.
+#
+
+#
+# Targets for all implementations:
+#
+include $(UTSBASE)/Makefile.targ
+
+#
+# Target set for sparc (order is not important, as it is with the
+# isomorphic Makefile.files set).
+#
+include $(UTSBASE)/sparc/Makefile.rules
+include $(UTSBASE)/sparc/v9/Makefile.rules
+include $(UTSTREE)/sun/Makefile.rules
+include $(UTSTREE)/common/Makefile.rules
+include $(UTSTREE)/sun4u/Makefile.rules
+include $(UTSBASE)/sun4/Makefile.rules
diff --git a/usr/src/uts/sparc/audiocs/Makefile b/usr/src/uts/sparc/audiocs/Makefile
index 6b122e9177..825df25f68 100644
--- a/usr/src/uts/sparc/audiocs/Makefile
+++ b/usr/src/uts/sparc/audiocs/Makefile
@@ -22,7 +22,7 @@
#
# uts/sparc/audiocs/Makefile
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -115,19 +115,19 @@ WARLOCK = warlock
$(TEST) -f $@ || $(SCCS) get $@
warlock: $(WARLOCK_OK)
-
+
$(WARLOCK_OK): $(WARLOCK_OBJECTS) warlock_ddi.files \
warlock_audiosup.files warlock_mixer.files warlock_amsrc1.files \
warlock_standalone audiocs_with_sada.wlcmd
$(WARLOCK) -c audiocs_with_sada.wlcmd $(WARLOCK_OBJECTS) \
- ../audiosup/audio_support.ll ../amsrc1/am_src1.ll \
+ ../audiosup/audio_support.ll $(CLOSED)/uts/sparc/amsrc1/am_src1.ll \
../mixer/am_main.ll ../mixer/am_ad.ll ../mixer/am_ioctl.ll \
-l ../warlock/ddi_dki_impl.ll
$(TOUCH) $(WARLOCK_OK)
%.ll: $(UTSBASE)/sun/io/audio/sada/drv/audiocs/%.c
$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
-
+
warlock_standalone: $(WARLOCK_OBJECTS) warlock_ddi.files audiocs.wlcmd
$(WARLOCK) -c audiocs.wlcmd $(WARLOCK_OBJECTS) \
-l ../warlock/ddi_dki_impl.ll
@@ -139,7 +139,7 @@ warlock_audiosup.files:
@cd ../audiosup; pwd; $(MAKE) warlock
warlock_amsrc1.files:
- @cd ../amsrc1; pwd; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/amsrc1; pwd; $(MAKE) warlock
warlock_mixer.files:
@cd ../mixer; pwd; $(MAKE) warlock
diff --git a/usr/src/uts/sparc/kmech_krb5/inc.flg b/usr/src/uts/sparc/kmech_krb5/inc.flg
index 692f6b30d5..56ab53d112 100644
--- a/usr/src/uts/sparc/kmech_krb5/inc.flg
+++ b/usr/src/uts/sparc/kmech_krb5/inc.flg
@@ -23,10 +23,11 @@
#
# ident "%Z%%M% %I% %E% SMI"
#
-# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
find_files "s.*.h" usr/src/uts/common/sys
+find_files "s.*.h" usr/closed/uts/common/sys
find_files "s.*.h" usr/src/uts/common/rpc
find_files "s.*.h" usr/src/uts/common/gssapi
find_files "s.*.h" usr/src/uts/common/vm
@@ -39,3 +40,4 @@ find_files "s.*.h" usr/src/lib/krb5/kadm5
find_files "s.*" usr/src/uts/sparc/ml
find_files "s.*" usr/src/uts/common/gssapi/mechs/krb5
find_files "s.*" usr/src/lib/gss_mechs/mech_krb5
+find_files "s.*" usr/closed/lib/gss_mechs/mech_krb5
diff --git a/usr/src/uts/sparc/kmech_krb5/req.flg b/usr/src/uts/sparc/kmech_krb5/req.flg
index 1df378e01b..f6b7cb3c33 100644
--- a/usr/src/uts/sparc/kmech_krb5/req.flg
+++ b/usr/src/uts/sparc/kmech_krb5/req.flg
@@ -23,13 +23,19 @@
#
# ident "%Z%%M% %I% %E% SMI"
#
-# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
echo_file usr/src/uts/sparc/Makefile
echo_file usr/src/uts/sparc/Makefile.files
echo_file usr/src/uts/sparc/Makefile.sparc
+echo_file usr/src/uts/sparc/Makefile.sparc.shared
+echo_file usr/closed/uts/sparc/Makefile.sparc
echo_file usr/src/uts/sparc/Makefile.rules
echo_file usr/src/uts/sparc/Makefile.targ
+echo_file usr/src/uts/sparc/Makefile.targ.shared
+echo_file usr/closed/uts/sparc/Makefile.targ
echo_file usr/src/uts/common/Makefile.files
+echo_file usr/closed/uts/common/Makefile.files
echo_file usr/src/uts/common/Makefile.rules
+echo_file usr/closed/uts/common/Makefile.rules
diff --git a/usr/src/uts/sparc/mixer/Makefile b/usr/src/uts/sparc/mixer/Makefile
index d465f294bc..8a71db8a65 100644
--- a/usr/src/uts/sparc/mixer/Makefile
+++ b/usr/src/uts/sparc/mixer/Makefile
@@ -22,7 +22,7 @@
#
# uts/sparc/mixer/Makefile
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# This makefile drives the production of the audio mixer (mixer)
@@ -122,7 +122,7 @@ $(WARLOCK_OK): $(WARLOCK_OBJECTS) warlock_ddi.files \
warlock_amsrc2.files \
warlock_standalone mixer_with_audiosup.wlcmd
$(WARLOCK) -c mixer_with_audiosup.wlcmd $(WARLOCK_OBJECTS) \
- ../audiosup/audio_support.ll ../amsrc1/am_src1.ll \
+ ../audiosup/audio_support.ll $(CLOSED)/uts/sparc/amsrc1/am_src1.ll \
-l ../warlock/ddi_dki_impl.ll
$(WARLOCK) -c mixer_with_audiosup.wlcmd $(WARLOCK_OBJECTS) \
../audiosup/audio_support.ll ../amsrc2/am_src2.ll \
@@ -144,7 +144,7 @@ warlock_audiosup.files:
@cd ../audiosup; pwd; $(MAKE) warlock
warlock_amsrc1.files:
- @cd ../amsrc1; pwd; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/amsrc1; pwd; $(MAKE) warlock
warlock_amsrc2.files:
@cd ../amsrc2; pwd; $(MAKE) warlock
diff --git a/usr/src/uts/sparc/nfs/inc.flg b/usr/src/uts/sparc/nfs/inc.flg
index db1753e4bf..483eb6098e 100644
--- a/usr/src/uts/sparc/nfs/inc.flg
+++ b/usr/src/uts/sparc/nfs/inc.flg
@@ -21,7 +21,7 @@
# CDDL HEADER END
#
#
-# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -37,11 +37,14 @@ find_files "s.*.h" \
usr/src/uts/common/fs \
usr/src/uts/common/netinet \
usr/src/uts/common/nfs \
+ usr/closed/uts/common/nfs \
usr/src/uts/common/rpc \
usr/src/uts/common/sys \
+ usr/closed/uts/common/sys \
usr/src/uts/common/vm \
usr/src/uts/sparc/sys \
- usr/src/uts/sun/sys
+ usr/src/uts/sun/sys \
+ usr/closed/uts/sun/sys
# Find RPC .x files and Makefile so that "make all_h" works.
diff --git a/usr/src/uts/sparc/nfssrv/inc.flg b/usr/src/uts/sparc/nfssrv/inc.flg
index 019b501937..4f998cac6e 100644
--- a/usr/src/uts/sparc/nfssrv/inc.flg
+++ b/usr/src/uts/sparc/nfssrv/inc.flg
@@ -21,7 +21,7 @@
# CDDL HEADER END
#
#
-# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -38,11 +38,14 @@ find_files "s.*.h" \
usr/src/uts/common/fs \
usr/src/uts/common/netinet \
usr/src/uts/common/nfs \
+ usr/closed/uts/common/nfs \
usr/src/uts/common/rpc \
usr/src/uts/common/sys \
+ usr/closed/uts/common/sys \
usr/src/uts/common/vm \
usr/src/uts/sparc/sys \
- usr/src/uts/sun/sys
+ usr/src/uts/sun/sys \
+ usr/closed/uts/sun/sys
# Find RPC .x files and Makefile so that "make all_h" works.
diff --git a/usr/src/uts/sparc/req.flg b/usr/src/uts/sparc/req.flg
index e9b5fc2e9f..b72e4a1fb5 100644
--- a/usr/src/uts/sparc/req.flg
+++ b/usr/src/uts/sparc/req.flg
@@ -21,20 +21,31 @@
# CDDL HEADER END
#
#
-#pragma ident "%Z%%M% %I% %E% SMI"
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
#
echo_file usr/src/uts/sparc/Makefile
echo_file usr/src/uts/sparc/Makefile.files
echo_file usr/src/uts/sparc/Makefile.rules
echo_file usr/src/uts/sparc/Makefile.sparc
+echo_file usr/src/uts/sparc/Makefile.sparc.shared
+echo_file usr/closed/uts/sparc/Makefile.sparc
echo_file usr/src/uts/sparc/Makefile.targ
+echo_file usr/src/uts/sparc/Makefile.targ.shared
+echo_file usr/closed/uts/sparc/Makefile.targ
echo_file usr/src/uts/sun/Makefile.files
+echo_file usr/closed/uts/sun/Makefile.files
echo_file usr/src/uts/sun/Makefile.rules
+echo_file usr/closed/uts/sun/Makefile.rules
echo_file usr/src/uts/common/Makefile.files
+echo_file usr/closed/uts/common/Makefile.files
echo_file usr/src/uts/common/Makefile.rules
+echo_file usr/closed/uts/common/Makefile.rules
# uts/Makefile.targ (version 1.17) says "All C objects depend on
# inline files".
diff --git a/usr/src/uts/sparc/sd/Makefile b/usr/src/uts/sparc/sd/Makefile
index 31399f40e9..a94a33694d 100644
--- a/usr/src/uts/sparc/sd/Makefile
+++ b/usr/src/uts/sparc/sd/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -139,25 +138,25 @@ warlock_with_fas: sd_with_fas.wlcmd $(SD_FILES) scsi_files fas_files \
warlock_with_isp: sd_with_isp.wlcmd $(SD_FILES) scsi_files isp_files \
warlock_ddi.files
$(WARLOCK) -c ./sd_with_isp.wlcmd \
- $(SD_FILES) ../isp/isp $(SCSI_FILES) \
+ $(SD_FILES) $(CLOSED)/uts/sparc/isp/isp $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_glm: sd_with_glm.wlcmd $(SD_FILES) scsi_files glm_files \
warlock_ddi.files
$(WARLOCK) -c ./sd_with_glm.wlcmd \
- $(SD_FILES) ../glm/glm $(SCSI_FILES) \
+ $(SD_FILES) $(CLOSED)/uts/sparc/glm/glm $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_uata: sd_with_uata.wlcmd $(SD_FILES) scsi_files uata_files \
warlock_ddi.files
$(WARLOCK) -c ./sd_with_uata.wlcmd \
- $(SD_FILES) ../uata/*.ll $(SCSI_FILES) \
+ $(SD_FILES) $(CLOSED)/uts/sparc/uata/*.ll $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_mpt: sd_with_mpt.wlcmd $(SD_FILES) scsi_files mpt_files \
warlock_ddi.files
$(WARLOCK) -c ./sd_with_mpt.wlcmd \
- $(SD_FILES) ../mpt/*.ll $(SCSI_FILES) \
+ $(SD_FILES) $(CLOSED)/uts/sparc/mpt/*.ll $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
scsi_files:
@@ -170,16 +169,16 @@ fas_files:
@cd ../fas; pwd; $(MAKE) warlock
isp_files:
- @cd ../isp; pwd; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/isp; pwd; $(MAKE) warlock
glm_files:
- @cd ../glm; pwd; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/glm; pwd; $(MAKE) warlock
uata_files:
- @cd ../uata; pwd; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/uata; pwd; $(MAKE) warlock
mpt_files:
- @cd ../mpt; pwd; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/mpt; pwd; $(MAKE) warlock
warlock_ddi.files:
@cd ../warlock; pwd; $(MAKE) warlock
diff --git a/usr/src/uts/sparc/ses/Makefile b/usr/src/uts/sparc/ses/Makefile
index 32bab1aaef..a9d21fef5f 100644
--- a/usr/src/uts/sparc/ses/Makefile
+++ b/usr/src/uts/sparc/ses/Makefile
@@ -143,8 +143,9 @@ warlock_with_fas.ok: ses_with_fas.wlcmd $(SES_FILES)
warlock_with_isp.ok: ses_with_isp.wlcmd $(SES_FILES)
@cd ../warlock; $(MAKE) warlock
@cd ../scsi; $(MAKE) warlock
- @cd ../isp; $(MAKE) warlock;
- $(WARLOCK) -c ./ses_with_isp.wlcmd $(SES_FILES) ../isp/isp \
+ @cd $(CLOSED)/uts/sparc/isp; $(MAKE) warlock;
+ $(WARLOCK) -c ./ses_with_isp.wlcmd $(SES_FILES) \
+ $(CLOSED)/uts/sparc/isp/isp \
../warlock/scsi.ll \
-l ../warlock/ddi_dki_impl.ll \
$(SCSI_FILES)
@@ -153,8 +154,9 @@ warlock_with_isp.ok: ses_with_isp.wlcmd $(SES_FILES)
warlock_with_glm.ok: ses_with_glm.wlcmd $(SES_FILES)
@cd ../warlock; $(MAKE) warlock
@cd ../scsi; $(MAKE) warlock
- @cd ../glm; $(MAKE) warlock;
- $(WARLOCK) -c ./ses_with_glm.wlcmd $(SES_FILES) ../glm/glm \
+ @cd $(CLOSED)/uts/sparc/glm; $(MAKE) warlock;
+ $(WARLOCK) -c ./ses_with_glm.wlcmd $(SES_FILES) \
+ $(CLOSED)/uts/sparc/glm/glm \
../warlock/scsi.ll \
-l ../warlock/ddi_dki_impl.ll \
$(SCSI_FILES)
diff --git a/usr/src/uts/sparc/st/Makefile b/usr/src/uts/sparc/st/Makefile
index c3c37ea5bb..2b3ea8b9dd 100644
--- a/usr/src/uts/sparc/st/Makefile
+++ b/usr/src/uts/sparc/st/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -136,13 +135,13 @@ warlock_with_fas: st_with_fas.wlcmd $(ST_FILES) scsi_files fas_files \
warlock_with_isp: st_with_isp.wlcmd $(ST_FILES) scsi_files isp_files \
warlock_ddi.files
$(WARLOCK) -c ./st_with_isp.wlcmd \
- $(ST_FILES) ../isp/isp $(SCSI_FILES) \
+ $(ST_FILES) $(CLOSED)/uts/sparc/isp/isp $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
warlock_with_glm: st_with_glm.wlcmd $(ST_FILES) scsi_files glm_files \
warlock_ddi.files
$(WARLOCK) -c ./st_with_glm.wlcmd \
- $(ST_FILES) ../glm/glm $(SCSI_FILES) \
+ $(ST_FILES) $(CLOSED)/uts/sparc/glm/glm $(SCSI_FILES) \
-l ../warlock/ddi_dki_impl.ll
scsi_files:
@@ -155,10 +154,10 @@ fas_files:
@cd ../fas; pwd; $(MAKE) warlock
isp_files:
- @cd ../isp; pwd; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/isp; pwd; $(MAKE) warlock
glm_files:
- @cd ../glm; pwd; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/glm; pwd; $(MAKE) warlock
st.ok: st.wlcmd st.ll st_conf.ll scsi_files warlock_ddi.files
$(WARLOCK) -c ./st.wlcmd $(ST_FILES) $(SCSI_FILES) \
diff --git a/usr/src/uts/sparc/usb_ac/Makefile b/usr/src/uts/sparc/usb_ac/Makefile
index 34cf16ec7b..4b88b89aae 100644
--- a/usr/src/uts/sparc/usb_ac/Makefile
+++ b/usr/src/uts/sparc/usb_ac/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# uts/sparc/usb_ac/Makefile
@@ -108,7 +107,8 @@ OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
MIXER_FILES = $(MIXER_OBJS:%.o=../mixer/%.ll)
AUDIOSUP_FILES = $(AUDIO_SUP_OBJS:%.o=../audiosup/%.ll)
-AMSRC1_FILES = $(AMSRC1_OBJS:%.o=../amsrc1/%.ll)
+# AMSRC1_OBJS is only defined in the closed tree.
+AMSRC1_FILES = $(CLOSED)/uts/sparc/amsrc1/am_src1.ll
#
# Warlock targets
@@ -163,7 +163,7 @@ warlock_audiosup.files:
@cd ../audiosup; pwd; $(MAKE) warlock
warlock_amsrc1.files:
- @cd ../amsrc1; pwd; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/amsrc1; pwd; $(MAKE) warlock
warlock_mixer.files:
@cd ../mixer; pwd; $(MAKE) warlock
diff --git a/usr/src/uts/sparc/usb_as/Makefile b/usr/src/uts/sparc/usb_as/Makefile
index 3715032612..1139090c53 100644
--- a/usr/src/uts/sparc/usb_as/Makefile
+++ b/usr/src/uts/sparc/usb_as/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# uts/sparc/usb_as/Makefile
@@ -112,7 +111,8 @@ OHCI_FILES = $(OHCI_OBJS:%.o=../ohci/%.ll)
EHCI_FILES = $(EHCI_OBJS:%.o=../ehci/%.ll)
MIXER_FILES = $(MIXER_OBJS:%.o=../mixer/%.ll)
AUDIOSUP_FILES = $(AUDIO_SUP_OBJS:%.o=../audiosup/%.ll)
-AMSRC1_FILES = $(AMSRC1_OBJS:%.o=../amsrc1/%.ll)
+# AMSRC1_OBJS is only defined in the closed tree.
+AMSRC1_FILES = $(CLOSED)/uts/sparc/amsrc1/am_src1.ll
#
# Warlock targets
@@ -168,7 +168,7 @@ warlock_audiosup.files:
@cd ../audiosup; pwd; $(MAKE) warlock
warlock_amsrc1.files:
- @cd ../amsrc1; pwd; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/amsrc1; pwd; $(MAKE) warlock
warlock_mixer.files:
@cd ../mixer; pwd; $(MAKE) warlock
diff --git a/usr/src/uts/sparc/warlock/Makefile b/usr/src/uts/sparc/warlock/Makefile
index 74ee480347..66d9f7cb84 100644
--- a/usr/src/uts/sparc/warlock/Makefile
+++ b/usr/src/uts/sparc/warlock/Makefile
@@ -82,24 +82,24 @@ warlock.usb:
@cd ../usb_mid; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../usbprn; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../usbser; rm -f *.ll *.ok; $(MAKE) warlock
- @cd ../usbser_edge; rm -f *.ll *.ok; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/usbser_edge; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../usbsksp; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../usbsprl; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../usbskel; rm -f *.ll *.ok; $(MAKE) warlock
warlock.scsi:
- @cd ../dad; rm -f *.ll *.ok; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/dad; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../dada; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../esp; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../fas; rm -f *.ll *.ok; $(MAKE) warlock
- @cd ../glm; rm -f *.ll *.ok; $(MAKE) warlock
- @cd ../ifp; rm -f *.ll *.ok; $(MAKE) warlock
- @cd ../isp; rm -f *.ll *.ok; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/glm; rm -f *.ll *.ok; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/ifp; rm -f *.ll *.ok; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/isp; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../sd; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../ses; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../st; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../ssd; rm -f *.ll *.ok; $(MAKE) warlock
- @cd ../uata; rm -f *.ll *.ok; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/uata; rm -f *.ll *.ok; $(MAKE) warlock
warlock.1394:
@cd ../s1394; rm -f *.ll *.ok; $(MAKE) warlock
@@ -112,24 +112,24 @@ warlock.ecpp:
warlock.audio:
@cd ../audiosup; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../mixer; rm -f *.ll *.ok; $(MAKE) warlock
- @cd ../amsrc1; rm -f *.ll *.ok; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/amsrc1; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../amsrc2; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../audio1575; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../audio810; rm -f *.ll *.ok; $(MAKE) warlock
- @cd ../audiovia823x; rm -f *.ll *.ok; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/audiovia823x; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../audiocs; rm -f *.ll *.ok; $(MAKE) warlock
- @cd ../audioens; rm -f *.ll *.ok; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/audioens; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../audiots; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../usb_ac; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../usb_as; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../usb_ah; rm -f *.ll *.ok; $(MAKE) warlock
warlock.smartcard:
- @cd ../../sun4u/scmi2c; rm -f *.ll *.ok; make warlock
+ @cd $(CLOSED)/uts/sun4u/scmi2c; rm -f *.ll *.ok; $(MAKE) warlock
warlock.ib:
@cd ../ibmf; rm -f *.ll *.ok; $(MAKE) warlock
- @cd ../tavor; rm -f *.ll *.ok; $(MAKE) warlock
+ @cd $(CLOSED)/uts/sparc/tavor; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../ib; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../ibtl; rm -f *.ll *.ok; $(MAKE) warlock
@cd ../ibcm; rm -f *.ll *.ok; $(MAKE) warlock
diff --git a/usr/src/uts/sun/Makefile.files b/usr/src/uts/sun/Makefile.files
index 7905c8264d..a54d45269d 100644
--- a/usr/src/uts/sun/Makefile.files
+++ b/usr/src/uts/sun/Makefile.files
@@ -27,9 +27,9 @@
#
# uts/sun/Makefile.files
#
-# This Makefile defines all file modules and build rules for the
-# directory uts/sun and it's children. These are the source files which
-# are common to all sun implementations.
+# This Makefile defines file modules and build rules for the directory
+# uts/sun and its children. These are the source files which are
+# common to all sun implementations.
#
#
@@ -62,14 +62,8 @@ FAS_OBJS += fas.o fas_callbacks.o
FD_OBJS += fd.o
-IFP_OBJS += ifp.o ifp_fw.o
-
-ISP_OBJS += isp.o isp_sbus_fw.o isp_1040_fw.o isp_cmds.o
-
MS_OBJS += ms.o
-SF_OBJS += sf.o
-
HME_OBJS += hme.o
ERI_OBJS += eri.o
@@ -80,20 +74,12 @@ SD_OBJS += sd.o sd_xbuf.o
CMLB_OBJS += cmlb.o
-DAD_OBJS += dad.o
-
DADA_OBJS += dcd_hba.o dcd_transport.o \
dcd_control.o dcd_resource.o dcd_confsubr.o dcd_subr.o \
dcd_confdata.o
-ATA_OBJS += ata_common.o atapi.o ata_disk.o ghd.o ghd_scsi.o \
- ghd_debug.o ghd_scsa.o ghd_gcmd.o ghd_queue.o ghd_timer.o \
- ghd_waitq.o cmd.o acersb.o sil.o
-
SSD_OBJS += sd.o sd_xbuf.o
-SOCAL_OBJS += socal.o socal_ucode.o
-
STP4020_OBJS += stp4020.o
WSDRV_OBJS += wsdrv.o
diff --git a/usr/src/uts/sun/Makefile.rules b/usr/src/uts/sun/Makefile.rules
index 92ba7a77a7..d991468383 100644
--- a/usr/src/uts/sun/Makefile.rules
+++ b/usr/src/uts/sun/Makefile.rules
@@ -60,14 +60,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/sun/io/ttymux/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun/io/dada/adapters/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun/io/dada/adapters/ghd/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/sun/io/dada/conf/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -76,15 +68,9 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/sun/io/dada/impl/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun/io/dada/targets/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/esp.o := CFLAGS += -dalign
$(OBJS_DIR)/fas.o := CFLAGS += -dalign
$(OBJS_DIR)/fas_callbacks.o := CFLAGS += -dalign
-$(OBJS_DIR)/ifp.o := CFLAGS += -dalign
-$(OBJS_DIR)/isp.o := CFLAGS += -dalign
$(OBJS_DIR)/sf.o := CFLAGS += -dalign
$(OBJS_DIR)/%.o: $(UTSBASE)/sun/io/scsi/adapters/%.c
$(COMPILE.c) -o $@ $<
@@ -116,15 +102,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/sun/io/scsi/adapters/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun/io/scsi/targets/%.c
@($(LHEAD) $(LINT.c) -I. $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun/io/dada/targets/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun/io/dada/adapters/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun/io/dada/adapters/ghd/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun/io/dada/impl/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
diff --git a/usr/src/uts/sun/io/scsi/inc.flg b/usr/src/uts/sun/io/scsi/inc.flg
index b3e4f5bc61..a416b2c271 100644
--- a/usr/src/uts/sun/io/scsi/inc.flg
+++ b/usr/src/uts/sun/io/scsi/inc.flg
@@ -24,7 +24,7 @@
#ident "%Z%%M% %I% %E% SMI"
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# This file brings down all that is needed to build just
@@ -34,26 +34,31 @@
find_files "s.*" \
usr/src/uts/common/io/warlock \
usr/src/uts/common/io/scsi \
+ usr/closed/uts/common/io/scsi \
usr/src/uts/common/sys \
- usr/src/uts/sparc/dad \
+ usr/closed/uts/common/sys \
+ usr/closed/uts/sparc/dad \
usr/src/uts/sparc/dada \
usr/src/uts/sparc/esp \
usr/src/uts/sparc/fas \
- usr/src/uts/sparc/glm \
- usr/src/uts/sparc/ifp \
- usr/src/uts/sparc/isp \
+ usr/closed/uts/sparc/glm \
+ usr/closed/uts/sparc/ifp \
+ usr/closed/uts/sparc/isp \
usr/src/uts/sparc/scsi \
usr/src/uts/sparc/sd \
usr/src/uts/sparc/ses \
- usr/src/uts/sparc/sgen \
- usr/src/uts/sparc/socal \
+ usr/closed/uts/sparc/sgen \
+ usr/closed/uts/sparc/socal \
usr/src/uts/sparc/ssd \
usr/src/uts/sparc/st \
- usr/src/uts/sparc/uata \
+ usr/closed/uts/sparc/uata \
usr/src/uts/sparc/warlock \
usr/src/uts/sun/io/dada \
+ usr/closed/uts/sun/io/dada \
usr/src/uts/sun/sys/dada \
- usr/src/uts/sun/sys/scsi
+ usr/closed/uts/sun/sys/dada \
+ usr/src/uts/sun/sys/scsi \
+ usr/closed/uts/sun/sys/scsi
find_files "s.*.h" \
usr/src/uts/sparc/sys \
@@ -73,7 +78,9 @@ echo_file usr/src/uts/Makefile
echo_file usr/src/uts/Makefile.targ
echo_file usr/src/uts/Makefile.uts
echo_file usr/src/uts/common/Makefile.files
+echo_file usr/closed/uts/common/Makefile.files
echo_file usr/src/uts/common/Makefile.rules
+echo_file usr/closed/uts/common/Makefile.rules
echo_file usr/src/uts/common/vm/as.h
echo_file usr/src/uts/common/vm/faultcode.h
echo_file usr/src/uts/common/vm/hat.h
@@ -85,18 +92,24 @@ echo_file usr/src/uts/sparc/Makefile
echo_file usr/src/uts/sparc/Makefile.files
echo_file usr/src/uts/sparc/Makefile.rules
echo_file usr/src/uts/sparc/Makefile.sparc
+echo_file usr/src/uts/sparc/Makefile.sparc.shared
+echo_file usr/closed/uts/sparc/Makefile.sparc
echo_file usr/src/uts/sparc/Makefile.targ
+echo_file usr/src/uts/sparc/Makefile.targ.shared
+echo_file usr/closed/uts/sparc/Makefile.targ
echo_file usr/src/uts/sparc/ml/sparc.il
echo_file usr/src/uts/sparc/req.flg
echo_file usr/src/uts/sun/Makefile.files
+echo_file usr/closed/uts/sun/Makefile.files
echo_file usr/src/uts/sun/Makefile.rules
-echo_file usr/src/uts/sun/io/socal.c
-echo_file usr/src/uts/sun/io/socal_ucode.c
+echo_file usr/closed/uts/sun/Makefile.rules
+echo_file usr/closed/uts/sun/io/socal.c
+echo_file usr/closed/uts/sun/io/socal_ucode.c
echo_file usr/src/uts/sun/sys/dmaga.h
echo_file usr/src/uts/sun/sys/obpdefs.h
echo_file usr/src/uts/sun/sys/promif.h
-echo_file usr/src/uts/sun/sys/socal_cq_defs.h
-echo_file usr/src/uts/sun/sys/socalmap.h
+echo_file usr/closed/uts/sun/sys/socal_cq_defs.h
+echo_file usr/closed/uts/sun/sys/socalmap.h
echo_file usr/src/uts/sun/sys/socalreg.h
-echo_file usr/src/uts/sun/sys/socalvar.h
+echo_file usr/closed/uts/sun/sys/socalvar.h
echo_file usr/src/uts/sun/sys/socalio.h
diff --git a/usr/src/uts/sun/sys/Makefile b/usr/src/uts/sun/sys/Makefile
index ae60e407a2..f16c67c238 100644
--- a/usr/src/uts/sun/sys/Makefile
+++ b/usr/src/uts/sun/sys/Makefile
@@ -55,21 +55,28 @@ obpdefs.h pixrect.h \
pr_impl_util.h pr_planegroups.h \
promif.h promimpl.h \
ramdac.h ser_async.h ser_zscc.h \
-socalvar.h socalreg.h socalmap.h \
-socalio.h socal_cq_defs.h \
+socalio.h socalreg.h \
stp4020_reg.h stp4020_var.h \
ttymux.h ttymuxuser.h \
zsdev.h
+CLOSED_HDRS= \
+socal_cq_defs.h socalmap.h socalvar.h
+
AUDIOHDRS= \
audio_4231.h \
audio1575.h
SCSIADHDRS= \
espcmd.h espreg.h espvar.h fascmd.h fasdma.h \
-fasreg.h fasvar.h sfvar.h \
-ifpcmd.h ifpvar.h ifpio.h ifpmail.h ifpreg.h \
-ispcmd.h ispmail.h ispreg.h ispvar.h
+fasreg.h fasvar.h ifpio.h
+
+CLOSED_SCSIAD = $(CLOSED)/uts/sun/sys/scsi/adapters
+
+CLOSED_SCSIADHDRS= \
+ifpcmd.h ifpmail.h ifpreg.h ifpvar.h \
+ispcmd.h ispmail.h ispreg.h ispvar.h \
+sfvar.h
SCSITARGHDRS= \
@@ -80,9 +87,12 @@ ROOTDIRS= $(ROOTDIR) \
$(ROOTDIR)/scsi/targets
ROOTHDRS= $(HDRS:%=$(ROOTDIR)/%)
+$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(ROOTDIR)/%)
ROOTAUDHDRS= $(AUDIOHDRS:%=$(ROOTDIR)/audio/%)
ROOTFCHDRS= $(FCHDRS:%=$(ROOTDIR)/fc4/%)
ROOTSCSIADHDRS= $(SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%)
+$(CLOSED_BUILD)ROOTSCSIADHDRS += \
+ $(CLOSED_SCSIADHDRS:%=$(ROOTDIR)/scsi/adapters/%)
ROOTSCSITARGHDRS= $(SCSITARGHDRS:%=$(ROOTDIR)/scsi/targets/%)
@@ -90,12 +100,18 @@ ROOTSCSITARGHDRS= $(SCSITARGHDRS:%=$(ROOTDIR)/scsi/targets/%)
$(ROOTDIR)/%: %
$(INS.file)
+$(ROOTDIR)/%: $(CLOSED)/uts/sun/sys/%
+ $(INS.file)
+
$(ROOTDIR)/audio/%: audio/%
$(INS.file)
$(ROOTDIR)/scsi/adapters/%: scsi/adapters/%
$(INS.file)
+$(ROOTDIR)/scsi/adapters/%: $(CLOSED_SCSIAD)/%
+ $(INS.file)
+
$(ROOTDIR)/scsi/targets/%: scsi/targets/%
$(INS.file)
@@ -117,6 +133,9 @@ CHECKHDRS= \
$(SCSIADHDRS:%.h=scsi/adapters/%.check) \
$(SCSITARGHDRS:%.h=scsi/targets/%.check)
+$(CLOSED_BUILD)CHECKHDRS += \
+ $(CLOSED_HDRS:%.h=$(CLOSED)/uts/sun/sys/%.check) \
+ $(CLOSED_SCSIADHDRS:%.h=$(CLOSED_SCSIAD)/%.check)
# headers which won't quite meet the standards...
#
diff --git a/usr/src/uts/sun4u/Makefile b/usr/src/uts/sun4u/Makefile
index a795c6cfde..0c849ab7d2 100644
--- a/usr/src/uts/sun4u/Makefile
+++ b/usr/src/uts/sun4u/Makefile
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -49,6 +49,7 @@ SPARC_LINTS =
#
LINT_LIBS = $(LINT_LIB) \
$(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
+ $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
$(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
# EXPORT DELETE START
@@ -58,8 +59,11 @@ LINT_LIBS = $(LINT_LIB) \
# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
# should not be listed in the lint target.
#
-CRYPTO_EK_KMODS += aes256
-CRYPTO_EK_KMODS += arcfour2048
+# Don't build these for OpenSolaris, since they will be replaced by
+# binaries that are signed by Sun RE.
+#
+$(CLOSED_BUILD)CRYPTO_EK_KMODS += aes256
+$(CLOSED_BUILD)CRYPTO_EK_KMODS += arcfour2048
# EXPORT DELETE END
@@ -72,38 +76,71 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
.KEEP_STATE:
-.PARALLEL: $(KMODS) $(XMODS)
+.PARALLEL: $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
+ $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS) \
+ modlist modlist.sparc
# Override for CPU_KMODS... they cannot be built
# in parallel
.NO_PARALLEL: $(CPU_KMODS)
-def all clean clobber clean.lint: genassym unix .WAIT $(KMODS) $(XMODS) \
- $(IMPLEMENTATIONS)
+def all clean clobber clean.lint: genassym unix .WAIT \
+ $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
+ $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS)
+
+# list the modules under sun4u.
+modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
+ $(IMPLEMENTATIONS:.WAIT=) $(CLOSED_IMPLEMENTATIONS)
+
+# list the modules for Install -k sun4u.
+modlist.karch: modlist modlist.sparc
-install: install_platforms genassym unix .WAIT $(KMODS) $(XMODS) \
- $(IMPLEMENTATIONS)
+modlist.sparc:
+ @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
+
+install: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \
+ $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS)
lintlib: unix
-modlintlib: $(LINT_KMODS)
+modlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS)
+
+genassym unix $(KMODS): FRC
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(IMPLEMENTATIONS): FRC
+ @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
-genassym unix $(KMODS) $(IMPLEMENTATIONS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+$(CLOSED_IMPLEMENTATIONS): FRC
+ cd $(CLOSED)/uts/sun4u/$@; pwd; \
+ THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET); \
$(XMODS): FRC
@if [ -f $@/Makefile ]; then \
- cd $@; pwd; $(MAKE) $(TARGET); \
+ cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
else \
true; \
fi
-install_h check: install_platforms $(IMPLEMENTATIONS) FRC
+$(CLOSED_XMODS): FRC
+ @if [ -f $(CLOSED)/uts/sun4u/$@/Makefile ]; then \
+ cd $(CLOSED)/uts/sun4u/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
+ else \
+ true; \
+ fi
+
+$(CLOSED_KMODS): FRC
+ cd $(CLOSED)/uts/sun4u/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+install_h check: install_platforms $(IMPLEMENTATIONS) \
+ $(CLOSED_IMPLEMENTATIONS) FRC
@cd sys; pwd; $(MAKE) $(TARGET)
@cd vm; pwd; $(MAKE) $(TARGET)
@@ -172,7 +209,7 @@ globallint:
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
lint: lintlib .WAIT modlintlib .WAIT $(SPARC_LINTS) $(LINT_DEPS) \
- $(IMPLEMENTATIONS) $(CPU_KMODS)
+ $(IMPLEMENTATIONS) $(CLOSED_IMPLEMENTATIONS) $(CPU_KMODS)
# EXPORT DELETE START
@@ -191,7 +228,11 @@ include ../Makefile.targ
# Cross-reference customization: build a cross-reference over all of the
# sun4u-related directories.
#
-XRDIRS = ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
+SHARED_XRDIRS = ../sun4u ../sun4 ../sfmmu ../sparc ../sun ../common
+CLOSED_XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%)
+XRDIRS = $(SHARED_XRDIRS)
+$(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS:../../../closed/uts/sfmmu=)
+
XRPRUNE = i86pc
cscope.out tags: FRC
diff --git a/usr/src/uts/sun4u/Makefile.files b/usr/src/uts/sun4u/Makefile.files
index f6b6dc2323..cfd74ca088 100644
--- a/usr/src/uts/sun4u/Makefile.files
+++ b/usr/src/uts/sun4u/Makefile.files
@@ -102,12 +102,8 @@ GRBEEP_OBJS += grbeep.o
ADM1031_OBJS += adm1031.o
ICS951601_OBJS += ics951601.o
PPM_OBJS += ppm_subr.o ppm.o
-GPTWOCFG_OBJS += gptwocfg.o
-GPTWO_CPU_OBJS += gptwo_cpu.o
PCICFG_E_OBJS += pcicfg.e.o
PCF8584_OBJS += pcf8584.o
-MI2CV_OBJS += mi2cv.o
-I2BSC_OBJS += i2bsc.o
PCA9556_OBJS += pca9556.o
ADM1026_OBJS += adm1026.o
BBC_OBJS += bbc_beep.o
@@ -115,7 +111,6 @@ TDA8444_OBJS += tda8444.o
MAX1617_OBJS += max1617.o
SEEPROM_OBJS += seeprom.o
I2C_SVC_OBJS += i2c_svc.o
-SCMI2C_OBJS += scmi2c.o
SMBUS_OBJS += smbus.o
SCHPPM_OBJS += schppm.o
MC_OBJS += mc-us3.o mc-us3_asm.o
@@ -129,18 +124,12 @@ PIC16F747_OBJS += pic16f747.o
PIC16F819_OBJS += pic16f819.o
PCF8574_OBJS += pcf8574.o
PCF8591_OBJS += pcf8591.o
-SMBUS_ARA_OBJS += smbus_ara.o
SSC050_OBJS += ssc050.o
SSC100_OBJS += ssc100.o
PMUBUS_OBJS += pmubus.o
PMUGPIO_OBJS += pmugpio.o
-RMC_COMM_OBJS += rmc_comm.o rmc_comm_crctab.o rmc_comm_dp.o rmc_comm_drvintf.o
-RMCLOMV_OBJS += rmclomv.o
-RMCADM_OBJS += rmcadm.o
-TODM5819P_RMC_OBJS += todm5819p_rmc.o
PMC_OBJS += pmc.o
TRAPSTAT_OBJS += trapstat.o
-WRSMD_OBJS += wrsmd.o
WRSM_OBJS += wci_common.o \
wrsm_barrier.o \
wrsm_cf.o \
@@ -162,24 +151,10 @@ WRSM_OBJS += wci_common.o \
wrsm_session.o \
wrsm_tl.o \
wrsm_trap.o
-MEMTEST_OBJS += memtest.o memtest_asm.o \
- memtest_u.o memtest_u_asm.o \
- memtest_ch.o memtest_ch_asm.o \
- memtest_chp.o memtest_chp_asm.o \
- memtest_ja.o memtest_ja_asm.o \
- memtest_jg.o memtest_jg_asm.o \
- memtest_pn.o memtest_pn_asm.o \
- memtest_cmp.o memtest_cmp_asm.o \
- memtest_sf.o memtest_sf_asm.o \
- memtest_sr.o memtest_sr_asm.o
ZULUVM_OBJS += zuluvm.o zulu_asm.o zulu_hat.o zulu_hat_asm.o
JBUSPPM_OBJS += jbusppm.o
-M1535PPM_OBJS += m1535ppm.o
DMFE_OBJS += dmfe_log.o dmfe_main.o dmfe_mii.o dmfe_ndd.o
-CTSMC_OBJS += ctsmc_buf.o ctsmc_queue.o ctsmc_hw.o ctsmc_kstat.o \
- ctsmc_cmdspec.o ctsmc_i2c.o ctsmc_minor.o ctsmc_stream.o \
- ctsmc_ddi.o ctsmc_ipmlist.o ctsmc_seq.o
#
# kernel cryptographic framework
@@ -204,8 +179,6 @@ TODDS1337_OBJS += todds1337.o
TODM5823_OBJS += todm5823.o
TODSTARFIRE_OBJS += todstarfire.o
TODBLADE_OBJS += todblade.o
-TODSG_OBJS += todsg.o
-TODSTARCAT_OBJS += todstarcat.o
TODM5819_OBJS += todm5819.o
TODBQ4802_OBJS += todbq4802.o
diff --git a/usr/src/uts/sun4u/Makefile.rules b/usr/src/uts/sun4u/Makefile.rules
index 35a6c912ac..c655befde5 100644
--- a/usr/src/uts/sun4u/Makefile.rules
+++ b/usr/src/uts/sun4u/Makefile.rules
@@ -47,6 +47,12 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/cpu/%.c
$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/cpu/%.s
$(COMPILE.s) -o $@ $<
+#
+# This rule for io/ppm/%.c needs to come before the io/%.c rule so that
+# the sun4u/ppm driver pulls in io/ppm/ppm.c instead of io/ppm.c.
+# Making an explicit rule to build ppm.o doesn't work because it breaks
+# the build of excalibur/xcalppm
+#
$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/ppm/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -67,20 +73,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/i2c/nexus/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/memtest/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4/io/memtest/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/memtest/%.s
- $(COMPILE.s) -o $@ $<
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4/io/memtest/%.s
- $(COMPILE.s) -o $@ $<
-
$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/pci/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -106,10 +98,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/dmfe/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/io/ctsmc/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/ml/%.s
$(COMPILE.s) -o $@ $<
@@ -214,18 +202,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/i2c/misc/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/i2c/nexus/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/memtest/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4/io/memtest/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/memtest/%.s
- @($(LHEAD) $(LINT.s) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4/io/memtest/%.s
- @($(LHEAD) $(LINT.s) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/pci/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
@@ -247,9 +223,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/wrsm/%.s
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/dmfe/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/io/ctsmc/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/ml/%.s
@($(LHEAD) $(LINT.s) $< $(LTAIL))
diff --git a/usr/src/uts/sun4u/Makefile.sun4u b/usr/src/uts/sun4u/Makefile.sun4u
index 3b80b2bb51..3edae8fd87 100644
--- a/usr/src/uts/sun4u/Makefile.sun4u
+++ b/usr/src/uts/sun4u/Makefile.sun4u
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,451 +18,12 @@
#
# CDDL HEADER END
#
-#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
-# This makefile contains the common definitions for the sun4u unix
-# and all sun4u implementation architecture dependent modules.
-#
-
-#
-# Machine type (implementation architecture):
-#
-PLATFORM = sun4u
-PROMIF = ieee1275
-PSMBASE = $(UTSBASE)/../psm
-
-#
-# Definitions for the platform-specific /platform directories.
-#
-# PLATFORMS designates those sun4u machines which have no platform
-# specific code.
-#
-# IMPLEMENTATIONS is used to designate sun4u machines which do have
-# platform specific modules (perhaps including their own unix). All
-# code specific to a given implementation resides in the appropriately
-# named subdirectory. This requires these platforms to have their
-# own Makefiles to define ROOT_PLAT_DIRS, USR_PLAT_DIRS, etc.
-#
-# So if we had an implementation named 'foo', we would need the following
-# Makefiles in the foo subdirectory:
-#
-# sun4u/foo/Makefile
-# sun4u/foo/Makefile.foo
-# sun4u/foo/Makefile.targ
-#
-
-#
-# /usr/platform/$(IMPLEMENTED_PLATFORM) is created as a directory that
-# all the $(LINKED_PLATFORMS) link to.
-#
-IMPLEMENTED_PLATFORM = SUNW,Ultra-2
-
-LINKED_PLATFORMS += SUNW,Ultra-30
-LINKED_PLATFORMS += SUNW,Ultra-60
-
-#
-# all PLATFORMS that do not belong in the $(IMPLEMENTATIONS) list
-# ie. all desktop platforms
-#
-PLATFORMS = $(IMPLEMENTED_PLATFORM)
-PLATFORMS += $(LINKED_PLATFORMS)
-
-# IMPLEMENTATIONS is used by Install.sh, must not use backslash to continue
-# the lines.
-IMPLEMENTATIONS = tazmo .WAIT
-IMPLEMENTATIONS += sunfire .WAIT
-IMPLEMENTATIONS += starfire .WAIT
-IMPLEMENTATIONS += javelin .WAIT
-IMPLEMENTATIONS += darwin .WAIT
-IMPLEMENTATIONS += quasar .WAIT
-IMPLEMENTATIONS += grover .WAIT
-IMPLEMENTATIONS += enchilada .WAIT
-IMPLEMENTATIONS += taco .WAIT
-IMPLEMENTATIONS += mpxu .WAIT
-IMPLEMENTATIONS += ents .WAIT
-IMPLEMENTATIONS += chalupa .WAIT
-IMPLEMENTATIONS += excalibur .WAIT
-IMPLEMENTATIONS += montecarlo .WAIT
-IMPLEMENTATIONS += makaha .WAIT
-IMPLEMENTATIONS += serengeti .WAIT
-IMPLEMENTATIONS += lw8 .WAIT
-IMPLEMENTATIONS += littleneck .WAIT
-IMPLEMENTATIONS += starcat .WAIT
-IMPLEMENTATIONS += daktari .WAIT
-IMPLEMENTATIONS += cherrystone .WAIT
-IMPLEMENTATIONS += fjlite .WAIT
-IMPLEMENTATIONS += lw2plus .WAIT
-IMPLEMENTATIONS += snowbird .WAIT
-IMPLEMENTATIONS += schumacher .WAIT
-IMPLEMENTATIONS += blade .WAIT
-IMPLEMENTATIONS += boston .WAIT
-IMPLEMENTATIONS += seattle .WAIT
-IMPLEMENTATIONS += chicago
-
-
-ROOT_PLAT_DIRS = $(PLATFORMS:%=$(ROOT_PLAT_DIR)/%)
-USR_PLAT_DIRS = $(PLATFORMS:%=$(USR_PLAT_DIR)/%)
-
-USR_DESKTOP_DIR = $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM)
-USR_DESKTOP_INC_DIR = $(USR_DESKTOP_DIR)/include
-USR_DESKTOP_SBIN_DIR = $(USR_DESKTOP_DIR)/sbin
-USR_DESKTOP_LIB_DIR = $(USR_DESKTOP_DIR)/lib
-
-#
-# Welcome to SPARC V9.
-#
-
-#
-# Define supported builds
-#
-DEF_BUILDS = $(DEF_BUILDS64)
-ALL_BUILDS = $(ALL_BUILDS64)
-
-#
-# Everybody needs to know how to build modstubs.o and to locate unix.o
-#
-UNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix
-GENLIB_DIR = $(UTSBASE)/$(PLATFORM)/genunix
-MODSTUBS_DIR = $(UNIX_DIR)
-DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
-LINTS_DIR = $(OBJS_DIR)
-LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
-
-DTRACESTUBS_O = $(OBJS_DIR)/dtracestubs.o
-DTRACESTUBS = $(OBJS_DIR)/libdtracestubs.so
-
-UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
-MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
-GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
-
-LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
-GEN_LINT_LIB = $(LINT_LIB_DIR)/llib-lgenunix.ln
-
-LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/$(PLATFORM)/lint-libs/%)
-LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln)
-
-#
-# cpu and platform modules need to know how to build their own symcheck module
-#
-PLATMOD = platmod
-PLATLIB = $(PLAT_DIR)/$(OBJS_DIR)/libplatmod.so
-
-CPUNAME = cpu
-CPULIB = $(CPU_DIR)/$(OBJS_DIR)/libcpu.so
-
-SYM_MOD = $(OBJS_DIR)/unix.sym
-
-#
-# Include the makefiles which define build rule templates, the
-# collection of files per module, and a few specific flags. Note
-# that order is significant, just as with an include path. The
-# first build rule template which matches the files name will be
-# used. By including these in order from most machine dependent
-# to most machine independent, we allow a machine dependent file
-# to be used in preference over a machine independent version
-# (Such as a machine specific optimization, which preserves the
-# interfaces.)
-#
-include $(UTSBASE)/sun4/Makefile.files
-include $(UTSBASE)/$(PLATFORM)/Makefile.files
-include $(UTSBASE)/sfmmu/Makefile.files
-include $(UTSBASE)/sparc/v9/Makefile.files
-include $(UTSBASE)/sparc/Makefile.files
-include $(UTSBASE)/sun/Makefile.files
-include $(SRC)/psm/promif/$(PROMIF)/common/Makefile.files
-include $(SRC)/psm/promif/$(PROMIF)/$(PLATFORM)/Makefile.files
-include $(UTSBASE)/common/Makefile.files
-
-#
-# Include machine independent rules. Note that this does not imply
-# that the resulting module from rules in Makefile.uts is machine
-# independent. Only that the build rules are machine independent.
-#
-include $(UTSBASE)/Makefile.uts
-
-#
-# machine specific optimization, override default in Makefile.master
-#
-CC_XARCH = -xarch=v9a
-AS_XARCH = -xarch=v9a
-COPTIMIZE = -xO3
-CCMODE = -Xa
-
-CFLAGS = -xchip=ultra $(CCABS32) $(CCREGSYM)
-CFLAGS += $(CC_XARCH)
-CFLAGS += $(COPTIMIZE)
-CFLAGS += $(EXTRA_CFLAGS)
-CFLAGS += $(XAOPT)
-CFLAGS += $(INLINES) -D_ASM_INLINES
-CFLAGS += $(CCMODE)
-CFLAGS += $(SPACEFLAG)
-CFLAGS += $(CERRWARN)
-CFLAGS += $(CTF_FLAGS)
-CFLAGS += $(C99MODE)
-CFLAGS += $(CCUNBOUND)
-CFLAGS += -xregs=no%float
-
-ASFLAGS += $(AS_XARCH)
-
-AS_INC_PATH += -I$(DSF_DIR)/$(OBJS_DIR)
-
-LINT_KMODS += $(GENUNIX_KMODS)
-
-LINT_DEFS = -Xarch=v9
-
-#
-# The following must be defined for all implementations:
-#
-# MAPFILE: ld mapfile for the build of kernel/unix.
-# MODSTUBS: Module stubs source file.
-# GENCONST_SRC: genconst.c
-# OFFSETS: offsets.in
-# PLATFORM_OFFSETS: Platform specific mach_offsets.in
-# FDOFFSETS: fd_offsets.in
-#
-MAPFILE = $(UTSBASE)/sun4/conf/Mapfile
-MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s
-GENCONST_SRC = $(UTSBASE)/sun4/ml/genconst.c
-OFFSETS = $(UTSBASE)/sun4/ml/offsets.in
-PLATFORM_OFFSETS = $(UTSBASE)/sun4u/ml/mach_offsets.in
-FDOFFSETS = $(UTSBASE)/sun/io/fd_offsets.in
-
-#
-# Define the actual specific platforms
-#
-
-MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU
-
-$(MPSAS_BUILD)MACHINE_DEFS += -DMPSAS
-
-#
-# Software workarounds for hardware "features"
-#
-include $(UTSBASE)/$(PLATFORM)/Makefile.workarounds
+UTSTREE=$(UTSBASE)
-#
-# Debugging level
-#
-# Special knowledge of which special debugging options effect which
-# file is used to optimize the build if these flags are changed.
-#
-# XXX: The above could possibly be done for more flags and files, but
-# is left as an experiment to the interested reader. Be forewarned,
-# that excessive use could lead to maintenance difficulties.
-#
-# Note: kslice can be enabled for the sun4u, but is disabled by default
-# in all cases.
-#
-
-DEBUG_DEFS_OBJ64 =
-DEBUG_DEFS_DBG64 = -DDEBUG
-DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
-
-DEBUG_COND_OBJ64 :sh = echo \\043
-DEBUG_COND_DBG64 =
-IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
-
-$(IF_DEBUG_OBJ)trap.o := DEBUG_DEFS += -DTRAPDEBUG
-$(IF_DEBUG_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPDEBUG
-$(IF_DEBUG_OBJ)syscall_trap.o := DEBUG_DEFS += -DSYSCALLTRACE
-$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=0
-
-IF_TRAPTRACE_OBJ = $(IF_DEBUG_OBJ)
-# comment this out for a non-debug kernel with TRAPTRACE
-#IF_TRAPTRACE_OBJ = $(OBJS_DIR)/
-
-$(IF_TRAPTRACE_OBJ)locore.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_locore.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mlsetup.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)syscall_trap.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)startup.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_startup.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)cpu_states.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_cpu_states.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)interrupt.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_interrupt.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_sfmmu_asm.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)sfmmu_asm.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)trap_table.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)xc.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_xc.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)wbuf.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)trap.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)cheetah_asm.o := DEBUG_DEFS += -DTRAPTRACE
-
-# Comment these out if you don't want dispatcher lock statistics.
-
-#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_LOCK_STATS
-#$(IF_DEBUG_OBJ)disp.o := DEBUG_DEFS += -DDISP_LOCK_STATS
-
-# Comment these out if you don't want dispatcher debugging
-
-#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_DEBUG
-
-#
-# Build `options'. These are mostly historical and the need for these
-# is largely removed by the module technology. However, the static
-# build will continue to require these.
-#
-OPTION_DEFS = -DC2_AUDIT
-
-#
-# Collect the preprocessor definitions to be associated with *all*
-# files.
-#
-ALL_DEFS = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \
- $(OPTION_DEFS)
-GENCONST_DEFS = $(MACHINE_DEFS) $(OPTION_DEFS)
-
-#
-# ----- TRANSITIONAL SECTION --------------------------------------------------
-#
-
-#
-# Not everything which *should* be a module is a module yet. The
-# following is a list of such objects which are currently part of
-# the base kernel but should soon become kmods.
-#
-MACH_NOT_YET_KMODS = $(AUTOCONF_OBJS)
-
-#
-# ----- END OF TRANSITIONAL SECTION -------------------------------------------
-#
-
-#
-# The kernels modules which are "implementation architecture"
-# specific for this machine are enumerated below. Note that most
-# of these modules must exist (in one form or another) for each
-# architecture.
-#
-# Common Drivers (usually pseudo drivers) (/kernel/drv):
-#
-
-#
-# Machine Specific Driver Modules (/kernel/drv):
-#
-# XXX: How many of these are really machine specific?
-#
-DRV_KMODS += bbc_beep
-DRV_KMODS += cgsix
-DRV_KMODS += cpc
-DRV_KMODS += dma fd
-DRV_KMODS += rootnex sbusmem upa64s zs zsh
-DRV_KMODS += sbus
-DRV_KMODS += pcisch pcipsy simba
-DRV_KMODS += px
-DRV_KMODS += ebus
-DRV_KMODS += su
-DRV_KMODS += tod
-DRV_KMODS += sf
-DRV_KMODS += power
-DRV_KMODS += epic
-DRV_KMODS += fcode
-DRV_KMODS += grbeep
-DRV_KMODS += pcf8584 mi2cv i2bsc max1617 seeprom tda8444 pca9556 ics951601 adm1031
-DRV_KMODS += lm75 ltc1427 pcf8591 pcf8574 smbus_ara ssc050 ssc100
-DRV_KMODS += pic16f819
-DRV_KMODS += pic16f747
-DRV_KMODS += scmi2c
-DRV_KMODS += adm1026
-DRV_KMODS += us
-DRV_KMODS += ppm schppm jbusppm m1535ppm
-DRV_KMODS += mc-us3
-DRV_KMODS += mc-us3i
-DRV_KMODS += smbus
-DRV_KMODS += db21554
-DRV_KMODS += gpio_87317
-DRV_KMODS += isadma
-DRV_KMODS += sbbc
-DRV_KMODS += pmubus
-DRV_KMODS += pmugpio
-DRV_KMODS += rmcadm
-DRV_KMODS += rmc_comm
-DRV_KMODS += rmclomv
-DRV_KMODS += pmc
-DRV_KMODS += wrsmd
-DRV_KMODS += memtest
-DRV_KMODS += trapstat
-DRV_KMODS += dmfe
-DRV_KMODS += ctsmc
-
-#
-# Exec Class Modules (/kernel/exec):
-#
-EXEC_KMODS +=
-
-#
-# Scheduling Class Modules (/kernel/sched):
-#
-SCHED_KMODS +=
-
-#
-# File System Modules (/kernel/fs):
-#
-FS_KMODS +=
-
-#
-# Streams Modules (/kernel/strmod):
-#
-STRMOD_KMODS += kb
-
-#
-# 'System' Modules (/kernel/sys):
-#
-SYS_KMODS +=
-
-#
-# 'User' Modules (/kernel/misc):
-#
-MISC_KMODS += obpsym bootdev vis cpr platmod md5 sha1 i2c_svc
-MISC_KMODS += sbd
-
-MISC_KMODS += fcodem fcpci gptwocfg gptwo_cpu pcicfg.e
-MISC_KMODS += kmech_krb5
-MISC_KMODS += zuluvm
-
-#
-# Software Cryptographic Providers (/kernel/crypto):
-#
-CRYPTO_KMODS += aes
-CRYPTO_KMODS += arcfour
-CRYPTO_KMODS += des
-CRYPTO_KMODS += rsa
-
-#
-# generic-unix module (/kernel/genunix):
-#
-GENUNIX_KMODS += genunix
-
-# 'User' "Modules" excluded from the Full Kernel lint target:
-#
-NLMISC_KMODS += forthdebug
-
-#
-# Modules eXcluded from the product:
-#
-XMODS +=
-
-#
-# cpu modules
-#
-CPU_KMODS += cheetah cheetahplus jalapeno serrano spitfire hummingbird
-
-#
-# sun4u 'TOD' Modules (/platform/.../kernel/tod):
-#
-TOD_KMODS += todds1287 todds1337 todmostek todstarfire todsg todstarcat
-TOD_KMODS += todm5819 todm5819p_rmc todblade todm5823 todbq4802
-
-#
-# Performance Counter BackEnd Modules (/usr/kernel/pcbe):
-#
-PCBE_KMODS += us234_pcbe
+include $(UTSBASE)/sun4u/Makefile.sun4u.shared
diff --git a/usr/src/uts/sun4u/Makefile.sun4u.shared b/usr/src/uts/sun4u/Makefile.sun4u.shared
new file mode 100644
index 0000000000..2e79fe7ed8
--- /dev/null
+++ b/usr/src/uts/sun4u/Makefile.sun4u.shared
@@ -0,0 +1,480 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This makefile contains the common definitions for the sun4u unix
+# and all sun4u implementation architecture dependent modules.
+#
+
+#
+# Machine type (implementation architecture):
+#
+PLATFORM = sun4u
+PROMIF = ieee1275
+PSMBASE = $(UTSBASE)/../psm
+
+#
+# Definitions for the platform-specific /platform directories.
+#
+# PLATFORMS designates those sun4u machines which have no platform
+# specific code.
+#
+# IMPLEMENTATIONS is used to designate sun4u machines which do have
+# platform specific modules (perhaps including their own unix). All
+# code specific to a given implementation resides in the appropriately
+# named subdirectory. This requires these platforms to have their
+# own Makefiles to define ROOT_PLAT_DIRS, USR_PLAT_DIRS, etc.
+#
+# So if we had an implementation named 'foo', we would need the following
+# Makefiles in the foo subdirectory:
+#
+# sun4u/foo/Makefile
+# sun4u/foo/Makefile.foo
+# sun4u/foo/Makefile.targ
+#
+
+#
+# /usr/platform/$(IMPLEMENTED_PLATFORM) is created as a directory that
+# all the $(LINKED_PLATFORMS) link to.
+#
+IMPLEMENTED_PLATFORM = SUNW,Ultra-2
+
+LINKED_PLATFORMS += SUNW,Ultra-30
+LINKED_PLATFORMS += SUNW,Ultra-60
+
+#
+# all PLATFORMS that do not belong in the $(IMPLEMENTATIONS) list
+# ie. all desktop platforms
+#
+PLATFORMS = $(IMPLEMENTED_PLATFORM)
+PLATFORMS += $(LINKED_PLATFORMS)
+
+ROOT_PLAT_DIRS = $(PLATFORMS:%=$(ROOT_PLAT_DIR)/%)
+USR_PLAT_DIRS = $(PLATFORMS:%=$(USR_PLAT_DIR)/%)
+
+USR_DESKTOP_DIR = $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM)
+USR_DESKTOP_INC_DIR = $(USR_DESKTOP_DIR)/include
+USR_DESKTOP_SBIN_DIR = $(USR_DESKTOP_DIR)/sbin
+USR_DESKTOP_LIB_DIR = $(USR_DESKTOP_DIR)/lib
+
+#
+# Welcome to SPARC V9.
+#
+
+#
+# Define supported builds
+#
+DEF_BUILDS = $(DEF_BUILDS64)
+ALL_BUILDS = $(ALL_BUILDS64)
+
+#
+# Everybody needs to know how to build modstubs.o and to locate unix.o
+#
+UNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix
+GENLIB_DIR = $(UTSBASE)/$(PLATFORM)/genunix
+MODSTUBS_DIR = $(UNIX_DIR)
+DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
+LINTS_DIR = $(OBJS_DIR)
+LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
+
+DTRACESTUBS_O = $(OBJS_DIR)/dtracestubs.o
+DTRACESTUBS = $(OBJS_DIR)/libdtracestubs.so
+
+UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
+MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
+GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
+
+LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
+GEN_LINT_LIB = $(LINT_LIB_DIR)/llib-lgenunix.ln
+
+LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/$(PLATFORM)/lint-libs/%)
+LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln)
+
+#
+# cpu and platform modules need to know how to build their own symcheck module
+#
+PLATMOD = platmod
+PLATLIB = $(PLAT_DIR)/$(OBJS_DIR)/libplatmod.so
+
+CPUNAME = cpu
+CPULIB = $(CPU_DIR)/$(OBJS_DIR)/libcpu.so
+
+SYM_MOD = $(OBJS_DIR)/unix.sym
+
+#
+# Include the makefiles which define build rule templates, the
+# collection of files per module, and a few specific flags. Note
+# that order is significant, just as with an include path. The
+# first build rule template which matches the files name will be
+# used. By including these in order from most machine dependent
+# to most machine independent, we allow a machine dependent file
+# to be used in preference over a machine independent version
+# (Such as a machine specific optimization, which preserves the
+# interfaces.)
+#
+include $(UTSBASE)/sun4/Makefile.files
+include $(UTSTREE)/$(PLATFORM)/Makefile.files
+include $(UTSBASE)/sfmmu/Makefile.files
+include $(UTSBASE)/sparc/v9/Makefile.files
+include $(UTSBASE)/sparc/Makefile.files
+include $(UTSTREE)/sun/Makefile.files
+include $(SRC)/psm/promif/$(PROMIF)/common/Makefile.files
+include $(SRC)/psm/promif/$(PROMIF)/$(PLATFORM)/Makefile.files
+include $(UTSTREE)/common/Makefile.files
+
+#
+# Include machine independent rules. Note that this does not imply
+# that the resulting module from rules in Makefile.uts is machine
+# independent. Only that the build rules are machine independent.
+#
+include $(UTSBASE)/Makefile.uts
+
+# These come after Makefile.uts (for CLOSED_BUILD).
+IMPLEMENTATIONS = tazmo .WAIT
+IMPLEMENTATIONS += starfire .WAIT
+IMPLEMENTATIONS += javelin .WAIT
+IMPLEMENTATIONS += darwin .WAIT
+IMPLEMENTATIONS += quasar .WAIT
+IMPLEMENTATIONS += grover .WAIT
+IMPLEMENTATIONS += enchilada .WAIT
+IMPLEMENTATIONS += taco .WAIT
+IMPLEMENTATIONS += mpxu .WAIT
+IMPLEMENTATIONS += excalibur .WAIT
+IMPLEMENTATIONS += montecarlo .WAIT
+IMPLEMENTATIONS += serengeti .WAIT
+IMPLEMENTATIONS += littleneck .WAIT
+IMPLEMENTATIONS += starcat .WAIT
+IMPLEMENTATIONS += daktari .WAIT
+IMPLEMENTATIONS += cherrystone .WAIT
+IMPLEMENTATIONS += fjlite .WAIT
+IMPLEMENTATIONS += snowbird .WAIT
+IMPLEMENTATIONS += schumacher .WAIT
+IMPLEMENTATIONS += blade .WAIT
+IMPLEMENTATIONS += boston .WAIT
+IMPLEMENTATIONS += seattle .WAIT
+IMPLEMENTATIONS += chicago .WAIT
+
+$(CLOSED_BUILD)CLOSED_IMPLEMENTATIONS = chalupa .WAIT
+$(CLOSED_BUILD)CLOSED_IMPLEMENTATIONS += ents .WAIT
+$(CLOSED_BUILD)CLOSED_IMPLEMENTATIONS += lw2plus .WAIT
+$(CLOSED_BUILD)CLOSED_IMPLEMENTATIONS += lw8 .WAIT
+$(CLOSED_BUILD)CLOSED_IMPLEMENTATIONS += sunfire .WAIT
+$(CLOSED_BUILD)CLOSED_IMPLEMENTATIONS += makaha .WAIT
+
+#
+# machine specific optimization, override default in Makefile.master
+#
+CC_XARCH = -xarch=v9a
+AS_XARCH = -xarch=v9a
+COPTIMIZE = -xO3
+CCMODE = -Xa
+
+CFLAGS = -xchip=ultra $(CCABS32) $(CCREGSYM)
+CFLAGS += $(CC_XARCH)
+CFLAGS += $(COPTIMIZE)
+CFLAGS += $(EXTRA_CFLAGS)
+CFLAGS += $(XAOPT)
+CFLAGS += $(INLINES) -D_ASM_INLINES
+CFLAGS += $(CCMODE)
+CFLAGS += $(SPACEFLAG)
+CFLAGS += $(CERRWARN)
+CFLAGS += $(CTF_FLAGS)
+CFLAGS += $(C99MODE)
+CFLAGS += $(CCUNBOUND)
+CFLAGS += -xregs=no%float
+
+ASFLAGS += $(AS_XARCH)
+
+AS_INC_PATH += -I$(DSF_DIR)/$(OBJS_DIR)
+
+LINT_KMODS += $(GENUNIX_KMODS)
+
+LINT_DEFS = -Xarch=v9
+
+#
+# The following must be defined for all implementations:
+#
+# MAPFILE: ld mapfile for the build of kernel/unix.
+# MODSTUBS: Module stubs source file.
+# GENCONST_SRC: genconst.c
+# OFFSETS: offsets.in
+# PLATFORM_OFFSETS: Platform specific mach_offsets.in
+# FDOFFSETS: fd_offsets.in
+#
+MAPFILE = $(UTSBASE)/sun4/conf/Mapfile
+MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s
+GENCONST_SRC = $(UTSBASE)/sun4/ml/genconst.c
+OFFSETS = $(UTSBASE)/sun4/ml/offsets.in
+PLATFORM_OFFSETS = $(UTSBASE)/sun4u/ml/mach_offsets.in
+FDOFFSETS = $(UTSBASE)/sun/io/fd_offsets.in
+
+#
+# Define the actual specific platforms
+#
+
+MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU
+
+$(MPSAS_BUILD)MACHINE_DEFS += -DMPSAS
+
+#
+# Software workarounds for hardware "features"
+#
+
+include $(UTSBASE)/$(PLATFORM)/Makefile.workarounds
+
+#
+# Debugging level
+#
+# Special knowledge of which special debugging options effect which
+# file is used to optimize the build if these flags are changed.
+#
+# XXX: The above could possibly be done for more flags and files, but
+# is left as an experiment to the interested reader. Be forewarned,
+# that excessive use could lead to maintenance difficulties.
+#
+# Note: kslice can be enabled for the sun4u, but is disabled by default
+# in all cases.
+#
+
+DEBUG_DEFS_OBJ64 =
+DEBUG_DEFS_DBG64 = -DDEBUG
+DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
+
+DEBUG_COND_OBJ64 :sh = echo \\043
+DEBUG_COND_DBG64 =
+IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
+
+$(IF_DEBUG_OBJ)trap.o := DEBUG_DEFS += -DTRAPDEBUG
+$(IF_DEBUG_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPDEBUG
+$(IF_DEBUG_OBJ)syscall_trap.o := DEBUG_DEFS += -DSYSCALLTRACE
+$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=0
+
+IF_TRAPTRACE_OBJ = $(IF_DEBUG_OBJ)
+# comment this out for a non-debug kernel with TRAPTRACE
+#IF_TRAPTRACE_OBJ = $(OBJS_DIR)/
+
+$(IF_TRAPTRACE_OBJ)locore.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_locore.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mlsetup.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)syscall_trap.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)startup.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_startup.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)cpu_states.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_cpu_states.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)interrupt.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_interrupt.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_sfmmu_asm.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)sfmmu_asm.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)trap_table.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)xc.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_xc.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)wbuf.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)trap.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)cheetah_asm.o := DEBUG_DEFS += -DTRAPTRACE
+
+# Comment these out if you don't want dispatcher lock statistics.
+
+#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_LOCK_STATS
+#$(IF_DEBUG_OBJ)disp.o := DEBUG_DEFS += -DDISP_LOCK_STATS
+
+# Comment these out if you don't want dispatcher debugging
+
+#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_DEBUG
+
+#
+# Build `options'. These are mostly historical and the need for these
+# is largely removed by the module technology. However, the static
+# build will continue to require these.
+#
+OPTION_DEFS = -DC2_AUDIT
+
+#
+# Collect the preprocessor definitions to be associated with *all*
+# files.
+#
+ALL_DEFS = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \
+ $(OPTION_DEFS)
+GENCONST_DEFS = $(MACHINE_DEFS) $(OPTION_DEFS)
+
+#
+# ----- TRANSITIONAL SECTION --------------------------------------------------
+#
+
+#
+# Not everything which *should* be a module is a module yet. The
+# following is a list of such objects which are currently part of
+# the base kernel but should soon become kmods.
+#
+MACH_NOT_YET_KMODS = $(AUTOCONF_OBJS)
+
+#
+# ----- END OF TRANSITIONAL SECTION -------------------------------------------
+#
+
+#
+# The kernels modules which are "implementation architecture"
+# specific for this machine are enumerated below. Note that most
+# of these modules must exist (in one form or another) for each
+# architecture.
+#
+# Common Drivers (usually pseudo drivers) (/kernel/drv):
+#
+
+#
+# Machine Specific Driver Modules (/kernel/drv):
+#
+# XXX: How many of these are really machine specific?
+#
+DRV_KMODS += bbc_beep
+DRV_KMODS += cgsix
+DRV_KMODS += cpc
+DRV_KMODS += dma fd
+DRV_KMODS += rootnex sbusmem upa64s zs zsh
+DRV_KMODS += sbus
+DRV_KMODS += pcisch pcipsy simba
+DRV_KMODS += px
+DRV_KMODS += ebus
+DRV_KMODS += su
+DRV_KMODS += tod
+DRV_KMODS += power
+DRV_KMODS += epic
+DRV_KMODS += fcode
+DRV_KMODS += grbeep
+DRV_KMODS += pcf8584 max1617 seeprom tda8444 pca9556
+DRV_KMODS += ics951601 adm1031
+DRV_KMODS += lm75 ltc1427 pcf8591 pcf8574 ssc050 ssc100
+DRV_KMODS += pic16f819
+DRV_KMODS += pic16f747
+DRV_KMODS += adm1026
+DRV_KMODS += us
+DRV_KMODS += ppm schppm jbusppm
+DRV_KMODS += mc-us3
+DRV_KMODS += mc-us3i
+DRV_KMODS += smbus
+DRV_KMODS += db21554
+DRV_KMODS += gpio_87317
+DRV_KMODS += isadma
+DRV_KMODS += sbbc
+DRV_KMODS += pmubus
+DRV_KMODS += pmugpio
+DRV_KMODS += pmc
+DRV_KMODS += trapstat
+DRV_KMODS += dmfe
+
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += ctsmc
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += i2bsc
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += m1535ppm
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += memtest
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += mi2cv
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += rmc_comm
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += rmcadm
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += rmclomv
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += scmi2c
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += sf
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += smbus_ara
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += wrsmd
+
+#
+# Exec Class Modules (/kernel/exec):
+#
+EXEC_KMODS +=
+
+#
+# Scheduling Class Modules (/kernel/sched):
+#
+SCHED_KMODS +=
+
+#
+# File System Modules (/kernel/fs):
+#
+FS_KMODS +=
+
+#
+# Streams Modules (/kernel/strmod):
+#
+STRMOD_KMODS += kb
+
+#
+# 'System' Modules (/kernel/sys):
+#
+SYS_KMODS +=
+
+#
+# 'User' Modules (/kernel/misc):
+#
+MISC_KMODS += obpsym bootdev vis cpr platmod md5 sha1 i2c_svc
+MISC_KMODS += sbd
+
+MISC_KMODS += fcodem fcpci pcicfg.e
+MISC_KMODS += kmech_krb5
+MISC_KMODS += zuluvm
+
+$(CLOSED_BUILD)CLOSED_MISC_KMODS += gptwo_cpu gptwocfg
+
+#
+# Software Cryptographic Providers (/kernel/crypto):
+#
+# Don't build some of these for OpenSolaris, since they will be
+# replaced by binaries that are signed by Sun RE.
+#
+$(CLOSED_BUILD)CRYPTO_KMODS += aes
+$(CLOSED_BUILD)CRYPTO_KMODS += arcfour
+$(CLOSED_BUILD)CRYPTO_KMODS += des
+CRYPTO_KMODS += rsa
+
+#
+# generic-unix module (/kernel/genunix):
+#
+GENUNIX_KMODS += genunix
+
+# 'User' "Modules" excluded from the Full Kernel lint target:
+#
+$(CLOSED_BUILD)CLOSED_NLMISC_KMODS += forthdebug
+
+#
+# Modules eXcluded from the product:
+#
+XMODS +=
+
+#
+# cpu modules
+#
+CPU_KMODS += cheetah cheetahplus jalapeno serrano spitfire hummingbird
+
+#
+# sun4u 'TOD' Modules (/platform/.../kernel/tod):
+#
+TOD_KMODS += todds1287 todds1337 todmostek todstarfire
+TOD_KMODS += todm5819 todblade todm5823 todbq4802
+
+$(CLOSED_BUILD)CLOSED_TOD_KMODS += todm5819p_rmc todsg todstarcat
+
+#
+# Performance Counter BackEnd Modules (/usr/kernel/pcbe):
+#
+PCBE_KMODS += us234_pcbe
diff --git a/usr/src/uts/sun4u/Makefile.targ b/usr/src/uts/sun4u/Makefile.targ
index 45fcecc6ed..e89bccc6a0 100644
--- a/usr/src/uts/sun4u/Makefile.targ
+++ b/usr/src/uts/sun4u/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,32 +18,12 @@
#
# CDDL HEADER END
#
-#
-# uts/sun4u/Makefile.targ
-# Copyright 1994, 2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# This Makefile defines the set of all required, target containing
-# included Makefiles for the sun4u "implementation architecture".
+# ident "%Z%%M% %I% %E% SMI"
#
-#
-# Targets for all implementations:
-#
-include $(UTSBASE)/Makefile.targ
+UTSTREE=$(UTSBASE)
-#
-# Target set for sun4u (order is not important, as it is with the
-# isomorphic Makefile.files set).
-#
-include $(UTSBASE)/sun4/Makefile.rules
-include $(UTSBASE)/sun4u/Makefile.rules
-include $(UTSBASE)/sfmmu/Makefile.rules
-include $(UTSBASE)/sparc/v9/Makefile.rules
-include $(UTSBASE)/sparc/Makefile.rules
-include $(UTSBASE)/sun/Makefile.rules
-include $(PSMBASE)/promif/$(PROMIF)/common/Makefile.rules
-include $(PSMBASE)/promif/$(PROMIF)/sun4u/Makefile.rules
-include $(UTSBASE)/common/Makefile.rules
+include $(UTSBASE)/sun4u/Makefile.targ.shared
diff --git a/usr/src/uts/sun4u/Makefile.targ.shared b/usr/src/uts/sun4u/Makefile.targ.shared
new file mode 100644
index 0000000000..65101b7ffd
--- /dev/null
+++ b/usr/src/uts/sun4u/Makefile.targ.shared
@@ -0,0 +1,50 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/sun4u/Makefile.targ
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# This Makefile defines the set of all required, target containing
+# included Makefiles for the sun4u "implementation architecture".
+#
+
+#
+# Targets for all implementations:
+#
+include $(UTSBASE)/Makefile.targ
+
+#
+# Target set for sun4u (order is not important, as it is with the
+# isomorphic Makefile.files set).
+#
+include $(UTSBASE)/sun4/Makefile.rules
+include $(UTSTREE)/sun4u/Makefile.rules
+include $(UTSBASE)/sfmmu/Makefile.rules
+include $(UTSBASE)/sparc/v9/Makefile.rules
+include $(UTSBASE)/sparc/Makefile.rules
+include $(UTSTREE)/sun/Makefile.rules
+include $(PSMBASE)/promif/$(PROMIF)/common/Makefile.rules
+include $(PSMBASE)/promif/$(PROMIF)/sun4u/Makefile.rules
+include $(UTSTREE)/common/Makefile.rules
diff --git a/usr/src/uts/sun4u/blade/Makefile b/usr/src/uts/sun4u/blade/Makefile
index 64188fcd2f..5bad6fdbc1 100644
--- a/usr/src/uts/sun4u/blade/Makefile
+++ b/usr/src/uts/sun4u/blade/Makefile
@@ -22,7 +22,7 @@
#
#pragma ident "%Z%%M% %I% %E% SMI"
#
-# Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# This makefile drives the production of the sun4u JBOS - blade platform
@@ -51,6 +51,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -64,23 +66,26 @@ BLADE_PLAT_LINK1 = $(BLADE_LINK_1:%=$(ROOT_PLAT_DIR)/%)
#
.KEEP_STATE:
-.PARALLEL: $(BLADE_KMODS)
+.PARALLEL: $(BLADE_KMODS) $(CLOSED_BLADE_KMODS)
-def all clean clobber clean.lint: $(BLADE_KMODS)
+def all clean clobber clean.lint modlist: $(BLADE_KMODS) $(CLOSED_BLADE_KMODS)
install: $(ROOT_BLADE_DIR) \
$(USR_BLADE_DIR) \
$(USR_BLADE_INC_DIR) \
$(USR_BLADE_SBIN_DIR) \
$(USR_BLADE_LIB_DIR) \
- .WAIT $(BLADE_KMODS) \
+ .WAIT $(BLADE_KMODS) $(CLOSED_BLADE_KMODS) \
$(BLADE_OPTION) \
$(BLADE_PLAT_LINK_1)
-modlintlib: $(BLADE_KMODS)
+modlintlib: $(BLADE_KMODS) $(CLOSED_BLADE_KMODS)
$(BLADE_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(CLOSED_BLADE_KMODS): FRC
+ cd $(CLOSED)/uts/sun4u/blade/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(BLADE_OPTION): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
@@ -88,10 +93,11 @@ $(BLADE_OPTION): FRC
install_h check:
lint: modlintlib .WAIT $(LINT_DEPS)
-
+
LINT_LIBS = $(LINT_LIB) \
-L$(BLADE_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
diff --git a/usr/src/uts/sun4u/blade/Makefile.blade b/usr/src/uts/sun4u/blade/Makefile.blade
index 5c7ef9890c..011539cd3c 100644
--- a/usr/src/uts/sun4u/blade/Makefile.blade
+++ b/usr/src/uts/sun4u/blade/Makefile.blade
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,94 +18,12 @@
#
# CDDL HEADER END
#
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Global definitions for sun4u jbos-blade implementation specific modules.
-#
-
-#
-# Define directories.
-#
-ROOT_BLADE_DIR = $(ROOT_PLAT_DIR)/SUNW,Serverblade1
-ROOT_BLADE_MOD_DIR = $(ROOT_BLADE_DIR)/kernel
-ROOT_BLADE_MISC_DIR_32 = $(ROOT_BLADE_DIR)/kernel/misc
-ROOT_BLADE_MISC_DIR_64 = $(ROOT_BLADE_MISC_DIR_32)/$(SUBDIR64)
-ROOT_BLADE_KERN_DIR_32 = $(ROOT_BLADE_MOD_DIR)
-ROOT_BLADE_KERN_DIR_64 = $(ROOT_BLADE_MOD_DIR)/$(SUBDIR64)
-ROOT_BLADE_DRV_DIR_32 = $(ROOT_BLADE_MOD_DIR)/drv
-ROOT_BLADE_DRV_DIR_64 = $(ROOT_BLADE_MOD_DIR)/drv/$(SUBDIR64)
-
-ROOT_BLADE_KERN_DIR = $(ROOT_BLADE_KERN_DIR_$(CLASS))
-ROOT_BLADE_DRV_DIR = $(ROOT_BLADE_DRV_DIR_$(CLASS))
-ROOT_BLADE_MISC_DIR = $(ROOT_BLADE_MISC_DIR_$(CLASS))
-
-ROOT_PLAT_MOD_DIRS += $(ROOT_BLADE_MOD_DIR)
-ROOT_PLAT_MISC_DIRS += $(ROOT_BLADE_MISC_DIR)
-
-
-USR_SUN4U_PLAT_DIR = $(USR_PLAT_DIR)/sun4u
-USR_BLADE_DIR = $(USR_PLAT_DIR)/SUNW,Serverblade1
-USR_BLADE_INC_DIR = $(USR_BLADE_DIR)/include
-USR_BLADE_ISYS_DIR = $(USR_BLADE_INC_DIR)/sys
-USR_BLADE_SBIN_DIR = $(USR_BLADE_DIR)/sbin
-USR_BLADE_LIB_DIR = $(USR_BLADE_DIR)/lib
-
-
-BLADE_LINT_LIB_DIR= $(UTSBASE)/$(PLATFORM)/blade/lint-libs/$(OBJS_DIR)
-
-
-# Define Objects
-#
-BLADE_OBJS = blade.o
-
-#
-# Define modules.
-#
-BLADE_KMODS = platmod
-BLADE_KMODS += bscbus
-BLADE_KMODS += bscv
-#
-# Option conf file
-BLADE_OPTION = options
-
-#
-# Include the makefiles which define build rule templates, the
-# collection of files per module, and a few specific flags. Note
-# that order is significant, just as with an include path. The
-# first build rule template which matches the files name will be
-# used. By including these in order from most machine dependent
-# to most machine independent, we allow a machine dependent file
-# to be used in preference over a machine independent version
-# (Such as a machine specific optimization, which preserves the
-# interfaces.)
-#
-
-include $(UTSBASE)/sun4u/blade/Makefile.files
+# ident "%Z%%M% %I% %E% SMI"
#
-# Include common rules.
-#
-include $(UTSBASE)/sun4u/Makefile.sun4u
-
-
-LINTS_DIR = $(OBJS_DIR)
-LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/blade/lint-libs/$(OBJS_DIR)
-LINT_LIB= $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)/llib-lunix.ln
-GEN_LINT_LIB= $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
-
-#
-# Define the actual specific platforms
-#
-MACHINE_DEFS += -D$(PLATFORM) -D_MACHDEP -DSFMMU
+UTSTREE=$(UTSBASE)
-#
-# Define for inline pre-processing since
-# cpp not smart about v9 yet.
-#
-#CPP_DEFS_32 =
-#CPP_DEFS_64 = -D__sparcv9
-#CPP_DEFS = $(CPP_DEFS_$(CLASS))
+include $(UTSBASE)/sun4u/blade/Makefile.blade.shared
diff --git a/usr/src/uts/sun4u/blade/Makefile.blade.shared b/usr/src/uts/sun4u/blade/Makefile.blade.shared
new file mode 100644
index 0000000000..9e7145a926
--- /dev/null
+++ b/usr/src/uts/sun4u/blade/Makefile.blade.shared
@@ -0,0 +1,112 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# Global definitions for sun4u jbos-blade implementation specific modules.
+#
+
+#
+# Define directories.
+#
+ROOT_BLADE_DIR = $(ROOT_PLAT_DIR)/SUNW,Serverblade1
+ROOT_BLADE_MOD_DIR = $(ROOT_BLADE_DIR)/kernel
+ROOT_BLADE_MISC_DIR_32 = $(ROOT_BLADE_DIR)/kernel/misc
+ROOT_BLADE_MISC_DIR_64 = $(ROOT_BLADE_MISC_DIR_32)/$(SUBDIR64)
+ROOT_BLADE_KERN_DIR_32 = $(ROOT_BLADE_MOD_DIR)
+ROOT_BLADE_KERN_DIR_64 = $(ROOT_BLADE_MOD_DIR)/$(SUBDIR64)
+ROOT_BLADE_DRV_DIR_32 = $(ROOT_BLADE_MOD_DIR)/drv
+ROOT_BLADE_DRV_DIR_64 = $(ROOT_BLADE_MOD_DIR)/drv/$(SUBDIR64)
+
+ROOT_BLADE_KERN_DIR = $(ROOT_BLADE_KERN_DIR_$(CLASS))
+ROOT_BLADE_DRV_DIR = $(ROOT_BLADE_DRV_DIR_$(CLASS))
+ROOT_BLADE_MISC_DIR = $(ROOT_BLADE_MISC_DIR_$(CLASS))
+
+ROOT_PLAT_MOD_DIRS += $(ROOT_BLADE_MOD_DIR)
+ROOT_PLAT_MISC_DIRS += $(ROOT_BLADE_MISC_DIR)
+
+
+USR_SUN4U_PLAT_DIR = $(USR_PLAT_DIR)/sun4u
+USR_BLADE_DIR = $(USR_PLAT_DIR)/SUNW,Serverblade1
+USR_BLADE_INC_DIR = $(USR_BLADE_DIR)/include
+USR_BLADE_ISYS_DIR = $(USR_BLADE_INC_DIR)/sys
+USR_BLADE_SBIN_DIR = $(USR_BLADE_DIR)/sbin
+USR_BLADE_LIB_DIR = $(USR_BLADE_DIR)/lib
+
+
+BLADE_LINT_LIB_DIR= $(UTSBASE)/$(PLATFORM)/blade/lint-libs/$(OBJS_DIR)
+
+
+# Define Objects
+#
+BLADE_OBJS = blade.o
+
+#
+# Option conf file
+BLADE_OPTION = options
+
+#
+# Include the makefiles which define build rule templates, the
+# collection of files per module, and a few specific flags. Note
+# that order is significant, just as with an include path. The
+# first build rule template which matches the files name will be
+# used. By including these in order from most machine dependent
+# to most machine independent, we allow a machine dependent file
+# to be used in preference over a machine independent version
+# (Such as a machine specific optimization, which preserves the
+# interfaces.)
+#
+
+include $(UTSTREE)/sun4u/blade/Makefile.files
+
+#
+# Include common rules.
+#
+include $(UTSTREE)/sun4u/Makefile.sun4u
+
+#
+# Define modules (must come after Makefile.sun4u, for CLOSED_BUILD).
+#
+BLADE_KMODS = platmod
+$(CLOSED_BUILD)CLOSED_BLADE_KMODS += bscbus
+$(CLOSED_BUILD)CLOSED_BLADE_KMODS += bscv
+
+LINTS_DIR = $(OBJS_DIR)
+LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/blade/lint-libs/$(OBJS_DIR)
+LINT_LIB= $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)/llib-lunix.ln
+GEN_LINT_LIB= $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)/llib-lgenunix.ln
+
+
+#
+# Define the actual specific platforms
+#
+MACHINE_DEFS += -D$(PLATFORM) -D_MACHDEP -DSFMMU
+
+#
+# Define for inline pre-processing since
+# cpp not smart about v9 yet.
+#
+#CPP_DEFS_32 =
+#CPP_DEFS_64 = -D__sparcv9
+#CPP_DEFS = $(CPP_DEFS_$(CLASS))
diff --git a/usr/src/uts/sun4u/blade/Makefile.files b/usr/src/uts/sun4u/blade/Makefile.files
index 8261a8270a..d834db1711 100644
--- a/usr/src/uts/sun4u/blade/Makefile.files
+++ b/usr/src/uts/sun4u/blade/Makefile.files
@@ -22,7 +22,7 @@
#
#pragma ident "%Z%%M% %I% %E% SMI"
#
-# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# This Makefile defines all file modules for the directory
@@ -34,11 +34,7 @@
# Object lists
#
-BSCBUS_OBJS = bscbus.o
-BSCV_OBJS = bscv.o
-
#
# Miscellaneous
#
INC_PATH += -I$(UTSBASE)/sun4u/blade
-
diff --git a/usr/src/uts/sun4u/blade/Makefile.targ b/usr/src/uts/sun4u/blade/Makefile.targ
index d83c183801..13257768ec 100644
--- a/usr/src/uts/sun4u/blade/Makefile.targ
+++ b/usr/src/uts/sun4u/blade/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,63 +18,12 @@
#
# CDDL HEADER END
#
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Common targets for sun4u jbos-blade implementation specific modules.
-#
-
-.KEEP_STATE:
-
-#
-# Rules for implementation subdirectories.
+# ident "%Z%%M% %I% %E% SMI"
#
-$(ROOT_BLADE_DIR): $(ROOT_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_BLADE_MOD_DIR): $(ROOT_BLADE_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_BLADE_DRV_DIR_32): $(ROOT_BLADE_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_BLADE_DRV_DIR_64): $(ROOT_BLADE_DRV_DIR_32)
- -$(INS.dir.root.sys)
-$(ROOT_BLADE_MISC_DIR_32): $(ROOT_BLADE_MOD_DIR)
- -$(INS.dir.root.sys)
+UTSTREE=$(UTSBASE)
-$(ROOT_BLADE_MISC_DIR_64): $(ROOT_BLADE_MISC_DIR_32)
- -$(INS.dir.root.sys)
-
-$(ROOT_BLADE_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_BLADE_MOD_DIR) FRC
- $(INS.file)
-
-$(ROOT_BLADE_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_BLADE_MISC_DIR) FRC
- $(INS.file)
-
-$(ROOT_BLADE_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_BLADE_DRV_DIR) FRC
- $(INS.file)
-
-$(USR_BLADE_DIR): $(USR_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(USR_BLADE_INC_DIR): $(USR_BLADE_DIR)
- -$(INS.slink4)
-
-$(USR_BLADE_ISYS_DIR): $(USR_BLADE_INC_DIR)
- -$(INS.dir.root.sys)
-
-$(USR_BLADE_SBIN_DIR): $(USR_BLADE_DIR)
- $(INS.slink5)
-
-$(USR_BLADE_LIB_DIR): $(USR_BLADE_DIR)
- -$(INS.dir.root.bin)
-#
-# Include common targets.
-#
-include $(UTSBASE)/sun4u/blade/Makefile.rules
-include $(UTSBASE)/sun4u/Makefile.targ
+include $(UTSBASE)/sun4u/blade/Makefile.targ.shared
diff --git a/usr/src/uts/sun4u/blade/Makefile.targ.shared b/usr/src/uts/sun4u/blade/Makefile.targ.shared
new file mode 100644
index 0000000000..0673d2a776
--- /dev/null
+++ b/usr/src/uts/sun4u/blade/Makefile.targ.shared
@@ -0,0 +1,81 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# Common targets for sun4u jbos-blade implementation specific modules.
+#
+
+.KEEP_STATE:
+
+#
+# Rules for implementation subdirectories.
+#
+$(ROOT_BLADE_DIR): $(ROOT_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_BLADE_MOD_DIR): $(ROOT_BLADE_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_BLADE_DRV_DIR_32): $(ROOT_BLADE_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_BLADE_DRV_DIR_64): $(ROOT_BLADE_DRV_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_BLADE_MISC_DIR_32): $(ROOT_BLADE_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_BLADE_MISC_DIR_64): $(ROOT_BLADE_MISC_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_BLADE_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_BLADE_MOD_DIR) FRC
+ $(INS.file)
+
+$(ROOT_BLADE_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_BLADE_MISC_DIR) FRC
+ $(INS.file)
+
+$(ROOT_BLADE_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_BLADE_DRV_DIR) FRC
+ $(INS.file)
+
+$(USR_BLADE_DIR): $(USR_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(USR_BLADE_INC_DIR): $(USR_BLADE_DIR)
+ -$(INS.slink4)
+
+$(USR_BLADE_ISYS_DIR): $(USR_BLADE_INC_DIR)
+ -$(INS.dir.root.sys)
+
+$(USR_BLADE_SBIN_DIR): $(USR_BLADE_DIR)
+ $(INS.slink5)
+
+$(USR_BLADE_LIB_DIR): $(USR_BLADE_DIR)
+ -$(INS.dir.root.bin)
+#
+# Include common targets.
+#
+include $(UTSTREE)/sun4u/blade/Makefile.rules
+include $(UTSTREE)/sun4u/Makefile.targ
diff --git a/usr/src/uts/sun4u/blade/options/Makefile b/usr/src/uts/sun4u/blade/options/Makefile
index e8e534c73f..6ba8255bc4 100644
--- a/usr/src/uts/sun4u/blade/options/Makefile
+++ b/usr/src/uts/sun4u/blade/options/Makefile
@@ -20,8 +20,7 @@
# CDDL HEADER END
#
#
-# uts/sun4u/blade/options/Makefile
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -84,4 +83,4 @@ install: $(INSTALL_DEPS)
#
# Include common targets.
#
-include $(UTSBASE)/sparc/Makefile.targ
+include $(UTSBASE)/sun4u/blade/Makefile.targ
diff --git a/usr/src/uts/sun4u/boston/Makefile b/usr/src/uts/sun4u/boston/Makefile
index af8c8e0ee5..d791410b70 100644
--- a/usr/src/uts/sun4u/boston/Makefile
+++ b/usr/src/uts/sun4u/boston/Makefile
@@ -52,6 +52,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -60,7 +62,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: $(BOSTON_KMODS)
+def all clean clean.lint clobber modlist: $(BOSTON_KMODS)
modlintlib: $(BOSTON_KMODS)
@@ -96,6 +98,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(BOSTON_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -103,7 +106,7 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(BOSTON_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(BOSTON_CRYPTO_LINKS): $(ROOT_BOSTON_CRYPTO_DIR_64)
-$(RM) $(ROOT_BOSTON_CRYPTO_DIR_64)/$@;
diff --git a/usr/src/uts/sun4u/cherrystone/Makefile b/usr/src/uts/sun4u/cherrystone/Makefile
index 6d57075528..00e5d760a9 100644
--- a/usr/src/uts/sun4u/cherrystone/Makefile
+++ b/usr/src/uts/sun4u/cherrystone/Makefile
@@ -21,7 +21,7 @@
#
#
# uts/sun4u/cherrystone/Makefile
-# Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -49,6 +49,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -57,7 +59,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean.lint clean clobber: $(CHERRYSTONE_KMODS)
+def all clean.lint clean clobber modlist: $(CHERRYSTONE_KMODS)
modlintlib: $(CHERRYSTONE_KMODS)
@@ -97,6 +99,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(CHERRYSTONE_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -104,7 +107,7 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(CHERRYSTONE_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
# EXPORT DELETE START
diff --git a/usr/src/uts/sun4u/chicago/Makefile b/usr/src/uts/sun4u/chicago/Makefile
index b8c4d1427d..3681031039 100644
--- a/usr/src/uts/sun4u/chicago/Makefile
+++ b/usr/src/uts/sun4u/chicago/Makefile
@@ -52,6 +52,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -60,7 +62,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: $(CHICAGO_KMODS)
+def all clean clean.lint clobber modlist: $(CHICAGO_KMODS)
modlintlib: $(CHICAGO_KMODS)
@@ -93,6 +95,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(CHICAGO_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -100,7 +103,7 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(CHICAGO_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(CHICAGO_CRYPTO_LINKS): $(ROOT_CHICAGO_CRYPTO_DIR_64)
-$(RM) $(ROOT_CHICAGO_CRYPTO_DIR_64)/$@;
diff --git a/usr/src/uts/sun4u/daktari/Makefile b/usr/src/uts/sun4u/daktari/Makefile
index 15122c3e0c..73c5ce61b3 100644
--- a/usr/src/uts/sun4u/daktari/Makefile
+++ b/usr/src/uts/sun4u/daktari/Makefile
@@ -21,7 +21,7 @@
#
#
# uts/sun4u/daktari/Makefile
-# Copyright 2000-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -50,6 +50,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -58,7 +60,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean.lint clean clobber: $(DAKTARI_KMODS)
+def all clean.lint clean clobber modlist: $(DAKTARI_KMODS)
modlintlib: $(DAKTARI_KMODS)
@@ -110,6 +112,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(DAKTARI_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -117,7 +120,7 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(DAKTARI_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
# EXPORT DELETE START
diff --git a/usr/src/uts/sun4u/darwin/Makefile b/usr/src/uts/sun4u/darwin/Makefile
index 4f494d7e08..22bba73af1 100644
--- a/usr/src/uts/sun4u/darwin/Makefile
+++ b/usr/src/uts/sun4u/darwin/Makefile
@@ -21,7 +21,8 @@
#
#
# uts/sun4u/darwin/Makefile
-# Copyright (c) 1999 by Sun Microsystems, Inc.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
#
@@ -50,6 +51,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -58,7 +61,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: $(DARWIN_KMODS)
+def all clean clean.lint clobber modlist: $(DARWIN_KMODS)
modlintlib: $(DARWIN_KMODS)
@@ -77,6 +80,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(DARWIN_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -84,7 +88,7 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(DARWIN_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
#
# Include common targets.
diff --git a/usr/src/uts/sun4u/enchilada/Makefile b/usr/src/uts/sun4u/enchilada/Makefile
index c82e8b7984..8803fa4703 100644
--- a/usr/src/uts/sun4u/enchilada/Makefile
+++ b/usr/src/uts/sun4u/enchilada/Makefile
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -52,6 +52,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -60,7 +62,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: $(ENCHILADA_KMODS)
+def all clean clean.lint clobber modlist: $(ENCHILADA_KMODS)
modlintlib: $(ENCHILADA_KMODS)
@@ -93,6 +95,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(ENCHILADA_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -100,7 +103,7 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(ENCHILADA_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(ENCHILADA_CRYPTO_LINKS): $(ROOT_ENCHILADA_CRYPTO_DIR_64)
-$(RM) $(ROOT_ENCHILADA_CRYPTO_DIR_64)/$@;
diff --git a/usr/src/uts/sun4u/excalibur/Makefile b/usr/src/uts/sun4u/excalibur/Makefile
index 4d9768994b..3e5a0f0138 100644
--- a/usr/src/uts/sun4u/excalibur/Makefile
+++ b/usr/src/uts/sun4u/excalibur/Makefile
@@ -22,7 +22,7 @@
#
# uts/sun4u/excalibur/Makefile
#
-# Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -52,6 +52,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -60,7 +62,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: $(EXCALIBUR_KMODS)
+def all clean clean.lint clobber modlist: $(EXCALIBUR_KMODS)
modlintlib: $(EXCALIBUR_KMODS)
@@ -93,6 +95,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(EXCALIBUR_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -100,7 +103,7 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(EXCALIBUR_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(EXCALIBUR_CRYPTO_LINKS): $(ROOT_EXCALIBUR_CRYPTO_DIR_64)
-$(RM) $(ROOT_EXCALIBUR_CRYPTO_DIR_64)/$@;
diff --git a/usr/src/uts/sun4u/fjlite/Makefile b/usr/src/uts/sun4u/fjlite/Makefile
index 6a44c1ddc5..3bb13358bb 100644
--- a/usr/src/uts/sun4u/fjlite/Makefile
+++ b/usr/src/uts/sun4u/fjlite/Makefile
@@ -21,7 +21,7 @@
#
#
# uts/sun4u/fjlite/Makefile
-# Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -52,6 +52,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -64,7 +66,7 @@ IMPLEMENTED_PLATFORM = SUNW,UltraAX-i2
.PARALLEL: $(FJLITE_KMODS)
-def all clean clobber clean.lint: $(FJLITE_KMODS)
+def all clean clobber clean.lint modlist: $(FJLITE_KMODS)
install: $(ROOT_FJLITE_DIR) $(USR_FJLITE_DIR) \
.WAIT $(FJLITE_KMODS)
@@ -72,15 +74,16 @@ install: $(ROOT_FJLITE_DIR) $(USR_FJLITE_DIR) \
modlintlib: $(FJLITE_KMODS)
$(FJLITE_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
install_h check:
lint: modlintlib .WAIT $(LINT_DEPS)
-
+
LINT_LIBS = $(LINT_LIB) \
-L$(FJLITE_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
diff --git a/usr/src/uts/sun4u/grover/Makefile b/usr/src/uts/sun4u/grover/Makefile
index 75c87395d9..23cebd1432 100644
--- a/usr/src/uts/sun4u/grover/Makefile
+++ b/usr/src/uts/sun4u/grover/Makefile
@@ -21,8 +21,8 @@
#
#
# uts/sun4u/grover/Makefile
-# Copyright (c) 2000 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#pragma ident "%Z%%M% %I% %E% SMI"
#
@@ -51,6 +51,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -59,16 +61,18 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: $(GROVER_KMODS)
+def all clean clean.lint clobber modlist: $(GROVER_KMODS) \
+ $(CLOSED_GROVER_KMODS)
-modlintlib: $(GROVER_KMODS)
+modlintlib: $(GROVER_KMODS) $(CLOSED_GROVER_KMODS)
install: $(ROOT_GROVER_DIR) \
$(USR_GROVER_DIR) \
$(USR_GROVER_INC_DIR) \
$(USR_GROVER_SBIN_DIR) \
$(USR_GROVER_LIB_DIR) \
- $(GROVER_KMODS)
+ $(GROVER_KMODS) \
+ $(CLOSED_GROVER_KMODS)
check install_h:
@@ -83,6 +87,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(GROVER_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -90,7 +95,10 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(GROVER_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(CLOSED_GROVER_KMODS): FRC
+ cd $(CLOSED)/uts/sun4u/grover/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
#
# Include common targets.
diff --git a/usr/src/uts/sun4u/grover/Makefile.files b/usr/src/uts/sun4u/grover/Makefile.files
index 2005d593a4..4993fbbe0f 100644
--- a/usr/src/uts/sun4u/grover/Makefile.files
+++ b/usr/src/uts/sun4u/grover/Makefile.files
@@ -21,7 +21,7 @@
#
#
# uts/sun4u/grover/Makefile.files
-# Copyright 2000-2002 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -37,7 +37,6 @@
# Grover specific driver module
#
GRFANS_OBJS = grfans.o
-GRPPM_OBJS = grppm.o ppm.o
#
# Miscellaneous
diff --git a/usr/src/uts/sun4u/grover/Makefile.grover b/usr/src/uts/sun4u/grover/Makefile.grover
index 6612c174b2..1fc9316c47 100644
--- a/usr/src/uts/sun4u/grover/Makefile.grover
+++ b/usr/src/uts/sun4u/grover/Makefile.grover
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,58 +18,12 @@
#
# CDDL HEADER END
#
-#
-# uts/sun4u/grover/Makefile.grover
-# Copyright 2000-2002 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# Global definitions for sun4u implementation specific modules.
-#
-
-#
-# Define directories.
-#
-ROOT_GROVER_DIR = $(ROOT_PLAT_DIR)/SUNW,Sun-Blade-100
-ROOT_GROVER_MOD_DIR = $(ROOT_GROVER_DIR)/kernel
-
-ROOT_GROVER_MISC_DIR_32 = $(ROOT_GROVER_MOD_DIR)/misc
-ROOT_GROVER_MISC_DIR_64 = $(ROOT_GROVER_MISC_DIR_32)/$(SUBDIR64)
-ROOT_GROVER_DRV_DIR_32 = $(ROOT_GROVER_MOD_DIR)/drv
-ROOT_GROVER_DRV_DIR_64 = $(ROOT_GROVER_DRV_DIR_32)/$(SUBDIR64)
-
-ROOT_GROVER_MISC_DIR = $(ROOT_GROVER_MISC_DIR_$(CLASS))
-ROOT_GROVER_DRV_DIR = $(ROOT_GROVER_DRV_DIR_$(CLASS))
-
-ROOT_PLAT_MOD_DIRS += $(ROOT_GROVER_MOD_DIR)
-ROOT_PLAT_MISC_DIRS += $(ROOT_GROVER_MISC_DIR)
-
-USR_GROVER_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Blade-100
-USR_GROVER_LINKED_DIR = $(USR_PLAT_DIR)/$(LINKED_PLATFORM)
-USR_GROVER_INC_DIR = $(USR_GROVER_DIR)/include
-USR_GROVER_ISYS_DIR = $(USR_GROVER_INC_DIR)/sys
-USR_GROVER_SBIN_DIR = $(USR_GROVER_DIR)/sbin
-USR_GROVER_LIB_DIR = $(USR_GROVER_DIR)/lib
-
-
-GROVER_LINT_LIB_DIR= $(UTSBASE)/$(PLATFORM)/grover/lint-libs/$(OBJS_DIR)
-
-#
-# Define objects.
+# ident "%Z%%M% %I% %E% SMI"
#
-GROVER_OBJS = grover.o
-#
-# Define modules.
-#
-GROVER_KMODS = platmod
-GROVER_KMODS += grfans
-GROVER_KMODS += grppm
-
-include $(UTSBASE)/sun4u/grover/Makefile.files
+UTSTREE=$(UTSBASE)
-#
-# Include common rules.
-#
-include $(UTSBASE)/sun4u/Makefile.sun4u
+include $(UTSBASE)/sun4u/grover/Makefile.grover.shared
diff --git a/usr/src/uts/sun4u/grover/Makefile.grover.shared b/usr/src/uts/sun4u/grover/Makefile.grover.shared
new file mode 100644
index 0000000000..fb9def2d6c
--- /dev/null
+++ b/usr/src/uts/sun4u/grover/Makefile.grover.shared
@@ -0,0 +1,76 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/sun4u/grover/Makefile.grover
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# Global definitions for sun4u implementation specific modules.
+#
+
+#
+# Define directories.
+#
+ROOT_GROVER_DIR = $(ROOT_PLAT_DIR)/SUNW,Sun-Blade-100
+ROOT_GROVER_MOD_DIR = $(ROOT_GROVER_DIR)/kernel
+
+ROOT_GROVER_MISC_DIR_32 = $(ROOT_GROVER_MOD_DIR)/misc
+ROOT_GROVER_MISC_DIR_64 = $(ROOT_GROVER_MISC_DIR_32)/$(SUBDIR64)
+ROOT_GROVER_DRV_DIR_32 = $(ROOT_GROVER_MOD_DIR)/drv
+ROOT_GROVER_DRV_DIR_64 = $(ROOT_GROVER_DRV_DIR_32)/$(SUBDIR64)
+
+ROOT_GROVER_MISC_DIR = $(ROOT_GROVER_MISC_DIR_$(CLASS))
+ROOT_GROVER_DRV_DIR = $(ROOT_GROVER_DRV_DIR_$(CLASS))
+
+ROOT_PLAT_MOD_DIRS += $(ROOT_GROVER_MOD_DIR)
+ROOT_PLAT_MISC_DIRS += $(ROOT_GROVER_MISC_DIR)
+
+USR_GROVER_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Blade-100
+USR_GROVER_LINKED_DIR = $(USR_PLAT_DIR)/$(LINKED_PLATFORM)
+USR_GROVER_INC_DIR = $(USR_GROVER_DIR)/include
+USR_GROVER_ISYS_DIR = $(USR_GROVER_INC_DIR)/sys
+USR_GROVER_SBIN_DIR = $(USR_GROVER_DIR)/sbin
+USR_GROVER_LIB_DIR = $(USR_GROVER_DIR)/lib
+
+
+GROVER_LINT_LIB_DIR= $(UTSBASE)/$(PLATFORM)/grover/lint-libs/$(OBJS_DIR)
+
+#
+# Define objects.
+#
+GROVER_OBJS = grover.o
+
+include $(UTSTREE)/sun4u/grover/Makefile.files
+
+#
+# Include common rules.
+#
+include $(UTSTREE)/sun4u/Makefile.sun4u
+
+#
+# Define modules (must come after Makefile.sun4u, for CLOSED_BUILD).
+#
+GROVER_KMODS = platmod
+GROVER_KMODS += grfans
+
+$(CLOSED_BUILD)CLOSED_GROVER_KMODS += grppm
diff --git a/usr/src/uts/sun4u/grover/Makefile.targ b/usr/src/uts/sun4u/grover/Makefile.targ
index 6abce57477..be9826f382 100644
--- a/usr/src/uts/sun4u/grover/Makefile.targ
+++ b/usr/src/uts/sun4u/grover/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,67 +18,12 @@
#
# CDDL HEADER END
#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
-# Copyright 2000-2003 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# Common targets for sun4u Grover implementation specific modules.
-#
-
-.KEEP_STATE:
-
-IMPLEMENTED_PLATFORM = SUNW,Sun-Blade-100
-
-#
-# Rules for implementation subdirectories.
+# ident "%Z%%M% %I% %E% SMI"
#
-$(ROOT_GROVER_DIR): $(ROOT_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_GROVER_MOD_DIR): $(ROOT_GROVER_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_GROVER_MISC_DIR_32): $(ROOT_GROVER_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_GROVER_MISC_DIR_64): $(ROOT_GROVER_MISC_DIR_32)
- -$(INS.dir.root.sys)
-
-$(ROOT_GROVER_DRV_DIR_32): $(ROOT_GROVER_MOD_DIR)
- -$(INS.dir.root.sys)
-$(ROOT_GROVER_DRV_DIR_64): $(ROOT_GROVER_DRV_DIR_32)
- -$(INS.dir.root.sys)
+UTSTREE=$(UTSBASE)
-$(USR_GROVER_DIR): $(USR_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(USR_GROVER_INC_DIR): $(USR_GROVER_DIR)
- -$(INS.slink4)
-
-$(USR_GROVER_SBIN_DIR): $(USR_GROVER_DIR)
- -$(INS.slink5)
-
-$(USR_GROVER_LIB_DIR): $(USR_GROVER_DIR)
- -$(INS.dir.root.bin)
-
-$(USR_GROVER_ISYS_DIR): $(USR_GROVER_INC_DIR)
- -$(INS.dir.bin.bin)
-
-
-$(ROOT_GROVER_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_GROVER_MOD_DIR) FRC
- $(INS.file)
-
-$(ROOT_GROVER_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_GROVER_MISC_DIR) FRC
- $(INS.file)
-
-$(ROOT_GROVER_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_GROVER_DRV_DIR) FRC
- $(INS.file)
-
-#
-# Include common targets.
-#
-include $(UTSBASE)/sun4u/grover/Makefile.rules
-include $(UTSBASE)/sun4u/Makefile.targ
+include $(UTSBASE)/sun4u/grover/Makefile.targ.shared
diff --git a/usr/src/uts/sun4u/grover/Makefile.targ.shared b/usr/src/uts/sun4u/grover/Makefile.targ.shared
new file mode 100644
index 0000000000..815ec55893
--- /dev/null
+++ b/usr/src/uts/sun4u/grover/Makefile.targ.shared
@@ -0,0 +1,85 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# Common targets for sun4u Grover implementation specific modules.
+#
+
+.KEEP_STATE:
+
+IMPLEMENTED_PLATFORM = SUNW,Sun-Blade-100
+
+#
+# Rules for implementation subdirectories.
+#
+$(ROOT_GROVER_DIR): $(ROOT_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_GROVER_MOD_DIR): $(ROOT_GROVER_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_GROVER_MISC_DIR_32): $(ROOT_GROVER_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_GROVER_MISC_DIR_64): $(ROOT_GROVER_MISC_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_GROVER_DRV_DIR_32): $(ROOT_GROVER_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_GROVER_DRV_DIR_64): $(ROOT_GROVER_DRV_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(USR_GROVER_DIR): $(USR_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(USR_GROVER_INC_DIR): $(USR_GROVER_DIR)
+ -$(INS.slink4)
+
+$(USR_GROVER_SBIN_DIR): $(USR_GROVER_DIR)
+ -$(INS.slink5)
+
+$(USR_GROVER_LIB_DIR): $(USR_GROVER_DIR)
+ -$(INS.dir.root.bin)
+
+$(USR_GROVER_ISYS_DIR): $(USR_GROVER_INC_DIR)
+ -$(INS.dir.bin.bin)
+
+
+$(ROOT_GROVER_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_GROVER_MOD_DIR) FRC
+ $(INS.file)
+
+$(ROOT_GROVER_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_GROVER_MISC_DIR) FRC
+ $(INS.file)
+
+$(ROOT_GROVER_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_GROVER_DRV_DIR) FRC
+ $(INS.file)
+
+#
+# Include common targets.
+#
+include $(UTSTREE)/sun4u/grover/Makefile.rules
+include $(UTSTREE)/sun4u/Makefile.targ
diff --git a/usr/src/uts/sun4u/javelin/Makefile b/usr/src/uts/sun4u/javelin/Makefile
index a5f80bfc44..f5fe9042a7 100644
--- a/usr/src/uts/sun4u/javelin/Makefile
+++ b/usr/src/uts/sun4u/javelin/Makefile
@@ -21,8 +21,8 @@
#
#
# uts/sun4u/javelin/Makefile
-# Copyright (c) 1994-1998 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
#
@@ -49,6 +49,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -57,15 +59,16 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean.lint clean clobber: $(JAVELIN_KMODS)
+def all clean.lint clean clobber modlist: $(JAVELIN_KMODS) \
+ $(CLOSED_JAVELIN_KMODS)
-modlintlib: $(JAVELIN_KMODS)
+modlintlib: $(JAVELIN_KMODS) $(CLOSED_JAVELIN_KMODS)
install: $(ROOT_JAVELIN_DIR) $(USR_JAVELIN_DIR) \
$(USR_JAVELIN_INC_DIR) \
$(USR_JAVELIN_SBIN_DIR) \
$(USR_JAVELIN_LIB_DIR) \
- .WAIT $(JAVELIN_KMODS)
+ .WAIT $(JAVELIN_KMODS) $(CLOSED_JAVELIN_KMODS)
install_h check:
@@ -80,6 +83,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(JAVELIN_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -87,7 +91,10 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(JAVELIN_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(CLOSED_JAVELIN_KMODS): FRC
+ cd $(CLOSED)/uts/sun4u/javelin/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
#
# Include common targets.
diff --git a/usr/src/uts/sun4u/javelin/Makefile.files b/usr/src/uts/sun4u/javelin/Makefile.files
index b8a3d40e82..1af8a753e5 100644
--- a/usr/src/uts/sun4u/javelin/Makefile.files
+++ b/usr/src/uts/sun4u/javelin/Makefile.files
@@ -21,8 +21,8 @@
#
#
# uts/sun4u/javelin/Makefile.files
-# Copyright (c) 1994, 1995, 1996 - 1998 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
#
@@ -36,7 +36,6 @@
#
# Javelin specific driver relate modules
#
-ENVCTRLTWO_OBJS = envctrltwo.o
#
# Miscellaneous
diff --git a/usr/src/uts/sun4u/javelin/Makefile.javelin b/usr/src/uts/sun4u/javelin/Makefile.javelin
index c72ded4d87..460c4bcccc 100644
--- a/usr/src/uts/sun4u/javelin/Makefile.javelin
+++ b/usr/src/uts/sun4u/javelin/Makefile.javelin
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,59 +18,12 @@
#
# CDDL HEADER END
#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
-# uts/sun4u/javelin/Makefile.javelin
-# Copyright (c) 1994 - 1998 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# This makefile contains the common definitions for the
-# sun4u Javelin system dependent modules.
-#
-
-#
-# Define directories
-#
-ROOT_JAVELIN_DIR = $(ROOT_PLAT_DIR)/SUNW,Ultra-250
-ROOT_JAVELIN_MOD_DIR = $(ROOT_JAVELIN_DIR)/kernel
-ROOT_JAVELIN_KERN_DIR_32 = $(ROOT_JAVELIN_MOD_DIR)
-ROOT_JAVELIN_KERN_DIR_64 = $(ROOT_JAVELIN_MOD_DIR)/$(SUBDIR64)
-ROOT_JAVELIN_DRV_DIR_32 = $(ROOT_JAVELIN_MOD_DIR)/drv
-ROOT_JAVELIN_DRV_DIR_64 = $(ROOT_JAVELIN_MOD_DIR)/drv/$(SUBDIR64)
-ROOT_JAVELIN_MISC_DIR_32 = $(ROOT_JAVELIN_MOD_DIR)/misc
-ROOT_JAVELIN_MISC_DIR_64 = $(ROOT_JAVELIN_MOD_DIR)/misc/$(SUBDIR64)
-
-ROOT_JAVELIN_KERN_DIR = $(ROOT_JAVELIN_KERN_DIR_$(CLASS))
-ROOT_JAVELIN_MISC_DIR = $(ROOT_JAVELIN_MISC_DIR_$(CLASS))
-ROOT_JAVELIN_DRV_DIR = $(ROOT_JAVELIN_DRV_DIR_$(CLASS))
-
-ROOT_PLAT_MOD_DIRS += $(ROOT_JAVELIN_MOD_DIR)
-ROOT_PLAT_MISC_DIRS += $(ROOT_JAVELIN_MISC_DIR)
-ROOT_PLAT_MISC_DIRS_32 += $(ROOT_JAVELIN_MISC_DIR_32)
-ROOT_PLAT_DRV_DIRS = $(ROOT_JAVELIN_DRV_DIR)
-
-USR_JAVELIN_DIR = $(USR_PLAT_DIR)/SUNW,Ultra-250
-USR_JAVELIN_INC_DIR = $(USR_JAVELIN_DIR)/include
-USR_JAVELIN_SBIN_DIR = $(USR_JAVELIN_DIR)/sbin
-USR_JAVELIN_LIB_DIR = $(USR_JAVELIN_DIR)/lib
-USR_JAVELIN_ISYS_DIR = $(USR_JAVELIN_INC_DIR)/sys
-
-JAVELIN_LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/javelin/lint-libs/$(OBJS_DIR)
-
-#
-# Define objects.
-#
-JAVELIN_OBJS = javelin.o
-
-#
-# Define modules
+# ident "%Z%%M% %I% %E% SMI"
#
-JAVELIN_KMODS = envctrltwo platmod
-include $(UTSBASE)/sun4u/javelin/Makefile.files
+UTSTREE=$(UTSBASE)
-#
-# Include common rules.
-#
-include $(UTSBASE)/sun4u/Makefile.sun4u
+include $(UTSBASE)/sun4u/javelin/Makefile.javelin.shared
diff --git a/usr/src/uts/sun4u/javelin/Makefile.javelin.shared b/usr/src/uts/sun4u/javelin/Makefile.javelin.shared
new file mode 100644
index 0000000000..7d4058a448
--- /dev/null
+++ b/usr/src/uts/sun4u/javelin/Makefile.javelin.shared
@@ -0,0 +1,78 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/sun4u/javelin/Makefile.javelin
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# This makefile contains the common definitions for the
+# sun4u Javelin system dependent modules.
+#
+
+#
+# Define directories
+#
+ROOT_JAVELIN_DIR = $(ROOT_PLAT_DIR)/SUNW,Ultra-250
+ROOT_JAVELIN_MOD_DIR = $(ROOT_JAVELIN_DIR)/kernel
+ROOT_JAVELIN_KERN_DIR_32 = $(ROOT_JAVELIN_MOD_DIR)
+ROOT_JAVELIN_KERN_DIR_64 = $(ROOT_JAVELIN_MOD_DIR)/$(SUBDIR64)
+ROOT_JAVELIN_DRV_DIR_32 = $(ROOT_JAVELIN_MOD_DIR)/drv
+ROOT_JAVELIN_DRV_DIR_64 = $(ROOT_JAVELIN_MOD_DIR)/drv/$(SUBDIR64)
+ROOT_JAVELIN_MISC_DIR_32 = $(ROOT_JAVELIN_MOD_DIR)/misc
+ROOT_JAVELIN_MISC_DIR_64 = $(ROOT_JAVELIN_MOD_DIR)/misc/$(SUBDIR64)
+
+ROOT_JAVELIN_KERN_DIR = $(ROOT_JAVELIN_KERN_DIR_$(CLASS))
+ROOT_JAVELIN_MISC_DIR = $(ROOT_JAVELIN_MISC_DIR_$(CLASS))
+ROOT_JAVELIN_DRV_DIR = $(ROOT_JAVELIN_DRV_DIR_$(CLASS))
+
+ROOT_PLAT_MOD_DIRS += $(ROOT_JAVELIN_MOD_DIR)
+ROOT_PLAT_MISC_DIRS += $(ROOT_JAVELIN_MISC_DIR)
+ROOT_PLAT_MISC_DIRS_32 += $(ROOT_JAVELIN_MISC_DIR_32)
+ROOT_PLAT_DRV_DIRS = $(ROOT_JAVELIN_DRV_DIR)
+
+USR_JAVELIN_DIR = $(USR_PLAT_DIR)/SUNW,Ultra-250
+USR_JAVELIN_INC_DIR = $(USR_JAVELIN_DIR)/include
+USR_JAVELIN_SBIN_DIR = $(USR_JAVELIN_DIR)/sbin
+USR_JAVELIN_LIB_DIR = $(USR_JAVELIN_DIR)/lib
+USR_JAVELIN_ISYS_DIR = $(USR_JAVELIN_INC_DIR)/sys
+
+JAVELIN_LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/javelin/lint-libs/$(OBJS_DIR)
+
+#
+# Define objects.
+#
+JAVELIN_OBJS = javelin.o
+
+include $(UTSTREE)/sun4u/javelin/Makefile.files
+
+#
+# Include common rules.
+#
+include $(UTSTREE)/sun4u/Makefile.sun4u
+
+#
+# Define modules (must come after Makefile.sun4u, for CLOSED_BUILD)
+#
+JAVELIN_KMODS = platmod
+
+$(CLOSED_BUILD)CLOSED_JAVELIN_KMODS = envctrltwo
diff --git a/usr/src/uts/sun4u/javelin/Makefile.targ b/usr/src/uts/sun4u/javelin/Makefile.targ
index d74eb26133..6b345942e6 100644
--- a/usr/src/uts/sun4u/javelin/Makefile.targ
+++ b/usr/src/uts/sun4u/javelin/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,65 +18,12 @@
#
# CDDL HEADER END
#
-#
-# Copyright 1998-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# Common targets for sun4u Javelin implementation specific modules.
+# ident "%Z%%M% %I% %E% SMI"
#
-#
-
-IMPLEMENTED_PLATFORM = SUNW,Ultra-250
-
-#
-# Platform targets
-#
-$(ROOT_JAVELIN_DIR): $(ROOT_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_JAVELIN_MOD_DIR): $(ROOT_JAVELIN_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_JAVELIN_DRV_DIR_32): $(ROOT_JAVELIN_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_JAVELIN_DRV_DIR_64): $(ROOT_JAVELIN_DRV_DIR_32)
- -$(INS.dir.root.sys)
-$(ROOT_JAVELIN_MISC_DIR_32): $(ROOT_JAVELIN_MOD_DIR)
- -$(INS.dir.root.sys)
+UTSTREE=$(UTSBASE)
-$(ROOT_JAVELIN_MISC_DIR_64): $(ROOT_JAVELIN_MISC_DIR_32)
- -$(INS.dir.root.sys)
-
-$(USR_JAVELIN_DIR): $(USR_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(USR_JAVELIN_INC_DIR): $(USR_JAVELIN_DIR)
- -$(INS.slink4)
-
-$(USR_JAVELIN_SBIN_DIR): $(USR_JAVELIN_DIR)
- -$(INS.slink5)
-
-$(USR_JAVELIN_LIB_DIR): $(USR_JAVELIN_DIR)
- -$(INS.dir.root.bin)
-
-$(USR_JAVELIN_ISYS_DIR): $(USR_JAVELIN_INC_DIR)
- -$(INS.dir.root.bin)
-
-$(ROOT_JAVELIN_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_JAVELIN_MOD_DIR) FRC
- $(INS.file)
-
-$(ROOT_JAVELIN_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_JAVELIN_MISC_DIR) FRC
- $(INS.file)
-
-$(ROOT_JAVELIN_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_JAVELIN_DRV_DIR) FRC
- $(INS.file)
-
-#
-# Include common targets.
-#
-include $(UTSBASE)/sun4u/javelin/Makefile.rules
-include $(UTSBASE)/sun4u/Makefile.targ
+include $(UTSBASE)/sun4u/javelin/Makefile.targ.shared
diff --git a/usr/src/uts/sun4u/javelin/Makefile.targ.shared b/usr/src/uts/sun4u/javelin/Makefile.targ.shared
new file mode 100644
index 0000000000..ddb36dada8
--- /dev/null
+++ b/usr/src/uts/sun4u/javelin/Makefile.targ.shared
@@ -0,0 +1,83 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# Common targets for sun4u Javelin implementation specific modules.
+#
+#
+
+IMPLEMENTED_PLATFORM = SUNW,Ultra-250
+
+#
+# Platform targets
+#
+$(ROOT_JAVELIN_DIR): $(ROOT_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_JAVELIN_MOD_DIR): $(ROOT_JAVELIN_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_JAVELIN_DRV_DIR_32): $(ROOT_JAVELIN_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_JAVELIN_DRV_DIR_64): $(ROOT_JAVELIN_DRV_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_JAVELIN_MISC_DIR_32): $(ROOT_JAVELIN_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_JAVELIN_MISC_DIR_64): $(ROOT_JAVELIN_MISC_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(USR_JAVELIN_DIR): $(USR_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(USR_JAVELIN_INC_DIR): $(USR_JAVELIN_DIR)
+ -$(INS.slink4)
+
+$(USR_JAVELIN_SBIN_DIR): $(USR_JAVELIN_DIR)
+ -$(INS.slink5)
+
+$(USR_JAVELIN_LIB_DIR): $(USR_JAVELIN_DIR)
+ -$(INS.dir.root.bin)
+
+$(USR_JAVELIN_ISYS_DIR): $(USR_JAVELIN_INC_DIR)
+ -$(INS.dir.root.bin)
+
+$(ROOT_JAVELIN_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_JAVELIN_MOD_DIR) FRC
+ $(INS.file)
+
+$(ROOT_JAVELIN_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_JAVELIN_MISC_DIR) FRC
+ $(INS.file)
+
+$(ROOT_JAVELIN_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_JAVELIN_DRV_DIR) FRC
+ $(INS.file)
+
+#
+# Include common targets.
+#
+include $(UTSTREE)/sun4u/javelin/Makefile.rules
+include $(UTSTREE)/sun4u/Makefile.targ
diff --git a/usr/src/uts/sun4u/kmech_krb5/inc.flg b/usr/src/uts/sun4u/kmech_krb5/inc.flg
index 1bee76586c..90010a2199 100644
--- a/usr/src/uts/sun4u/kmech_krb5/inc.flg
+++ b/usr/src/uts/sun4u/kmech_krb5/inc.flg
@@ -23,16 +23,18 @@
#
# ident "%Z%%M% %I% %E% SMI"
#
-# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
find_files "s.*.h" usr/src/uts/common/sys
+find_files "s.*.h" usr/closed/uts/common/sys
find_files "s.*.h" usr/src/uts/common/rpc
find_files "s.*.h" usr/src/uts/common/gssapi
find_files "s.*.h" usr/src/uts/common/vm
find_files "s.*.h" usr/src/uts/common/netinet
find_files "s.*.h" usr/src/uts/common/net
find_files "s.*.h" usr/src/uts/sun4u/sys
+find_files "s.*.h" usr/closed/uts/sun4u/sys
find_files "s.*.h" usr/src/uts/sparc/sys
find_files "s.*.h" usr/src/uts/sparc/v7
find_files "s.*.h" usr/src/uts/sparc/v9
@@ -42,3 +44,4 @@ find_files "s.*" usr/src/uts/sparc/ml
find_files "s.*" usr/src/uts/sfmmu
find_files "s.*" usr/src/uts/common/gssapi/mechs/krb5
find_files "s.*" usr/src/lib/gss_mechs/mech_krb5
+find_files "s.*" usr/closed/lib/gss_mechs/mech_krb5
diff --git a/usr/src/uts/sun4u/kmech_krb5/req.flg b/usr/src/uts/sun4u/kmech_krb5/req.flg
index 1725449822..27d90534b8 100644
--- a/usr/src/uts/sun4u/kmech_krb5/req.flg
+++ b/usr/src/uts/sun4u/kmech_krb5/req.flg
@@ -23,20 +23,30 @@
#
# ident "%Z%%M% %I% %E% SMI"
#
-# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
echo_file usr/src/uts/sun4u/Makefile
echo_file usr/src/uts/sun4u/Makefile.files
+echo_file usr/closed/uts/sun4u/Makefile.files
echo_file usr/src/uts/sun4u/Makefile.sun4u
+echo_file usr/src/uts/sun4u/Makefile.sun4u.shared
+echo_file usr/closed/uts/sun4u/Makefile.sun4u
echo_file usr/src/uts/sun4u/Makefile.rules
+echo_file usr/closed/uts/sun4u/Makefile.rules
echo_file usr/src/uts/sun4u/Makefile.targ
+echo_file usr/src/uts/sun4u/Makefile.targ.shared
+echo_file usr/closed/uts/sun4u/Makefile.targ
echo_file usr/src/uts/sun4u/Makefile.workarounds
echo_file usr/src/uts/sparc/Makefile.rules
echo_file usr/src/uts/sparc/Makefile.files
echo_file usr/src/uts/sun/Makefile.files
+echo_file usr/closed/uts/sun/Makefile.files
echo_file usr/src/uts/sun/Makefile.rules
+echo_file usr/closed/uts/sun/Makefile.rules
echo_file usr/src/uts/sparc/v9/Makefile.files
echo_file usr/src/uts/sparc/v9/Makefile.rules
echo_file usr/src/uts/common/Makefile.files
+echo_file usr/closed/uts/common/Makefile.files
echo_file usr/src/uts/common/Makefile.rules
+echo_file usr/closed/uts/common/Makefile.rules
diff --git a/usr/src/uts/sun4u/littleneck/Makefile b/usr/src/uts/sun4u/littleneck/Makefile
index d7368e69dd..45809decc0 100644
--- a/usr/src/uts/sun4u/littleneck/Makefile
+++ b/usr/src/uts/sun4u/littleneck/Makefile
@@ -21,7 +21,7 @@
#
#
# uts/sun4u/littleneck/Makefile
-# Copyright 1994-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -49,6 +49,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -57,7 +59,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean.lint clean clobber: $(LITTLENECK_KMODS)
+def all clean.lint clean clobber modlist: $(LITTLENECK_KMODS)
modlintlib: $(LITTLENECK_KMODS)
@@ -83,6 +85,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(LITTLENECK_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -90,7 +93,7 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(LITTLENECK_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(LITTLENECK_CRYPTO_LINKS): $(ROOT_LITTLENECK_CRYPTO_DIR_64)
-$(RM) $(ROOT_LITTLENECK_CRYPTO_DIR_64)/$@;
diff --git a/usr/src/uts/sun4u/montecarlo/Makefile b/usr/src/uts/sun4u/montecarlo/Makefile
index 6b29c4cd32..fca5358f84 100644
--- a/usr/src/uts/sun4u/montecarlo/Makefile
+++ b/usr/src/uts/sun4u/montecarlo/Makefile
@@ -21,8 +21,8 @@
#
#
# uts/sun4u/montecarlo/Makefile
-# Copyright (c) 1999-2001 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
#
@@ -51,6 +51,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
#lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -59,15 +61,16 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean.lint clean clobber: $(MONTECARLO_KMODS)
+def all clean.lint clean clobber modlist: $(MONTECARLO_KMODS) \
+ $(CLOSED_MONTECARLO_KMODS)
-modlintlib: $(MONTECARLO_KMODS)
+modlintlib: $(MONTECARLO_KMODS) $(CLOSED_MONTECARLO_KMODS)
install: $(ROOT_MONTECARLO_DIR) $(USR_MONTECARLO_DIR) \
$(USR_MONTECARLO_INC_DIR) \
$(USR_MONTECARLO_SBIN_DIR) \
$(USR_MONTECARLO_LIB_DIR) \
- .WAIT $(MONTECARLO_KMODS) \
+ .WAIT $(MONTECARLO_KMODS) $(CLOSED_MONTECARLO_KMODS) \
pcicfg se.conf ttymux.conf
pcicfg: $(ROOT_MONTECARLO_MISC_DIR_64)
@@ -104,6 +107,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(MONTECARLO_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -111,7 +115,11 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(MONTECARLO_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(CLOSED_MONTECARLO_KMODS): FRC
+ cd $(CLOSED)/uts/sun4u/montecarlo/$@; pwd; \
+ $(MAKE) $(NO_STATE) $(TARGET)
#
# Include common targets.
diff --git a/usr/src/uts/sun4u/montecarlo/Makefile.files b/usr/src/uts/sun4u/montecarlo/Makefile.files
index f55251b597..b679622481 100644
--- a/usr/src/uts/sun4u/montecarlo/Makefile.files
+++ b/usr/src/uts/sun4u/montecarlo/Makefile.files
@@ -21,8 +21,8 @@
#
#
# uts/sun4u/montecarlo/Makefile.files
-# Copyright (c) 1999-2001 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
#
@@ -40,11 +40,7 @@
# XXX_OBJS = xxx.o [yyy.o ...]
#
-PCF8591_NCT_OBJS = pcf8591_nct.o
-PCF8574_NCT_OBJS = pcf8574_nct.o
-SCSB_OBJS = scsb.o hsc.o
TTYMUX_DACF_OBJS = ttymux_dacf.o ttymux_dacf_util.o
-ACEBUS_OBJS = acebus.o
#
# Miscellaneous
diff --git a/usr/src/uts/sun4u/montecarlo/Makefile.montecarlo b/usr/src/uts/sun4u/montecarlo/Makefile.montecarlo
index 33d8289b83..e0a8f7bcae 100644
--- a/usr/src/uts/sun4u/montecarlo/Makefile.montecarlo
+++ b/usr/src/uts/sun4u/montecarlo/Makefile.montecarlo
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,73 +18,12 @@
#
# CDDL HEADER END
#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
-# uts/sun4u/montecarlo/Makefile.impl
-# Copyright (c) 1999-2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# This makefile contains the common definitions for the
-# sun4u MonteCarlo system dependent modules.
-#
-
-#
-# Define directories.
+# ident "%Z%%M% %I% %E% SMI"
#
-ROOT_MONTECARLO_DIR = $(ROOT_PLAT_DIR)/SUNW,UltraSPARC-IIi-Netract
-ROOT_MONTECARLO_MOD_DIR = $(ROOT_MONTECARLO_DIR)/kernel
-ROOT_MONTECARLO_KERN_DIR_32 = $(ROOT_MONTECARLO_MOD_DIR)
-ROOT_MONTECARLO_KERN_DIR_64 = $(ROOT_MONTECARLO_MOD_DIR)/$(SUBDIR64)
-ROOT_MONTECARLO_DRV_DIR_32 = $(ROOT_MONTECARLO_MOD_DIR)/drv
-ROOT_MONTECARLO_DACF_DIR_32 = $(ROOT_MONTECARLO_MOD_DIR)/dacf
-ROOT_MONTECARLO_DACF_DIR_64 = $(ROOT_MONTECARLO_MOD_DIR)/dacf/$(SUBDIR64)
-ROOT_MONTECARLO_DRV_DIR_64 = $(ROOT_MONTECARLO_MOD_DIR)/drv/$(SUBDIR64)
-ROOT_MONTECARLO_MISC_DIR_32 = $(ROOT_MONTECARLO_MOD_DIR)/misc
-ROOT_MONTECARLO_MISC_DIR_64 = $(ROOT_MONTECARLO_MOD_DIR)/misc/$(SUBDIR64)
-
-ROOT_MONTECARLO_KERN_DIR = $(ROOT_MONTECARLO_KERN_DIR_$(CLASS))
-ROOT_MONTECARLO_MISC_DIR = $(ROOT_MONTECARLO_MISC_DIR_$(CLASS))
-ROOT_MONTECARLO_DRV_DIR = $(ROOT_MONTECARLO_DRV_DIR_$(CLASS))
-ROOT_MONTECARLO_DACF_DIR = $(ROOT_MONTECARLO_DACF_DIR_$(CLASS))
-
-ROOT_PLAT_MOD_DIRS += $(ROOT_MONTECARLO_MOD_DIR)
-ROOT_PLAT_MISC_DIRS += $(ROOT_MONTECARLO_MISC_DIR)
-ROOT_PLAT_MISC_DIRS_32 += $(ROOT_MONTECARLO_MISC_DIR_32)
-ROOT_PLAT_DRV_DIRS = $(ROOT_MONTECARLO_DRV_DIR)
-ROOT_PLAT_DACF_DIRS = $(ROOT_MONTECARLO_DACF_DIR)
-
-USR_MONTECARLO_DIR = $(USR_PLAT_DIR)/SUNW,UltraSPARC-IIi-Netract
-USR_MONTECARLO_INC_DIR = $(USR_MONTECARLO_DIR)/include
-USR_MONTECARLO_SBIN_DIR = $(USR_MONTECARLO_DIR)/sbin
-USR_MONTECARLO_LIB_DIR = $(USR_MONTECARLO_DIR)/lib
-USR_MONTECARLO_ISYS_DIR = $(USR_MONTECARLO_INC_DIR)/sys
-
-MONTECARLO_LINT_LIB_DIR= $(UTSBASE)/$(PLATFORM)/montecarlo/lint-libs/$(OBJS_DIR)
-
-#
-# Define objects.
-#
-
-#
-# Define modules.
-#
-MONTECARLO_KMODS = acebus pcf8574_nct pcf8591_nct scsb ttymux_dacf
-
-include $(UTSBASE)/sun4u/montecarlo/Makefile.files
-
-#
-# Include common rules.
-#
-include $(UTSBASE)/sun4u/Makefile.sun4u
-
-#
-# we need the official MONTECARLO name here, and for the sun4u/montecarlo
-# directory and Makefile.montecarlo
-# for now we'll use montecarlo for workspace file/dir names
-# and NORDICA_CP1500 for conditional code compiles, since that's our current
-# test platform
-#
-MACHINE_DEFS += -DNORDICA_CP1500
+UTSTREE=$(UTSBASE)
+include $(UTSBASE)/sun4u/montecarlo/Makefile.montecarlo.shared
diff --git a/usr/src/uts/sun4u/montecarlo/Makefile.montecarlo.shared b/usr/src/uts/sun4u/montecarlo/Makefile.montecarlo.shared
new file mode 100644
index 0000000000..988638fe90
--- /dev/null
+++ b/usr/src/uts/sun4u/montecarlo/Makefile.montecarlo.shared
@@ -0,0 +1,92 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/sun4u/montecarlo/Makefile.impl
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# This makefile contains the common definitions for the
+# sun4u MonteCarlo system dependent modules.
+#
+
+#
+# Define directories.
+#
+ROOT_MONTECARLO_DIR = $(ROOT_PLAT_DIR)/SUNW,UltraSPARC-IIi-Netract
+ROOT_MONTECARLO_MOD_DIR = $(ROOT_MONTECARLO_DIR)/kernel
+
+ROOT_MONTECARLO_KERN_DIR_32 = $(ROOT_MONTECARLO_MOD_DIR)
+ROOT_MONTECARLO_KERN_DIR_64 = $(ROOT_MONTECARLO_MOD_DIR)/$(SUBDIR64)
+ROOT_MONTECARLO_DRV_DIR_32 = $(ROOT_MONTECARLO_MOD_DIR)/drv
+ROOT_MONTECARLO_DACF_DIR_32 = $(ROOT_MONTECARLO_MOD_DIR)/dacf
+ROOT_MONTECARLO_DACF_DIR_64 = $(ROOT_MONTECARLO_MOD_DIR)/dacf/$(SUBDIR64)
+ROOT_MONTECARLO_DRV_DIR_64 = $(ROOT_MONTECARLO_MOD_DIR)/drv/$(SUBDIR64)
+ROOT_MONTECARLO_MISC_DIR_32 = $(ROOT_MONTECARLO_MOD_DIR)/misc
+ROOT_MONTECARLO_MISC_DIR_64 = $(ROOT_MONTECARLO_MOD_DIR)/misc/$(SUBDIR64)
+
+ROOT_MONTECARLO_KERN_DIR = $(ROOT_MONTECARLO_KERN_DIR_$(CLASS))
+ROOT_MONTECARLO_MISC_DIR = $(ROOT_MONTECARLO_MISC_DIR_$(CLASS))
+ROOT_MONTECARLO_DRV_DIR = $(ROOT_MONTECARLO_DRV_DIR_$(CLASS))
+ROOT_MONTECARLO_DACF_DIR = $(ROOT_MONTECARLO_DACF_DIR_$(CLASS))
+
+ROOT_PLAT_MOD_DIRS += $(ROOT_MONTECARLO_MOD_DIR)
+ROOT_PLAT_MISC_DIRS += $(ROOT_MONTECARLO_MISC_DIR)
+ROOT_PLAT_MISC_DIRS_32 += $(ROOT_MONTECARLO_MISC_DIR_32)
+ROOT_PLAT_DRV_DIRS = $(ROOT_MONTECARLO_DRV_DIR)
+ROOT_PLAT_DACF_DIRS = $(ROOT_MONTECARLO_DACF_DIR)
+
+USR_MONTECARLO_DIR = $(USR_PLAT_DIR)/SUNW,UltraSPARC-IIi-Netract
+USR_MONTECARLO_INC_DIR = $(USR_MONTECARLO_DIR)/include
+USR_MONTECARLO_SBIN_DIR = $(USR_MONTECARLO_DIR)/sbin
+USR_MONTECARLO_LIB_DIR = $(USR_MONTECARLO_DIR)/lib
+USR_MONTECARLO_ISYS_DIR = $(USR_MONTECARLO_INC_DIR)/sys
+
+MONTECARLO_LINT_LIB_DIR= $(UTSBASE)/$(PLATFORM)/montecarlo/lint-libs/$(OBJS_DIR)
+
+#
+# Define objects.
+#
+
+include $(UTSTREE)/sun4u/montecarlo/Makefile.files
+
+#
+# Include common rules.
+#
+include $(UTSTREE)/sun4u/Makefile.sun4u
+
+#
+# Define modules (must come after Makefile.sun4u, for CLOSED_BUILD).
+#
+MONTECARLO_KMODS = ttymux_dacf
+
+$(CLOSED_BUILD)CLOSED_MONTECARLO_KMODS = acebus pcf8574_nct pcf8591_nct scsb
+
+#
+# we need the official MONTECARLO name here, and for the sun4u/montecarlo
+# directory and Makefile.montecarlo
+# for now we'll use montecarlo for workspace file/dir names
+# and NORDICA_CP1500 for conditional code compiles, since that's our current
+# test platform
+#
+MACHINE_DEFS += -DNORDICA_CP1500
+
diff --git a/usr/src/uts/sun4u/montecarlo/Makefile.targ b/usr/src/uts/sun4u/montecarlo/Makefile.targ
index d2338b924b..82741e5359 100644
--- a/usr/src/uts/sun4u/montecarlo/Makefile.targ
+++ b/usr/src/uts/sun4u/montecarlo/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,75 +18,12 @@
#
# CDDL HEADER END
#
-#
-# Copyright 1999-2001,2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# Common targets for sun4u MonteCarlo implementation specific modules.
-#
+# ident "%Z%%M% %I% %E% SMI"
#
-# Platform targets
-#
-$(ROOT_MONTECARLO_DIR): $(ROOT_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-.KEEP_STATE:
-
-#
-# Rules for implementation subdirectories.
-#
-$(ROOT_MONTECARLO_MOD_DIR): $(ROOT_MONTECARLO_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_MONTECARLO_DACF_DIR_32): $(ROOT_MONTECARLO_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_MONTECARLO_DACF_DIR_64): $(ROOT_MONTECARLO_DACF_DIR_32)
- -$(INS.dir.root.sys)
-
-$(ROOT_MONTECARLO_DRV_DIR_32): $(ROOT_MONTECARLO_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_MONTECARLO_DRV_DIR_64): $(ROOT_MONTECARLO_DRV_DIR_32)
- -$(INS.dir.root.sys)
-$(ROOT_MONTECARLO_MISC_DIR_32): $(ROOT_MONTECARLO_MOD_DIR)
- -$(INS.dir.root.sys)
+UTSTREE=$(UTSBASE)
-$(ROOT_MONTECARLO_MISC_DIR_64): $(ROOT_MONTECARLO_MISC_DIR_32)
- -$(INS.dir.root.sys)
-
-$(USR_MONTECARLO_DIR): $(USR_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(USR_MONTECARLO_INC_DIR): $(USR_MONTECARLO_DIR)
- -$(INS.slink4)
-
-$(USR_MONTECARLO_SBIN_DIR): $(USR_MONTECARLO_DIR)
- -$(INS.slink5)
-
-$(USR_MONTECARLO_LIB_DIR): $(USR_MONTECARLO_DIR)
- -$(INS.dir.root.bin)
-
-$(USR_MONTECARLO_ISYS_DIR): $(USR_MONTECARLO_INC_DIR)
- -$(INS.dir.root.bin)
-
-$(ROOT_MONTECARLO_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_MONTECARLO_MOD_DIR) FRC
- $(INS.file)
-
-$(ROOT_MONTECARLO_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_MONTECARLO_MISC_DIR) FRC
- $(INS.file)
-
-$(ROOT_MONTECARLO_DACF_DIR)/%: $(OBJS_DIR)/% $(ROOT_MONTECARLO_DACF_DIR)
- $(INS.file)
-
-$(ROOT_MONTECARLO_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_MONTECARLO_DRV_DIR) FRC
- $(INS.file)
-
-#
-# Include common targets.
-#
-include $(UTSBASE)/sun4u/montecarlo/Makefile.rules
-include $(UTSBASE)/sun4u/Makefile.targ
+include $(UTSBASE)/sun4u/montecarlo/Makefile.targ.shared
diff --git a/usr/src/uts/sun4u/montecarlo/Makefile.targ.shared b/usr/src/uts/sun4u/montecarlo/Makefile.targ.shared
new file mode 100644
index 0000000000..08957e054a
--- /dev/null
+++ b/usr/src/uts/sun4u/montecarlo/Makefile.targ.shared
@@ -0,0 +1,93 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# Common targets for sun4u MonteCarlo implementation specific modules.
+#
+#
+# Platform targets
+#
+$(ROOT_MONTECARLO_DIR): $(ROOT_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+.KEEP_STATE:
+
+#
+# Rules for implementation subdirectories.
+#
+$(ROOT_MONTECARLO_MOD_DIR): $(ROOT_MONTECARLO_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MONTECARLO_DACF_DIR_32): $(ROOT_MONTECARLO_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MONTECARLO_DACF_DIR_64): $(ROOT_MONTECARLO_DACF_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MONTECARLO_DRV_DIR_32): $(ROOT_MONTECARLO_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MONTECARLO_DRV_DIR_64): $(ROOT_MONTECARLO_DRV_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MONTECARLO_MISC_DIR_32): $(ROOT_MONTECARLO_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MONTECARLO_MISC_DIR_64): $(ROOT_MONTECARLO_MISC_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(USR_MONTECARLO_DIR): $(USR_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(USR_MONTECARLO_INC_DIR): $(USR_MONTECARLO_DIR)
+ -$(INS.slink4)
+
+$(USR_MONTECARLO_SBIN_DIR): $(USR_MONTECARLO_DIR)
+ -$(INS.slink5)
+
+$(USR_MONTECARLO_LIB_DIR): $(USR_MONTECARLO_DIR)
+ -$(INS.dir.root.bin)
+
+$(USR_MONTECARLO_ISYS_DIR): $(USR_MONTECARLO_INC_DIR)
+ -$(INS.dir.root.bin)
+
+$(ROOT_MONTECARLO_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_MONTECARLO_MOD_DIR) FRC
+ $(INS.file)
+
+$(ROOT_MONTECARLO_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_MONTECARLO_MISC_DIR) FRC
+ $(INS.file)
+
+$(ROOT_MONTECARLO_DACF_DIR)/%: $(OBJS_DIR)/% $(ROOT_MONTECARLO_DACF_DIR)
+ $(INS.file)
+
+$(ROOT_MONTECARLO_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_MONTECARLO_DRV_DIR) FRC
+ $(INS.file)
+
+#
+# Include common targets.
+#
+include $(UTSTREE)/sun4u/montecarlo/Makefile.rules
+include $(UTSTREE)/sun4u/Makefile.targ
diff --git a/usr/src/uts/sun4u/montecarlo/sys/Makefile b/usr/src/uts/sun4u/montecarlo/sys/Makefile
index c92ee931de..9bfb8e916a 100644
--- a/usr/src/uts/sun4u/montecarlo/sys/Makefile
+++ b/usr/src/uts/sun4u/montecarlo/sys/Makefile
@@ -22,8 +22,8 @@
#
# ident "%Z%%M% %I% %E% SMI"
#
-# Copyright (c) 1997-2000, by Sun Microsystems, Inc.
-# All Rights Reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
UTSBASE = ../../..
@@ -38,9 +38,11 @@ include ../Makefile.montecarlo
FILEMODE = 644
GROUP = bin
-HDRS= scsb_led.h
+HDRS=
+CLOSEDHDRS=scsb_led.h
ROOTHDRS= $(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
+$(CLOSED_BUILD)ROOTHDRS += $(CLOSEDHDRS:%=$(USR_PSM_ISYS_DIR)/%)
ROOTDIR= $(ROOT)/usr/share/src
ROOTDIRS= $(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
@@ -49,6 +51,8 @@ ROOTLINK= $(ROOTDIR)/uts/$(PLATFORM)/sys
LINKDEST= ../../../../platform/$(PLATFORM)/include/sys
CHECKHDRS= $(HDRS:%.h=%.check)
+$(CLOSED_BUILD)CHECKHDRS += \
+ $(CLOSEDHDRS:%.h=$(CLOSED)/uts/sun4u/montecarlo/sys/%.check)
.KEEP_STATE:
@@ -61,7 +65,10 @@ check: $(CHECKHDRS)
#
# install rules
#
-$(USR_MONTECARLO_ISYS_DIR)/%: % $(USR_MONTECARLO_ISYS_DIR)
+$(USR_PSM_ISYS_DIR)/%: % $(USR_PSM_ISYS_DIR)
+ $(INS.file)
+
+$(USR_PSM_ISYS_DIR)/%: $(CLOSED)/uts/sun4u/montecarlo/sys/%
$(INS.file)
$(ROOTDIRS):
diff --git a/usr/src/uts/sun4u/mpxu/Makefile b/usr/src/uts/sun4u/mpxu/Makefile
index 57a0b99280..a5749ac140 100644
--- a/usr/src/uts/sun4u/mpxu/Makefile
+++ b/usr/src/uts/sun4u/mpxu/Makefile
@@ -21,7 +21,7 @@
#
#
# uts/sun4u/mpxu/Makefile
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -53,6 +53,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -61,11 +63,11 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: $(MPXU_KMODS)
+def all clean clean.lint clobber modlist: $(MPXU_KMODS) $(CLOSED_MPXU_KMODS)
lintlib: unix
-modlintlib: $(MPXU_KMODS)
+modlintlib: $(MPXU_KMODS) $(CLOSED_MPXU_KMODS)
IMPLEMENTED_PLATFORM = SUNW,Sun-Fire-V240
@@ -92,10 +94,14 @@ install: $(ROOT_MPXU_DIR) $(USR_MPXU_DIR) \
$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%) \
$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%) \
$(MPXU_CRYPTO_LINKS) \
+ $(CLOSED_MPXU_KMODS) \
.WAIT $(MPXU_KMODS)
$(MPXU_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(CLOSED_MPXU_KMODS): FRC
+ cd $(CLOSED)/uts/sun4u/mpxu/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(MPXU_CRYPTO_LINKS): $(ROOT_MPXU_CRYPTO_DIR_64)
-$(RM) $(ROOT_MPXU_CRYPTO_DIR_64)/$@;
@@ -110,6 +116,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(MPXU_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
diff --git a/usr/src/uts/sun4u/mpxu/Makefile.files b/usr/src/uts/sun4u/mpxu/Makefile.files
index 06b42042b1..60935a6982 100644
--- a/usr/src/uts/sun4u/mpxu/Makefile.files
+++ b/usr/src/uts/sun4u/mpxu/Makefile.files
@@ -21,7 +21,7 @@
#
#
# uts/sun4u/mpxu/Makefile.files
-# Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -34,9 +34,7 @@
#
# Define objects.
#
-MPXU_PLATMOD_OBJS = mpxu.o
MPXU_TSALARM_OBJS = tsalarm.o
-NTWDT_OBJS = ntwdt.o
#
# include mpxu header files
diff --git a/usr/src/uts/sun4u/mpxu/Makefile.mpxu b/usr/src/uts/sun4u/mpxu/Makefile.mpxu
index ecffbbe961..19dc84d49e 100644
--- a/usr/src/uts/sun4u/mpxu/Makefile.mpxu
+++ b/usr/src/uts/sun4u/mpxu/Makefile.mpxu
@@ -19,102 +19,12 @@
#
# CDDL HEADER END
#
-#
-# uts/sun4u/mpxu/Makefile.mpxu
-# Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-
-#
-# Global definitions for sun4u implementation specific modules.
-#
-
-#
-# Define the name of this implementation.
-#
-
-#
-# Define directories.
-#
-ROOT_MPXU_DIR = $(ROOT_PLAT_DIR)/SUNW,Sun-Fire-V240
-ROOT_MPXU_MOD_DIR = $(ROOT_MPXU_DIR)/kernel
-
-ROOT_MPXU_DRV_DIR_32 = $(ROOT_MPXU_MOD_DIR)/drv
-ROOT_MPXU_DRV_DIR_64 = $(ROOT_MPXU_MOD_DIR)/drv/$(SUBDIR64)
-ROOT_MPXU_DRV_DIR = $(ROOT_MPXU_DRV_DIR_$(CLASS))
-
-ROOT_MPXU_MISC_DIR_32 = $(ROOT_MPXU_MOD_DIR)/misc
-ROOT_MPXU_MISC_DIR_64 = $(ROOT_MPXU_MOD_DIR)/misc/$(SUBDIR64)
-ROOT_MPXU_MISC_DIR = $(ROOT_MPXU_MISC_DIR_$(CLASS))
-
-ROOT_MPXU_CRYPTO_DIR_32 = $(ROOT_MPXU_MOD_DIR)/crypto
-ROOT_MPXU_CRYPTO_DIR_64 = $(ROOT_MPXU_MOD_DIR)/crypto/$(SUBDIR64)
-ROOT_MPXU_CRYPTO_DIR = $(ROOT_MPXU_CRYPTO_DIR_$(CLASS))
-
-USR_MPXU_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V240
-USR_MPXU_INC_DIR = $(USR_MPXU_DIR)/include
-USR_MPXU_ISYS_DIR = $(USR_MPXU_INC_DIR)/sys
-USR_MPXU_SBIN_DIR = $(USR_MPXU_DIR)/sbin
-USR_MPXU_SBIN_EEPROM = $(USR_MPXU_SBIN_DIR)/eeprom
-USR_MPXU_SBIN_PRTDIAG = $(USR_MPXU_SBIN_DIR)/prtdiag
-USR_MPXU_SBIN_TRAPSTAT = $(USR_MPXU_SBIN_DIR)/trapstat
-USR_MPXU_SBIN_FRUADM = $(USR_MPXU_SBIN_DIR)/fruadm
-USR_MPXU_LIB_DIR = $(USR_MPXU_DIR)/lib
-
-MPXU_LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/mpxu/lint-libs/$(OBJS_DIR)
-
-#
-# Define modules.
+# ident "%Z%%M% %I% %E% SMI"
#
-MPXU_KMODS = platmod tsalarm ntwdt
-#
-# Links to UltraSparc III crypto modules
-#
-MPXU_CRYPTO_LINKS = aes
-
-#
-# Include the makefiles which define build rule templates, the
-# collection of files per module, and a few specific flags. Note
-# that order is significant, just as with an include path. The
-# first build rule template which matches the files name will be
-# used. By including these in order from most machine dependent
-# to most machine independent, we allow a machine dependent file
-# to be used in preference over a machine independent version
-# (Such as a machine specific optimization, which preserves the
-# interfaces.)
-#
-
-include $(UTSBASE)/sun4u/mpxu/Makefile.files
-#
-# Include common rules.
-#
-
-include $(UTSBASE)/sun4u/Makefile.sun4u
-MODSTUBS_DIR = $(UNIX_DIR)
-LINTS_DIR = $(OBJS_DIR)
-LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/mpxu/lint-libs/$(OBJS_DIR)
-
-#
-# Define the actual specific platforms
-#
-MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU -DMP
-
-#
-# Define platform specific values
-#
-#MACHINE_DEFS += -DNCPU=554
-#MACHINE_DEFS += -DMAX_UPA=1024
-#MACHINE_DEFS += -DIGN_SIZE=10
-# Max IOSRAM TOC major version number supported
-#MACHINE_DEFS += -DMAX_IOSRAM_TOC_VER=0x1
-
-# Define for inline pre-processing since
-# cpp not smart about v9 yet.
-#
-CPP_DEFS_32 =
-CPP_DEFS_64 = -D__sparcv9
-CPP_DEFS = $(CPP_DEFS_$(CLASS))
+UTSTREE=$(UTSBASE)
+include $(UTSBASE)/sun4u/mpxu/Makefile.mpxu.shared
diff --git a/usr/src/uts/sun4u/mpxu/Makefile.mpxu.shared b/usr/src/uts/sun4u/mpxu/Makefile.mpxu.shared
new file mode 100644
index 0000000000..7208b4f3ec
--- /dev/null
+++ b/usr/src/uts/sun4u/mpxu/Makefile.mpxu.shared
@@ -0,0 +1,121 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/sun4u/mpxu/Makefile.mpxu
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+
+#
+# Global definitions for sun4u implementation specific modules.
+#
+
+#
+# Define the name of this implementation.
+#
+
+#
+# Define directories.
+#
+ROOT_MPXU_DIR = $(ROOT_PLAT_DIR)/SUNW,Sun-Fire-V240
+ROOT_MPXU_MOD_DIR = $(ROOT_MPXU_DIR)/kernel
+
+ROOT_MPXU_DRV_DIR_32 = $(ROOT_MPXU_MOD_DIR)/drv
+ROOT_MPXU_DRV_DIR_64 = $(ROOT_MPXU_MOD_DIR)/drv/$(SUBDIR64)
+ROOT_MPXU_DRV_DIR = $(ROOT_MPXU_DRV_DIR_$(CLASS))
+
+ROOT_MPXU_MISC_DIR_32 = $(ROOT_MPXU_MOD_DIR)/misc
+ROOT_MPXU_MISC_DIR_64 = $(ROOT_MPXU_MOD_DIR)/misc/$(SUBDIR64)
+ROOT_MPXU_MISC_DIR = $(ROOT_MPXU_MISC_DIR_$(CLASS))
+
+ROOT_MPXU_CRYPTO_DIR_32 = $(ROOT_MPXU_MOD_DIR)/crypto
+ROOT_MPXU_CRYPTO_DIR_64 = $(ROOT_MPXU_MOD_DIR)/crypto/$(SUBDIR64)
+ROOT_MPXU_CRYPTO_DIR = $(ROOT_MPXU_CRYPTO_DIR_$(CLASS))
+
+USR_MPXU_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Fire-V240
+USR_MPXU_INC_DIR = $(USR_MPXU_DIR)/include
+USR_MPXU_ISYS_DIR = $(USR_MPXU_INC_DIR)/sys
+USR_MPXU_SBIN_DIR = $(USR_MPXU_DIR)/sbin
+USR_MPXU_SBIN_EEPROM = $(USR_MPXU_SBIN_DIR)/eeprom
+USR_MPXU_SBIN_PRTDIAG = $(USR_MPXU_SBIN_DIR)/prtdiag
+USR_MPXU_SBIN_TRAPSTAT = $(USR_MPXU_SBIN_DIR)/trapstat
+USR_MPXU_SBIN_FRUADM = $(USR_MPXU_SBIN_DIR)/fruadm
+USR_MPXU_LIB_DIR = $(USR_MPXU_DIR)/lib
+
+MPXU_LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/mpxu/lint-libs/$(OBJS_DIR)
+
+#
+# Links to UltraSparc III crypto modules
+#
+MPXU_CRYPTO_LINKS = aes
+
+#
+# Include the makefiles which define build rule templates, the
+# collection of files per module, and a few specific flags. Note
+# that order is significant, just as with an include path. The
+# first build rule template which matches the files name will be
+# used. By including these in order from most machine dependent
+# to most machine independent, we allow a machine dependent file
+# to be used in preference over a machine independent version
+# (Such as a machine specific optimization, which preserves the
+# interfaces.)
+#
+
+include $(UTSTREE)/sun4u/mpxu/Makefile.files
+#
+# Include common rules.
+#
+
+include $(UTSTREE)/sun4u/Makefile.sun4u
+
+#
+# Define modules (must come after Makefile.sun4u, for CLOSED_BUILD).
+#
+MPXU_KMODS = tsalarm
+$(CLOSED_BUILD)CLOSED_MPXU_KMODS = platmod ntwdt
+
+MODSTUBS_DIR = $(UNIX_DIR)
+LINTS_DIR = $(OBJS_DIR)
+LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/mpxu/lint-libs/$(OBJS_DIR)
+
+#
+# Define the actual specific platforms
+#
+MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU -DMP
+
+#
+# Define platform specific values
+#
+#MACHINE_DEFS += -DNCPU=554
+#MACHINE_DEFS += -DMAX_UPA=1024
+#MACHINE_DEFS += -DIGN_SIZE=10
+# Max IOSRAM TOC major version number supported
+#MACHINE_DEFS += -DMAX_IOSRAM_TOC_VER=0x1
+
+# Define for inline pre-processing since
+# cpp not smart about v9 yet.
+#
+CPP_DEFS_32 =
+CPP_DEFS_64 = -D__sparcv9
+CPP_DEFS = $(CPP_DEFS_$(CLASS))
+
diff --git a/usr/src/uts/sun4u/mpxu/Makefile.targ b/usr/src/uts/sun4u/mpxu/Makefile.targ
index 4bef8ad71f..1cc834d0b2 100644
--- a/usr/src/uts/sun4u/mpxu/Makefile.targ
+++ b/usr/src/uts/sun4u/mpxu/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,87 +18,12 @@
#
# CDDL HEADER END
#
-#
-# Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-
-#
-# Common targets for sun4u MPXU implementation specific modules.
-#
-
-.KEEP_STATE:
-
+# ident "%Z%%M% %I% %E% SMI"
#
-# Rules for implementation subdirectories.
-#
-$(ROOT_MPXU_DIR): $(ROOT_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_MPXU_MOD_DIR): $(ROOT_MPXU_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_MPXU_DRV_DIR_32): $(ROOT_MPXU_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_MPXU_DRV_DIR_64): $(ROOT_MPXU_DRV_DIR_32)
- -$(INS.dir.root.sys)
-
-$(ROOT_MPXU_MISC_DIR_32): $(ROOT_MPXU_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_MPXU_MISC_DIR_64): $(ROOT_MPXU_MISC_DIR_32)
- -$(INS.dir.root.sys)
-
-$(ROOT_MPXU_CRYPTO_DIR_32): $(ROOT_MPXU_MOD_DIR)
- -$(INS.dir.root.sys)
-$(ROOT_MPXU_CRYPTO_DIR_64): $(ROOT_MPXU_CRYPTO_DIR_32)
- -$(INS.dir.root.sys)
+UTSTREE=$(UTSBASE)
-$(USR_MPXU_DIR): $(USR_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(USR_MPXU_INC_DIR): $(USR_MPXU_DIR)
- $(INS.slink4)
-
-$(USR_MPXU_ISYS_DIR): $(USR_MPXU_INC_DIR)
- $(INS.dir.root.bin)
-
-$(USR_MPXU_SBIN_DIR): $(USR_MPXU_DIR)
- $(INS.dir.root.bin)
-
-$(USR_MPXU_SBIN_EEPROM): $(USR_MPXU_SBIN_DIR)
- $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/sbin/eeprom $@ $(CHOWNLINK) $(CHGRPLINK)
-
-$(USR_MPXU_SBIN_PRTDIAG): $(USR_MPXU_SBIN_DIR)
- $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/sbin/prtdiag $@ $(CHOWNLINK) $(CHGRPLINK)
-
-$(USR_MPXU_SBIN_TRAPSTAT): $(USR_MPXU_SBIN_DIR)
- $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/sbin/trapstat $@ $(CHOWNLINK) $(CHGRPLINK)
-
-$(USR_MPXU_SBIN_FRUADM): $(USR_MPXU_SBIN_DIR)
- $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/sbin/fruadm $@ $(CHOWNLINK) $(CHGRPLINK)
-
-$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%): $(ROOT_PLAT_DIR)
- $(INS.slink3)
-
-$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%): $(USR_PLAT_DIR)
- $(INS.slink3)
-
-$(USR_MPXU_LIB_DIR): $(USR_MPXU_DIR)
- -$(INS.dir.root.bin)
-
-$(ROOT_MPXU_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_MPXU_MISC_DIR)
- $(INS.file)
-
-$(ROOT_MPXU_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_MPXU_DRV_DIR) FRC
- $(INS.file)
-
-#
-# Include common targets.
-#
-include $(UTSBASE)/sun4u/mpxu/Makefile.rules
-include $(UTSBASE)/sun4u/Makefile.targ
+include $(UTSBASE)/sun4u/mpxu/Makefile.targ.shared
diff --git a/usr/src/uts/sun4u/mpxu/Makefile.targ.shared b/usr/src/uts/sun4u/mpxu/Makefile.targ.shared
new file mode 100644
index 0000000000..fb5225c2c1
--- /dev/null
+++ b/usr/src/uts/sun4u/mpxu/Makefile.targ.shared
@@ -0,0 +1,105 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+
+#
+# Common targets for sun4u MPXU implementation specific modules.
+#
+
+.KEEP_STATE:
+
+#
+# Rules for implementation subdirectories.
+#
+$(ROOT_MPXU_DIR): $(ROOT_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MPXU_MOD_DIR): $(ROOT_MPXU_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MPXU_DRV_DIR_32): $(ROOT_MPXU_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MPXU_DRV_DIR_64): $(ROOT_MPXU_DRV_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MPXU_MISC_DIR_32): $(ROOT_MPXU_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MPXU_MISC_DIR_64): $(ROOT_MPXU_MISC_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MPXU_CRYPTO_DIR_32): $(ROOT_MPXU_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_MPXU_CRYPTO_DIR_64): $(ROOT_MPXU_CRYPTO_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(USR_MPXU_DIR): $(USR_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(USR_MPXU_INC_DIR): $(USR_MPXU_DIR)
+ $(INS.slink4)
+
+$(USR_MPXU_ISYS_DIR): $(USR_MPXU_INC_DIR)
+ $(INS.dir.root.bin)
+
+$(USR_MPXU_SBIN_DIR): $(USR_MPXU_DIR)
+ $(INS.dir.root.bin)
+
+$(USR_MPXU_SBIN_EEPROM): $(USR_MPXU_SBIN_DIR)
+ $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/sbin/eeprom $@ $(CHOWNLINK) $(CHGRPLINK)
+
+$(USR_MPXU_SBIN_PRTDIAG): $(USR_MPXU_SBIN_DIR)
+ $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/sbin/prtdiag $@ $(CHOWNLINK) $(CHGRPLINK)
+
+$(USR_MPXU_SBIN_TRAPSTAT): $(USR_MPXU_SBIN_DIR)
+ $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/sbin/trapstat $@ $(CHOWNLINK) $(CHGRPLINK)
+
+$(USR_MPXU_SBIN_FRUADM): $(USR_MPXU_SBIN_DIR)
+ $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/sbin/fruadm $@ $(CHOWNLINK) $(CHGRPLINK)
+
+$(LINKED_PLATFORMS:%=$(ROOT_PLAT_DIR)/%): $(ROOT_PLAT_DIR)
+ $(INS.slink3)
+
+$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%): $(USR_PLAT_DIR)
+ $(INS.slink3)
+
+$(USR_MPXU_LIB_DIR): $(USR_MPXU_DIR)
+ -$(INS.dir.root.bin)
+
+$(ROOT_MPXU_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_MPXU_MISC_DIR)
+ $(INS.file)
+
+$(ROOT_MPXU_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_MPXU_DRV_DIR) FRC
+ $(INS.file)
+
+#
+# Include common targets.
+#
+include $(UTSTREE)/sun4u/mpxu/Makefile.rules
+include $(UTSTREE)/sun4u/Makefile.targ
diff --git a/usr/src/uts/sun4u/quasar/Makefile b/usr/src/uts/sun4u/quasar/Makefile
index 4e02007d61..b7f29bd0d4 100644
--- a/usr/src/uts/sun4u/quasar/Makefile
+++ b/usr/src/uts/sun4u/quasar/Makefile
@@ -21,7 +21,8 @@
#
#
# uts/sun4u/quasar/Makefile
-# Copyright (c) 1999 by Sun Microsystems, Inc.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
#
@@ -50,16 +51,23 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
#
# Default build targets.
#
+# Note that quasar doesn't currently have any modules of its own to
+# build.
+#
.KEEP_STATE:
def all install_h clean lint lintlib modlintlib clean.lint clobber check:
+modlist:
+
install: install_darwin $(INSTALL_DEPS) $(USR_QUASAR_DIR)
INSTALL_TARGET = platmod
diff --git a/usr/src/uts/sun4u/schumacher/Makefile b/usr/src/uts/sun4u/schumacher/Makefile
index 389e096e01..893dd0c41f 100644
--- a/usr/src/uts/sun4u/schumacher/Makefile
+++ b/usr/src/uts/sun4u/schumacher/Makefile
@@ -49,6 +49,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -57,7 +59,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: $(SCHUMACHER_KMODS)
+def all clean clean.lint clobber modlist: $(SCHUMACHER_KMODS)
modlintlib: $(SCHUMACHER_KMODS)
@@ -93,6 +95,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(SCHUMACHER_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -100,7 +103,7 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(SCHUMACHER_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(SCHUMACHER_CRYPTO_LINKS): $(ROOT_SCHUMACHER_CRYPTO_DIR_64)
-$(RM) $(ROOT_SCHUMACHER_CRYPTO_DIR_64)/$@;
diff --git a/usr/src/uts/sun4u/seattle/Makefile b/usr/src/uts/sun4u/seattle/Makefile
index 4267f95e2e..c8222eb676 100644
--- a/usr/src/uts/sun4u/seattle/Makefile
+++ b/usr/src/uts/sun4u/seattle/Makefile
@@ -52,6 +52,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -60,7 +62,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: $(SEATTLE_KMODS)
+def all clean clean.lint clobber modlist: $(SEATTLE_KMODS)
modlintlib: $(SEATTLE_KMODS)
@@ -100,6 +102,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(SEATTLE_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -107,7 +110,7 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(SEATTLE_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(SEATTLE_CRYPTO_LINKS): $(ROOT_SEATTLE_CRYPTO_DIR_64)
-$(RM) $(ROOT_SEATTLE_CRYPTO_DIR_64)/$@;
diff --git a/usr/src/uts/sun4u/serengeti/Makefile b/usr/src/uts/sun4u/serengeti/Makefile
index 30930b3d75..a6ccb23ab5 100644
--- a/usr/src/uts/sun4u/serengeti/Makefile
+++ b/usr/src/uts/sun4u/serengeti/Makefile
@@ -21,7 +21,7 @@
#
#
# uts/sun4u/serengeti/Makefile
-# Copyright 2000-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -51,6 +51,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -59,11 +61,14 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: genassym unix .WAIT $(SERENGETI_KMODS)
+def all clean clean.lint clobber: genassym unix .WAIT \
+ $(SERENGETI_KMODS) $(CLOSED_SERENGETI_KMODS)
+
+modlist: unix $(SERENGETI_KMODS) $(CLOSED_SERENGETI_KMODS)
lintlib: unix
-modlintlib: $(SERENGETI_KMODS)
+modlintlib: $(SERENGETI_KMODS) $(CLOSED_SERENGETI_KMODS)
IMPLEMENTED_PLATFORM = SUNW,Sun-Fire
@@ -81,16 +86,20 @@ install: $(ROOT_SERENGETI_DIR) $(USR_SERENGETI_DIR) \
$(USR_SERENGETI_LIB_DIR) \
$(SERENGETI_CRYPTO_LINKS) \
genassym unix .WAIT \
- $(SERENGETI_KMODS) \
+ $(SERENGETI_KMODS) $(CLOSED_SERENGETI_KMODS) \
pcicfg
-pcicfg: $(ROOT_PSM_MISC_DIR_64)/pcicfg.e
+pcicfg: $(ROOT_PSM_MISC_DIR_64)/pcicfg.e $(ROOT_SERENGETI_MISC_DIR_64)
-@$(RM) $(ROOT_SERENGETI_MISC_DIR_64)/$@
$(SYMLINK) ../../../../sun4u/kernel/misc/sparcv9/pcicfg.e \
$(ROOT_SERENGETI_MISC_DIR_64)/$@
genassym unix $(SERENGETI_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(CLOSED_SERENGETI_KMODS): FRC
+ cd $(CLOSED)/uts/sun4u/serengeti/$@; pwd; \
+ $(MAKE) $(NO_STATE) $(TARGET)
$(SERENGETI_CRYPTO_LINKS): $(ROOT_SERENGETI_CRYPTO_DIR_64)
-$(RM) $(ROOT_SERENGETI_CRYPTO_DIR_64)/$@;
@@ -111,6 +120,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(SERENGETI_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
diff --git a/usr/src/uts/sun4u/serengeti/Makefile.files b/usr/src/uts/sun4u/serengeti/Makefile.files
index 7078149e45..bb80a6c678 100644
--- a/usr/src/uts/sun4u/serengeti/Makefile.files
+++ b/usr/src/uts/sun4u/serengeti/Makefile.files
@@ -21,7 +21,7 @@
#
#
# uts/sun4u/serengeti/Makefile.files
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -32,13 +32,6 @@
#
# Define objects.
#
-SERENGETI_OBJS = serengeti.o serengeti_asm.o plat_ecc_unum.o sg_unum.o
-SGCN_OBJS = sgcn.o
-SGHSC_OBJS = sghsc.o
-SGSBBC_OBJS = sgsbbc.o sgsbbc_iosram.o sgsbbc_mailbox.o
-SBDP_OBJS = sbdp.o sbdp_quiesce.o sbdp_cpu.o sbdp_mem.o sbdp_asm.o \
- sbdp_dr.o sbdp_mbox.o sbdp_error.o
-SSM_OBJS = ssm.o
#
# serengeti-specific header file path
diff --git a/usr/src/uts/sun4u/serengeti/Makefile.rules b/usr/src/uts/sun4u/serengeti/Makefile.rules
index 85d7a82e80..6e1c62219b 100644
--- a/usr/src/uts/sun4u/serengeti/Makefile.rules
+++ b/usr/src/uts/sun4u/serengeti/Makefile.rules
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -39,37 +39,7 @@
#
# Section 1a: C object build rules
#
-SBDP_IL=$(OBJS_DIR)/sbdp.il
-
-$(OBJS_DIR)/sbdp_mem.o := CC_XARCH_32 = -xarch=v8plusa
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/serengeti/io/%.c $(SBDP_IL)
- $(COMPILE.c) $(SBDP_IL) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/serengeti/ml/%.s
- $(COMPILE.s) -o $@ $<
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/serengeti/os/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-# inline stuff
-
-IL_CPP=$(CPP) -P -DINLINE -D_ASM $(AS_INC_PATH) \
- $(CPP_DEFS) $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS)
-CLEANFILES += $(SBDP_IL)
-
-$(SBDP_IL): $(UTSBASE)/sun4u/serengeti/ml/sbdp.il.cpp
- $(IL_CPP) $(UTSBASE)/sun4u/serengeti/ml/sbdp.il.cpp >$@
#
# Section 1b: Lint `object' build rules
#
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/serengeti/io/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/serengeti/ml/%.s
- @($(LHEAD) $(LINT.s) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/serengeti/os/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
diff --git a/usr/src/uts/sun4u/serengeti/Makefile.serengeti b/usr/src/uts/sun4u/serengeti/Makefile.serengeti
index 7c9b585de9..656134d7f5 100644
--- a/usr/src/uts/sun4u/serengeti/Makefile.serengeti
+++ b/usr/src/uts/sun4u/serengeti/Makefile.serengeti
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,119 +18,12 @@
#
# CDDL HEADER END
#
-#
-# uts/sun4u/serengeti/Makefile.serengeti
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#
-# Global definitions for sun4u implementation specific modules.
-#
-
-#
-# Define the name of this implementation.
-#
-
-#
-# Define directories.
+# ident "%Z%%M% %I% %E% SMI"
#
-ROOT_SERENGETI_DIR = $(ROOT_PLAT_DIR)/SUNW,Sun-Fire
-ROOT_SERENGETI_MOD_DIR = $(ROOT_SERENGETI_DIR)/kernel
-ROOT_SERENGETI_KERN_DIR_32 = $(ROOT_SERENGETI_MOD_DIR)
-ROOT_SERENGETI_KERN_DIR_64 = $(ROOT_SERENGETI_MOD_DIR)/$(SUBDIR64)
-ROOT_SERENGETI_KERN_DIR = $(ROOT_SERENGETI_KERN_DIR_$(CLASS))
-
-ROOT_SERENGETI_CPU_DIR_32 = $(ROOT_SERENGETI_MOD_DIR)/cpu
-ROOT_SERENGETI_CPU_DIR_64 = $(ROOT_SERENGETI_MOD_DIR)/cpu/$(SUBDIR64)
-ROOT_SERENGETI_CPU_DIR = $(ROOT_SERENGETI_CPU_DIR_$(CLASS))
-
-ROOT_SERENGETI_DRV_DIR_32 = $(ROOT_SERENGETI_MOD_DIR)/drv
-ROOT_SERENGETI_DRV_DIR_64 = $(ROOT_SERENGETI_MOD_DIR)/drv/$(SUBDIR64)
-ROOT_SERENGETI_DRV_DIR = $(ROOT_SERENGETI_DRV_DIR_$(CLASS))
-
-ROOT_SERENGETI_MISC_DIR_32 = $(ROOT_SERENGETI_MOD_DIR)/misc
-ROOT_SERENGETI_MISC_DIR_64 = $(ROOT_SERENGETI_MOD_DIR)/misc/$(SUBDIR64)
-ROOT_SERENGETI_MISC_DIR = $(ROOT_SERENGETI_MISC_DIR_$(CLASS))
-
-ROOT_SERENGETI_CRYPTO_DIR_32 = $(ROOT_SERENGETI_MOD_DIR)/crypto
-ROOT_SERENGETI_CRYPTO_DIR_64 = $(ROOT_SERENGETI_MOD_DIR)/crypto/$(SUBDIR64)
-ROOT_SERENGETI_CRYPTO_DIR = $(ROOT_SERENGETI_CRYPTO_DIR_$(CLASS))
-
-ROOT_PLAT_MOD_DIRS += $(ROOT_SERENGETI_MOD_DIR)
-ROOT_PLAT_MISC_DIRS_32 += $(ROOT_SERENGETI_MISC_DIR_32)
-
-USR_SERENGETI_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Fire
-USR_SERENGETI_INC_DIR = $(USR_SERENGETI_DIR)/include
-USR_SERENGETI_ISYS_DIR = $(USR_SERENGETI_INC_DIR)/sys
-USR_SERENGETI_SBIN_DIR = $(USR_SERENGETI_DIR)/sbin
-USR_SERENGETI_LIB_DIR = $(USR_SERENGETI_DIR)/lib
-
-SERENGETI_LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/serengeti/lint-libs/$(OBJS_DIR)
-
-#
-# Define modules.
-#
-SERENGETI_KMODS = cheetah cheetahplus platmod sbdp sgcn
-SERENGETI_KMODS += sghsc sgsbbc ssm wrsm wrsmplat
-#
-# Include the makefiles which define build rule templates, the
-# collection of files per module, and a few specific flags. Note
-# that order is significant, just as with an include path. The
-# first build rule template which matches the files name will be
-# used. By including these in order from most machine dependent
-# to most machine independent, we allow a machine dependent file
-# to be used in preference over a machine independent version
-# (Such as a machine specific optimization, which preserves the
-# interfaces.)
-#
-
-#
-# Links to UltraSparc III crypto modules
-#
-SERENGETI_CRYPTO_LINKS += aes
-
-include $(UTSBASE)/sun4u/serengeti/Makefile.files
-#
-# Include common rules.
-#
-
-include $(UTSBASE)/sun4u/Makefile.sun4u
-#
-# Everybody needs to know how to build modstubs.o and to locate unix.o
-#
-UNIX_DIR = $(UTSBASE)/$(PLATFORM)/serengeti/unix
-MODSTUBS_DIR = $(UNIX_DIR)
-DSF_DIR = $(UTSBASE)/$(PLATFORM)/serengeti/genassym
-LINTS_DIR = $(OBJS_DIR)
-LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/serengeti/lint-libs/$(OBJS_DIR)
-
-UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
-
-LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
-
-#
-# Define the actual specific platforms
-#
-MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU -DMP -DMIXEDCPU_DR_SUPPORTED
-
-#
-# Define platform specific values
-#
-MACHINE_DEFS += -DNCPU=558
-MACHINE_DEFS += -DMAX_CPU_CHIPID=554
-MACHINE_DEFS += -DMAX_UPA=1024
-MACHINE_DEFS += -DIGN_SIZE=10
-MACHINE_DEFS += -DMAX_MEM_NODES=8
-MACHINE_DEFS += -DLOCKED_DTLB_ENTRIES=6
-# Max IOSRAM TOC major version number supported
-MACHINE_DEFS += -DMAX_IOSRAM_TOC_VER=0x1
+UTSTREE=$(UTSBASE)
-# Define for inline pre-processing since
-# cpp is not smart about v9 yet.
-# It's not smart about __sparc either since it only predefines sparc.
-CPP_DEFS_32 = -D__sparc
-CPP_DEFS_64 = -D__sparc -D__sparcv9
-CPP_DEFS = $(CPP_DEFS_$(CLASS))
+include $(UTSBASE)/sun4u/serengeti/Makefile.serengeti.shared
diff --git a/usr/src/uts/sun4u/serengeti/Makefile.serengeti.shared b/usr/src/uts/sun4u/serengeti/Makefile.serengeti.shared
new file mode 100644
index 0000000000..5bffa2458b
--- /dev/null
+++ b/usr/src/uts/sun4u/serengeti/Makefile.serengeti.shared
@@ -0,0 +1,140 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/sun4u/serengeti/Makefile.serengeti
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#
+# Global definitions for sun4u implementation specific modules.
+#
+
+#
+# Define the name of this implementation.
+#
+
+#
+# Define directories.
+#
+ROOT_SERENGETI_DIR = $(ROOT_PLAT_DIR)/SUNW,Sun-Fire
+ROOT_SERENGETI_MOD_DIR = $(ROOT_SERENGETI_DIR)/kernel
+
+ROOT_SERENGETI_KERN_DIR_32 = $(ROOT_SERENGETI_MOD_DIR)
+ROOT_SERENGETI_KERN_DIR_64 = $(ROOT_SERENGETI_MOD_DIR)/$(SUBDIR64)
+ROOT_SERENGETI_KERN_DIR = $(ROOT_SERENGETI_KERN_DIR_$(CLASS))
+
+ROOT_SERENGETI_CPU_DIR_32 = $(ROOT_SERENGETI_MOD_DIR)/cpu
+ROOT_SERENGETI_CPU_DIR_64 = $(ROOT_SERENGETI_MOD_DIR)/cpu/$(SUBDIR64)
+ROOT_SERENGETI_CPU_DIR = $(ROOT_SERENGETI_CPU_DIR_$(CLASS))
+
+ROOT_SERENGETI_DRV_DIR_32 = $(ROOT_SERENGETI_MOD_DIR)/drv
+ROOT_SERENGETI_DRV_DIR_64 = $(ROOT_SERENGETI_MOD_DIR)/drv/$(SUBDIR64)
+ROOT_SERENGETI_DRV_DIR = $(ROOT_SERENGETI_DRV_DIR_$(CLASS))
+
+ROOT_SERENGETI_MISC_DIR_32 = $(ROOT_SERENGETI_MOD_DIR)/misc
+ROOT_SERENGETI_MISC_DIR_64 = $(ROOT_SERENGETI_MOD_DIR)/misc/$(SUBDIR64)
+ROOT_SERENGETI_MISC_DIR = $(ROOT_SERENGETI_MISC_DIR_$(CLASS))
+
+ROOT_SERENGETI_CRYPTO_DIR_32 = $(ROOT_SERENGETI_MOD_DIR)/crypto
+ROOT_SERENGETI_CRYPTO_DIR_64 = $(ROOT_SERENGETI_MOD_DIR)/crypto/$(SUBDIR64)
+ROOT_SERENGETI_CRYPTO_DIR = $(ROOT_SERENGETI_CRYPTO_DIR_$(CLASS))
+
+ROOT_PLAT_MOD_DIRS += $(ROOT_SERENGETI_MOD_DIR)
+ROOT_PLAT_MISC_DIRS_32 += $(ROOT_SERENGETI_MISC_DIR_32)
+
+USR_SERENGETI_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Fire
+USR_SERENGETI_INC_DIR = $(USR_SERENGETI_DIR)/include
+USR_SERENGETI_ISYS_DIR = $(USR_SERENGETI_INC_DIR)/sys
+USR_SERENGETI_SBIN_DIR = $(USR_SERENGETI_DIR)/sbin
+USR_SERENGETI_LIB_DIR = $(USR_SERENGETI_DIR)/lib
+
+SERENGETI_LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/serengeti/lint-libs/$(OBJS_DIR)
+
+#
+# Include the makefiles which define build rule templates, the
+# collection of files per module, and a few specific flags. Note
+# that order is significant, just as with an include path. The
+# first build rule template which matches the files name will be
+# used. By including these in order from most machine dependent
+# to most machine independent, we allow a machine dependent file
+# to be used in preference over a machine independent version
+# (Such as a machine specific optimization, which preserves the
+# interfaces.)
+#
+
+#
+# Links to UltraSparc III crypto modules
+#
+SERENGETI_CRYPTO_LINKS += aes
+
+include $(UTSTREE)/sun4u/serengeti/Makefile.files
+#
+# Include common rules.
+#
+
+include $(UTSTREE)/sun4u/Makefile.sun4u
+
+#
+# Define modules (must come after Makefile.sun4u, for CLOSED_BUILD).
+#
+SERENGETI_KMODS = cheetah cheetahplus
+SERENGETI_KMODS += wrsm
+$(CLOSED_BUILD)CLOSED_SERENGETI_KMODS = platmod sbdp sgcn sghsc sgsbbc
+$(CLOSED_BUILD)CLOSED_SERENGETI_KMODS += ssm wrsmplat
+
+#
+# Everybody needs to know how to build modstubs.o and to locate unix.o
+#
+UNIX_DIR = $(UTSBASE)/$(PLATFORM)/serengeti/unix
+MODSTUBS_DIR = $(UNIX_DIR)
+DSF_DIR = $(UTSBASE)/$(PLATFORM)/serengeti/genassym
+LINTS_DIR = $(OBJS_DIR)
+LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/serengeti/lint-libs/$(OBJS_DIR)
+
+UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
+
+LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
+
+#
+# Define the actual specific platforms
+#
+MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU -DMP -DMIXEDCPU_DR_SUPPORTED
+
+#
+# Define platform specific values
+#
+MACHINE_DEFS += -DNCPU=558
+MACHINE_DEFS += -DMAX_CPU_CHIPID=554
+MACHINE_DEFS += -DMAX_UPA=1024
+MACHINE_DEFS += -DIGN_SIZE=10
+MACHINE_DEFS += -DMAX_MEM_NODES=8
+MACHINE_DEFS += -DLOCKED_DTLB_ENTRIES=6
+# Max IOSRAM TOC major version number supported
+MACHINE_DEFS += -DMAX_IOSRAM_TOC_VER=0x1
+
+# Define for inline pre-processing since
+# cpp is not smart about v9 yet.
+# It's not smart about __sparc either since it only predefines sparc.
+CPP_DEFS_32 = -D__sparc
+CPP_DEFS_64 = -D__sparc -D__sparcv9
+CPP_DEFS = $(CPP_DEFS_$(CLASS))
diff --git a/usr/src/uts/sun4u/serengeti/Makefile.targ b/usr/src/uts/sun4u/serengeti/Makefile.targ
index 4272624e90..541dc690e4 100644
--- a/usr/src/uts/sun4u/serengeti/Makefile.targ
+++ b/usr/src/uts/sun4u/serengeti/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,79 +18,12 @@
#
# CDDL HEADER END
#
-#
-# Copyright 2000-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# Common targets for sun4u Serengeti implementation specific modules.
-#
-
-.KEEP_STATE:
-
-#
-# Rules for implementation subdirectories.
+# ident "%Z%%M% %I% %E% SMI"
#
-$(ROOT_SERENGETI_DIR): $(ROOT_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_SERENGETI_MOD_DIR): $(ROOT_SERENGETI_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_SERENGETI_CPU_DIR_32): $(ROOT_SERENGETI_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_SERENGETI_CPU_DIR_64): $(ROOT_SERENGETI_CPU_DIR_32)
- -$(INS.dir.root.sys)
-
-$(ROOT_SERENGETI_DRV_DIR_32): $(ROOT_SERENGETI_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_SERENGETI_DRV_DIR_64): $(ROOT_SERENGETI_DRV_DIR_32)
- -$(INS.dir.root.sys)
-
-$(ROOT_SERENGETI_MISC_DIR_32): $(ROOT_SERENGETI_MOD_DIR)
- -$(INS.dir.root.sys)
-$(ROOT_SERENGETI_MISC_DIR_64): $(ROOT_SERENGETI_MISC_DIR_32)
- -$(INS.dir.root.sys)
+UTSTREE=$(UTSBASE)
-$(ROOT_SERENGETI_CRYPTO_DIR_32): $(ROOT_SERENGETI_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_SERENGETI_CRYPTO_DIR_64): $(ROOT_SERENGETI_CRYPTO_DIR_32)
- -$(INS.dir.root.sys)
-
-$(USR_SERENGETI_DIR): $(USR_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(USR_SERENGETI_INC_DIR): $(USR_SERENGETI_DIR)
- $(INS.slink4)
-
-$(USR_SERENGETI_ISYS_DIR): $(USR_SERENGETI_INC_DIR)
- $(INS.dir.root.bin)
-
-$(USR_SERENGETI_SBIN_DIR): $(USR_SERENGETI_DIR)
- $(INS.slink5)
-
-$(USR_SERENGETI_LIB_DIR): $(USR_SERENGETI_DIR)
- -$(INS.dir.root.bin)
-
-$(ROOT_SERENGETI_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_SERENGETI_MISC_DIR) FRC
- $(INS.file)
-
-$(ROOT_SERENGETI_CPU_DIR)/%: $(OBJS_DIR)/% $(ROOT_SERENGETI_CPU_DIR) FRC
- $(INS.file)
-
-$(ROOT_SERENGETI_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_SERENGETI_DRV_DIR) FRC
- $(INS.file)
-
-$(ROOT_SERENGETI_KERN_DIR)/%: $(OBJS_DIR)/% $(ROOT_SERENGETI_KERN_DIR) FRC
- $(INS.file)
-
-#
-# Include common targets.
-#
-include $(UTSBASE)/sun4u/serengeti/Makefile.rules
-include $(UTSBASE)/sun4u/Makefile.targ
+include $(UTSBASE)/sun4u/serengeti/Makefile.targ.shared
diff --git a/usr/src/uts/sun4u/serengeti/Makefile.targ.shared b/usr/src/uts/sun4u/serengeti/Makefile.targ.shared
new file mode 100644
index 0000000000..4b9737e772
--- /dev/null
+++ b/usr/src/uts/sun4u/serengeti/Makefile.targ.shared
@@ -0,0 +1,97 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# Common targets for sun4u Serengeti implementation specific modules.
+#
+
+.KEEP_STATE:
+
+#
+# Rules for implementation subdirectories.
+#
+$(ROOT_SERENGETI_DIR): $(ROOT_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_SERENGETI_MOD_DIR): $(ROOT_SERENGETI_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_SERENGETI_CPU_DIR_32): $(ROOT_SERENGETI_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_SERENGETI_CPU_DIR_64): $(ROOT_SERENGETI_CPU_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_SERENGETI_DRV_DIR_32): $(ROOT_SERENGETI_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_SERENGETI_DRV_DIR_64): $(ROOT_SERENGETI_DRV_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_SERENGETI_MISC_DIR_32): $(ROOT_SERENGETI_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_SERENGETI_MISC_DIR_64): $(ROOT_SERENGETI_MISC_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_SERENGETI_CRYPTO_DIR_32): $(ROOT_SERENGETI_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_SERENGETI_CRYPTO_DIR_64): $(ROOT_SERENGETI_CRYPTO_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(USR_SERENGETI_DIR): $(USR_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(USR_SERENGETI_INC_DIR): $(USR_SERENGETI_DIR)
+ $(INS.slink4)
+
+$(USR_SERENGETI_ISYS_DIR): $(USR_SERENGETI_INC_DIR)
+ $(INS.dir.root.bin)
+
+$(USR_SERENGETI_SBIN_DIR): $(USR_SERENGETI_DIR)
+ $(INS.slink5)
+
+$(USR_SERENGETI_LIB_DIR): $(USR_SERENGETI_DIR)
+ -$(INS.dir.root.bin)
+
+$(ROOT_SERENGETI_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_SERENGETI_MISC_DIR) FRC
+ $(INS.file)
+
+$(ROOT_SERENGETI_CPU_DIR)/%: $(OBJS_DIR)/% $(ROOT_SERENGETI_CPU_DIR) FRC
+ $(INS.file)
+
+$(ROOT_SERENGETI_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_SERENGETI_DRV_DIR) FRC
+ $(INS.file)
+
+$(ROOT_SERENGETI_KERN_DIR)/%: $(OBJS_DIR)/% $(ROOT_SERENGETI_KERN_DIR) FRC
+ $(INS.file)
+
+#
+# Include common targets.
+#
+include $(UTSTREE)/sun4u/serengeti/Makefile.rules
+include $(UTSTREE)/sun4u/Makefile.targ
diff --git a/usr/src/uts/sun4u/snowbird/Makefile b/usr/src/uts/sun4u/snowbird/Makefile
index 5a1dad227c..3aa31a6e8a 100644
--- a/usr/src/uts/sun4u/snowbird/Makefile
+++ b/usr/src/uts/sun4u/snowbird/Makefile
@@ -21,7 +21,7 @@
#
#
# uts/sun4u/snowbird/Makefile
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -52,6 +52,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -64,7 +66,7 @@ IMPLEMENTED_PLATFORM = SUNW,Netra-CP2300
.PARALLEL: $(SNOWBIRD_KMODS)
-def all clean clobber clean.lint: $(SNOWBIRD_KMODS)
+def all clean clobber clean.lint modlist: $(SNOWBIRD_KMODS)
install: $(ROOT_SNOWBIRD_DIR) $(USR_SNOWBIRD_DIR) \
$(USR_SNOWBIRD_INC_DIR) \
@@ -80,7 +82,7 @@ install: $(ROOT_SNOWBIRD_DIR) $(USR_SNOWBIRD_DIR) \
modlintlib: $(SNOWBIRD_KMODS)
$(SNOWBIRD_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
ttymux_dacf: $(ROOT_SNOWBIRD_DACF_DIR_64)
-@$(RM) $(ROOT_SNOWBIRD_DACF_DIR_64)/$@
@@ -101,6 +103,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(SNOWBIRD_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
diff --git a/usr/src/uts/sun4u/starcat/Makefile b/usr/src/uts/sun4u/starcat/Makefile
index b58d81d8b6..a22852614f 100644
--- a/usr/src/uts/sun4u/starcat/Makefile
+++ b/usr/src/uts/sun4u/starcat/Makefile
@@ -22,7 +22,7 @@
#
#pragma ident "%Z%%M% %I% %E% SMI"
#
-# Copyright 2000-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# This makefile drives the production of the sun4u starcat platform
@@ -50,6 +50,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -59,11 +61,14 @@ check := TARGET= check
.KEEP_STATE:
def all clean clobber clean.lint: genassym unix .WAIT \
- $(STARCAT_CPU_KMODS) $(STARCAT_KMODS)
+ $(STARCAT_CPU_KMODS) $(STARCAT_KMODS) $(CLOSED_STARCAT_KMODS)
+
+modlist: unix \
+ $(STARCAT_CPU_KMODS) $(STARCAT_KMODS) $(CLOSED_STARCAT_KMODS)
lintlib: unix
-modlintlib: $(STARCAT_KMODS)
+modlintlib: $(STARCAT_KMODS) $(CLOSED_STARCAT_KMODS)
IMPLEMENTED_PLATFORM = SUNW,Sun-Fire-15000
@@ -80,15 +85,20 @@ install: $(ROOT_STARCAT_DIR) $(USR_STARCAT_DIR) \
$(USR_STARCAT_SBIN_DIR) \
$(USR_STARCAT_LIB_DIR) \
$(STARCAT_CRYPTO_LINKS) \
- genassym unix .WAIT $(STARCAT_CPU_KMODS) $(STARCAT_KMODS) pcicfg
+ genassym unix .WAIT $(STARCAT_CPU_KMODS) \
+ $(STARCAT_KMODS) $(CLOSED_STARCAT_KMODS) pcicfg
-pcicfg: $(ROOT_PSM_MISC_DIR_64)/pcicfg.e
+pcicfg: $(ROOT_PSM_MISC_DIR_64)/pcicfg.e $(ROOT_STARCAT_MISC_DIR_64)
-@$(RM) $(ROOT_STARCAT_MISC_DIR_64)/$@
$(SYMLINK) ../../../../sun4u/kernel/misc/sparcv9/pcicfg.e \
$(ROOT_STARCAT_MISC_DIR_64)/$@
genassym unix $(STARCAT_KMODS) $(STARCAT_CPU_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(CLOSED_STARCAT_KMODS): FRC
+ cd $(CLOSED)/uts/sun4u/starcat/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
$(STARCAT_CRYPTO_LINKS): $(ROOT_STARCAT_CRYPTO_DIR_64)
-$(RM) $(ROOT_STARCAT_CRYPTO_DIR_64)/$@;
@@ -101,7 +111,7 @@ lint: modlintlib
#
-# The 'lint.platmod' target lints the montecarlo platform module against
+# The 'lint.platmod' target lints the starcat platform module against
# the sun4u kernel. This ends up doing all the kernel cross-checks,
# so it takes a couple of minutes.
# Due to the low ROI, it's not run by default, but it's a good
@@ -111,6 +121,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(STARCAT_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
diff --git a/usr/src/uts/sun4u/starcat/Makefile.files b/usr/src/uts/sun4u/starcat/Makefile.files
index 96cbdbd0c4..cec59025db 100644
--- a/usr/src/uts/sun4u/starcat/Makefile.files
+++ b/usr/src/uts/sun4u/starcat/Makefile.files
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2002 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -36,35 +36,12 @@
# Starcat specific driver related modules
#
-DMAN_OBJS += dman.o dman_domain.o
-CVC_OBJS += cvc.o
-IOSRAM_OBJS += iosram.o
-MBOXSC_OBJS += mboxsc.o
-SCHPC_OBJS += schpc.o
-AXQ_OBJS += axq.o
-SCOSMB_OBJS += scosmb.o
-SCKMDRV_OBJS += sckmdrv.o
CVCREDIR_OBJS += cvcredir.o
SC_PCICFG_OBJS += sc_pcicfg.o
-GPTWO_PCI_OBJS += gptwo_pci.o
-GPTWO_WCI_OBJS += gptwo_wci.o
-SC_GPTWO_OBJS += sc_gptwocfg.o
-FCGP2_OBJS += fcgp2.o
-
-DRMACH_OBJS += drmach.o drmach_asm.o dr_util.o drmach_err.o
#
# Miscellaneous
#
INC_PATH += -I$(UTSBASE)/sun4u/starcat
INC_PATH += -I$(UTSBASE)/sun4u/starcat/sys
-
-#
-# Since assym.h is a derived file, the dependency must be explicit for
-# all files including this file. (This is only actually required in the
-# instance when the .nse_depinfo file does not exist.) It may seem that
-# the lint targets should also have a similar dependency, but they don't
-# since only C headers are included when #defined(lint) is true.
-#
-ASSYM_DEPS += drmach_asm.o
diff --git a/usr/src/uts/sun4u/starcat/Makefile.rules b/usr/src/uts/sun4u/starcat/Makefile.rules
index ccb797f1f6..c8d8ece395 100644
--- a/usr/src/uts/sun4u/starcat/Makefile.rules
+++ b/usr/src/uts/sun4u/starcat/Makefile.rules
@@ -20,7 +20,7 @@
# CDDL HEADER END
#
#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -42,26 +42,10 @@ IL_CPP=$(CPP) -P -DINLINE -D_ASM $(AS_INC_PATH) \
DRMACH_IL=$(OBJS_DIR)/drmach.il
-$(OBJS_DIR)/drmach.o := CC_XARCH_32 = -xarch=v8plusa
$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/starcat/io/%.c $(DRMACH_IL)
$(COMPILE.c) $(DRMACH_IL) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/starcat/os/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4u/starcat/ml/%.s
- $(COMPILE.s) -o $@ $<
-
-STARCAT_IO=$(UTSBASE)/sun4u/starcat/io
-
-CLEANFILES += $(STARCAT_IO)/drmach_err.c
-
-$(STARCAT_IO)/drmach_err.c: $(SBDGENERR) $(SBD_IOCTL)
- $(RM) $@
- $(SBDGENERR) ESTC <$(SBD_IOCTL) >$@
-
# inline stuff
CLEANFILES += $(DRMACH_IL)
@@ -73,13 +57,5 @@ $(DRMACH_IL): $(UTSBASE)/sun4u/starcat/ml/drmach.il.cpp
# Section 1b: Lint object build rules
#
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/starcat/os/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/drmach.ln := LINTFLAGS += -I../sys
-$(LINTS_DIR)/sc_gptwoctfg.ln := LINTFLAGS += -I../sys
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/starcat/io/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4u/starcat/ml/%.s
- @($(LHEAD) $(LINT.s) $< $(LTAIL))
diff --git a/usr/src/uts/sun4u/starcat/Makefile.starcat b/usr/src/uts/sun4u/starcat/Makefile.starcat
index 4c686db056..9122646992 100644
--- a/usr/src/uts/sun4u/starcat/Makefile.starcat
+++ b/usr/src/uts/sun4u/starcat/Makefile.starcat
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,133 +18,12 @@
#
# CDDL HEADER END
#
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Global definitions for sun4u starcat implementation specific modules.
-#
-
-#
-# Define directories.
-#
-ROOT_STARCAT_DIR = $(ROOT_PLAT_DIR)/SUNW,Sun-Fire-15000
-ROOT_STARCAT_MOD_DIR = $(ROOT_STARCAT_DIR)/kernel
-ROOT_STARCAT_KERN_DIR_32 = $(ROOT_STARCAT_MOD_DIR)
-ROOT_STARCAT_KERN_DIR_64 = $(ROOT_STARCAT_MOD_DIR)/$(SUBDIR64)
-ROOT_STARCAT_MISC_DIR_32 = $(ROOT_STARCAT_MOD_DIR)/misc
-ROOT_STARCAT_MISC_DIR_64 = $(ROOT_STARCAT_MOD_DIR)/misc/$(SUBDIR64)
-ROOT_STARCAT_DRV_DIR_32 = $(ROOT_STARCAT_MOD_DIR)/drv
-ROOT_STARCAT_DRV_DIR_64 = $(ROOT_STARCAT_MOD_DIR)/drv/$(SUBDIR64)
-ROOT_STARCAT_CPU_DIR_32 = $(ROOT_STARCAT_MOD_DIR)/cpu
-ROOT_STARCAT_CPU_DIR_64 = $(ROOT_STARCAT_MOD_DIR)/cpu/$(SUBDIR64)
-ROOT_STARCAT_CRYPTO_DIR_32 = $(ROOT_STARCAT_MOD_DIR)/crypto
-ROOT_STARCAT_CRYPTO_DIR_64 = $(ROOT_STARCAT_MOD_DIR)/crypto/$(SUBDIR64)
-
-ROOT_STARCAT_KERN_DIR = $(ROOT_STARCAT_KERN_DIR_$(CLASS))
-ROOT_STARCAT_MISC_DIR = $(ROOT_STARCAT_MISC_DIR_$(CLASS))
-ROOT_STARCAT_DRV_DIR = $(ROOT_STARCAT_DRV_DIR_$(CLASS))
-ROOT_STARCAT_CPU_DIR = $(ROOT_STARCAT_CPU_DIR_$(CLASS))
-ROOT_STARCAT_CRYPTO_DIR = $(ROOT_STARCAT_CRYPTO_DIR_$(CLASS))
-
-ROOT_PLAT_MOD_DIRS += $(ROOT_STARCAT_MOD_DIR)
-ROOT_PLAT_MISC_DIRS_32 += $(ROOT_STARCAT_MISC_DIR_32)
-
-USR_STARCAT_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Fire-15000
-USR_STARCAT_LIB_DIR = $(USR_STARCAT_DIR)/lib
-USR_STARCAT_SBIN_DIR = $(USR_STARCAT_DIR)/sbin
-USR_STARCAT_INC_DIR = $(USR_STARCAT_DIR)/include
-USR_STARCAT_ISYS_DIR = $(USR_STARCAT_INC_DIR)/sys
-
-STARCAT_LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/starcat/lint-libs/$(OBJS_DIR)
-
-#
-# Define objects.
-#
-STARCAT_OBJS = starcat.o starcat_asm.o plat_ecc_unum.o
-
-#
-# Define modules.
+# ident "%Z%%M% %I% %E% SMI"
#
-STARCAT_KMODS = platmod
-STARCAT_KMODS += cvc cvcredir
-STARCAT_KMODS += dr .WAIT drmach
-STARCAT_KMODS += iosram
-STARCAT_KMODS += mboxsc
-STARCAT_KMODS += axq
-STARCAT_KMODS += scosmb
-STARCAT_KMODS += schpc
-STARCAT_KMODS += dman
-STARCAT_KMODS += sckmdrv
-STARCAT_KMODS += gptwo_pci
-STARCAT_KMODS += gptwo_wci
-STARCAT_KMODS += sc_gptwocfg
-STARCAT_KMODS += fcgp2
-STARCAT_KMODS += wrsmplat
-#
-# Define CPU modules.
-#
-STARCAT_CPU_KMODS += cheetah cheetahplus
+UTSTREE=$(UTSBASE)
-#
-# Links to UltraSparc III crypto modules
-#
-STARCAT_CRYPTO_LINKS = aes
-
-#
-# Include the makefiles which define build rule templates, the
-# collection of files per module, and a few specific flags. Note
-# that order is significant, just as with an include path. The
-# first build rule template which matches the files name will be
-# used. By including these in order from most machine dependent
-# to most machine independent, we allow a machine dependent file
-# to be used in preference over a machine independent version
-# (Such as a machine specific optimization, which preserves the
-# interfaces.)
-#
-include $(UTSBASE)/sun4u/ngdr/Makefile.files
-include $(UTSBASE)/sun4u/starcat/Makefile.files
-
-#
-# Include common rules.
-#
-include $(UTSBASE)/sun4u/Makefile.sun4u
-
-#
-# Everybody needs to know how to build modstubs.o and to locate unix.o
-#
-UNIX_DIR = $(UTSBASE)/$(PLATFORM)/starcat/unix
-MODSTUBS_DIR = $(UNIX_DIR)
-DSF_DIR = $(UTSBASE)/$(PLATFORM)/starcat/genassym
-LINTS_DIR = $(OBJS_DIR)
-LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/starcat/lint-libs/$(OBJS_DIR)
-
-UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
-
-LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
-
-#
-# Define the actual specific platforms
-#
-MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU -DMP -DMIXEDCPU_DR_SUPPORTED
-MACHINE_DEFS += -D_CPU_SIGNATURE
-
-#
-# Define platform specific value
-#
-MACHINE_DEFS += -DNCPU=558
-MACHINE_DEFS += -DMAX_CPU_CHIPID=554
-MACHINE_DEFS += -DMAX_UPA=1024
-MACHINE_DEFS += -DIGN_SIZE=10
-MACHINE_DEFS += -DMAX_MEM_NODES=18
-
-#
-# Define for inline pre-processing since
-# cpp not smart about v9 yet.
-# It's not smart about __sparc either since it only predefines sparc.
-CPP_DEFS_32 = -D__sparc
-CPP_DEFS_64 = -D__sparc -D__sparcv9
-CPP_DEFS = $(CPP_DEFS_$(CLASS))
+include $(UTSBASE)/sun4u/starcat/Makefile.starcat.shared
diff --git a/usr/src/uts/sun4u/starcat/Makefile.starcat.shared b/usr/src/uts/sun4u/starcat/Makefile.starcat.shared
new file mode 100644
index 0000000000..b0536df276
--- /dev/null
+++ b/usr/src/uts/sun4u/starcat/Makefile.starcat.shared
@@ -0,0 +1,155 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# Global definitions for sun4u starcat implementation specific modules.
+#
+
+#
+# Define directories.
+#
+ROOT_STARCAT_DIR = $(ROOT_PLAT_DIR)/SUNW,Sun-Fire-15000
+ROOT_STARCAT_MOD_DIR = $(ROOT_STARCAT_DIR)/kernel
+ROOT_STARCAT_KERN_DIR_32 = $(ROOT_STARCAT_MOD_DIR)
+ROOT_STARCAT_KERN_DIR_64 = $(ROOT_STARCAT_MOD_DIR)/$(SUBDIR64)
+ROOT_STARCAT_MISC_DIR_32 = $(ROOT_STARCAT_MOD_DIR)/misc
+ROOT_STARCAT_MISC_DIR_64 = $(ROOT_STARCAT_MOD_DIR)/misc/$(SUBDIR64)
+ROOT_STARCAT_DRV_DIR_32 = $(ROOT_STARCAT_MOD_DIR)/drv
+ROOT_STARCAT_DRV_DIR_64 = $(ROOT_STARCAT_MOD_DIR)/drv/$(SUBDIR64)
+ROOT_STARCAT_CPU_DIR_32 = $(ROOT_STARCAT_MOD_DIR)/cpu
+ROOT_STARCAT_CPU_DIR_64 = $(ROOT_STARCAT_MOD_DIR)/cpu/$(SUBDIR64)
+ROOT_STARCAT_CRYPTO_DIR_32 = $(ROOT_STARCAT_MOD_DIR)/crypto
+ROOT_STARCAT_CRYPTO_DIR_64 = $(ROOT_STARCAT_MOD_DIR)/crypto/$(SUBDIR64)
+
+ROOT_STARCAT_KERN_DIR = $(ROOT_STARCAT_KERN_DIR_$(CLASS))
+ROOT_STARCAT_MISC_DIR = $(ROOT_STARCAT_MISC_DIR_$(CLASS))
+ROOT_STARCAT_DRV_DIR = $(ROOT_STARCAT_DRV_DIR_$(CLASS))
+ROOT_STARCAT_CPU_DIR = $(ROOT_STARCAT_CPU_DIR_$(CLASS))
+ROOT_STARCAT_CRYPTO_DIR = $(ROOT_STARCAT_CRYPTO_DIR_$(CLASS))
+
+ROOT_PLAT_MOD_DIRS += $(ROOT_STARCAT_MOD_DIR)
+ROOT_PLAT_MISC_DIRS_32 += $(ROOT_STARCAT_MISC_DIR_32)
+
+USR_STARCAT_DIR = $(USR_PLAT_DIR)/SUNW,Sun-Fire-15000
+USR_STARCAT_LIB_DIR = $(USR_STARCAT_DIR)/lib
+USR_STARCAT_SBIN_DIR = $(USR_STARCAT_DIR)/sbin
+USR_STARCAT_INC_DIR = $(USR_STARCAT_DIR)/include
+USR_STARCAT_ISYS_DIR = $(USR_STARCAT_INC_DIR)/sys
+
+STARCAT_LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/starcat/lint-libs/$(OBJS_DIR)
+
+
+#
+# Build dependencies
+#
+
+drmach: dr
+
+#
+# Include the makefiles which define build rule templates, the
+# collection of files per module, and a few specific flags. Note
+# that order is significant, just as with an include path. The
+# first build rule template which matches the files name will be
+# used. By including these in order from most machine dependent
+# to most machine independent, we allow a machine dependent file
+# to be used in preference over a machine independent version
+# (Such as a machine specific optimization, which preserves the
+# interfaces.)
+#
+include $(UTSBASE)/sun4u/ngdr/Makefile.files
+include $(UTSTREE)/sun4u/starcat/Makefile.files
+
+#
+# Include common rules.
+#
+include $(UTSTREE)/sun4u/Makefile.sun4u
+
+#
+# Define modules (must come after Makefile.sun4u, for CLOSED_BUILD).
+#
+STARCAT_KMODS += cvcredir
+STARCAT_KMODS += dr
+
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS = platmod
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += axq
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += cvc
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += dman
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += drmach
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += fcgp2
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += gptwo_pci
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += gptwo_wci
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += iosram
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += mboxsc
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += sc_gptwocfg
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += schpc
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += sckmdrv
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += scosmb
+$(CLOSED_BUILD)CLOSED_STARCAT_KMODS += wrsmplat
+
+#
+# Define CPU modules.
+#
+STARCAT_CPU_KMODS += cheetah cheetahplus
+
+#
+# Links to UltraSparc III crypto modules
+#
+STARCAT_CRYPTO_LINKS = aes
+
+#
+# Everybody needs to know how to build modstubs.o and to locate unix.o
+#
+UNIX_DIR = $(UTSBASE)/$(PLATFORM)/starcat/unix
+MODSTUBS_DIR = $(UNIX_DIR)
+DSF_DIR = $(UTSBASE)/$(PLATFORM)/starcat/genassym
+LINTS_DIR = $(OBJS_DIR)
+LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/starcat/lint-libs/$(OBJS_DIR)
+
+UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
+
+LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
+
+#
+# Define the actual specific platforms
+#
+MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU -DMP -DMIXEDCPU_DR_SUPPORTED
+MACHINE_DEFS += -D_CPU_SIGNATURE
+
+#
+# Define platform specific value
+#
+MACHINE_DEFS += -DNCPU=558
+MACHINE_DEFS += -DMAX_CPU_CHIPID=554
+MACHINE_DEFS += -DMAX_UPA=1024
+MACHINE_DEFS += -DIGN_SIZE=10
+MACHINE_DEFS += -DMAX_MEM_NODES=18
+
+#
+# Define for inline pre-processing since
+# cpp not smart about v9 yet.
+# It's not smart about __sparc either since it only predefines sparc.
+CPP_DEFS_32 = -D__sparc
+CPP_DEFS_64 = -D__sparc -D__sparcv9
+CPP_DEFS = $(CPP_DEFS_$(CLASS))
diff --git a/usr/src/uts/sun4u/starcat/Makefile.targ b/usr/src/uts/sun4u/starcat/Makefile.targ
index c7f6373905..b6bb4f7664 100644
--- a/usr/src/uts/sun4u/starcat/Makefile.targ
+++ b/usr/src/uts/sun4u/starcat/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,80 +18,12 @@
#
# CDDL HEADER END
#
-#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# Copyright 2000-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Common targets for sun4u starcat implementation specific modules.
-#
-
-.KEEP_STATE:
-
-#
-# Rules for implementation subdirectories.
+# ident "%Z%%M% %I% %E% SMI"
#
-$(ROOT_STARCAT_DIR): $(ROOT_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_STARCAT_MOD_DIR): $(ROOT_STARCAT_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_STARCAT_CPU_DIR_32): $(ROOT_STARCAT_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_STARCAT_CPU_DIR_64): $(ROOT_STARCAT_CPU_DIR_32)
- -$(INS.dir.root.sys)
-
-$(ROOT_STARCAT_DRV_DIR_32): $(ROOT_STARCAT_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_STARCAT_DRV_DIR_64): $(ROOT_STARCAT_DRV_DIR_32)
- -$(INS.dir.root.sys)
-
-$(ROOT_STARCAT_MISC_DIR_32): $(ROOT_STARCAT_MOD_DIR)
- -$(INS.dir.root.sys)
-$(ROOT_STARCAT_MISC_DIR_64): $(ROOT_STARCAT_MISC_DIR_32)
- -$(INS.dir.root.sys)
+UTSTREE=$(UTSBASE)
-$(ROOT_STARCAT_CRYPTO_DIR_32): $(ROOT_STARCAT_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_STARCAT_CRYPTO_DIR_64): $(ROOT_STARCAT_CRYPTO_DIR_32)
- -$(INS.dir.root.sys)
-
-$(USR_STARCAT_DIR): $(USR_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(USR_STARCAT_INC_DIR): $(USR_STARCAT_DIR)
- $(INS.slink4)
-
-$(USR_STARCAT_SBIN_DIR): $(USR_STARCAT_DIR)
- -$(INS.slink5)
-
-$(USR_STARCAT_LIB_DIR): $(USR_STARCAT_DIR)
- -$(INS.dir.root.bin)
-
-$(USR_STARCAT_ISYS_DIR): $(USR_STARCAT_INC_DIR)
- $(INS.dir.root.bin)
-
-$(ROOT_STARCAT_KERN_DIR)/%: $(OBJS_DIR)/% $(ROOT_STARCAT_KERN_DIR) FRC
- $(INS.file)
-
-$(ROOT_STARCAT_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_STARCAT_DRV_DIR) FRC
- $(INS.file)
-
-$(ROOT_STARCAT_CPU_DIR)/%: $(OBJS_DIR)/% $(ROOT_STARCAT_CPU_DIR) FRC
- $(INS.file)
-
-$(ROOT_STARCAT_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_STARCAT_MISC_DIR) FRC
- $(INS.file)
-
-#
-# Include common targets.
-#
-include $(UTSBASE)/sun4u/ngdr/Makefile.rules
-include $(UTSBASE)/sun4u/starcat/Makefile.rules
-include $(UTSBASE)/sun4u/Makefile.targ
+include $(UTSBASE)/sun4u/starcat/Makefile.targ.shared
diff --git a/usr/src/uts/sun4u/starcat/Makefile.targ.shared b/usr/src/uts/sun4u/starcat/Makefile.targ.shared
new file mode 100644
index 0000000000..4057dbc223
--- /dev/null
+++ b/usr/src/uts/sun4u/starcat/Makefile.targ.shared
@@ -0,0 +1,98 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+#pragma ident "%Z%%M% %I% %E% SMI"
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# Common targets for sun4u starcat implementation specific modules.
+#
+
+.KEEP_STATE:
+
+#
+# Rules for implementation subdirectories.
+#
+$(ROOT_STARCAT_DIR): $(ROOT_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_STARCAT_MOD_DIR): $(ROOT_STARCAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_STARCAT_CPU_DIR_32): $(ROOT_STARCAT_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_STARCAT_CPU_DIR_64): $(ROOT_STARCAT_CPU_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_STARCAT_DRV_DIR_32): $(ROOT_STARCAT_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_STARCAT_DRV_DIR_64): $(ROOT_STARCAT_DRV_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_STARCAT_MISC_DIR_32): $(ROOT_STARCAT_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_STARCAT_MISC_DIR_64): $(ROOT_STARCAT_MISC_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_STARCAT_CRYPTO_DIR_32): $(ROOT_STARCAT_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_STARCAT_CRYPTO_DIR_64): $(ROOT_STARCAT_CRYPTO_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(USR_STARCAT_DIR): $(USR_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(USR_STARCAT_INC_DIR): $(USR_STARCAT_DIR)
+ $(INS.slink4)
+
+$(USR_STARCAT_SBIN_DIR): $(USR_STARCAT_DIR)
+ -$(INS.slink5)
+
+$(USR_STARCAT_LIB_DIR): $(USR_STARCAT_DIR)
+ -$(INS.dir.root.bin)
+
+$(USR_STARCAT_ISYS_DIR): $(USR_STARCAT_INC_DIR)
+ $(INS.dir.root.bin)
+
+$(ROOT_STARCAT_KERN_DIR)/%: $(OBJS_DIR)/% $(ROOT_STARCAT_KERN_DIR) FRC
+ $(INS.file)
+
+$(ROOT_STARCAT_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_STARCAT_DRV_DIR) FRC
+ $(INS.file)
+
+$(ROOT_STARCAT_CPU_DIR)/%: $(OBJS_DIR)/% $(ROOT_STARCAT_CPU_DIR) FRC
+ $(INS.file)
+
+$(ROOT_STARCAT_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_STARCAT_MISC_DIR) FRC
+ $(INS.file)
+
+#
+# Include common targets.
+#
+include $(UTSBASE)/sun4u/ngdr/Makefile.rules
+include $(UTSTREE)/sun4u/starcat/Makefile.rules
+include $(UTSTREE)/sun4u/Makefile.targ
diff --git a/usr/src/uts/sun4u/starcat/sys/Makefile b/usr/src/uts/sun4u/starcat/sys/Makefile
index 5317360756..cac3f1cdb4 100644
--- a/usr/src/uts/sun4u/starcat/sys/Makefile
+++ b/usr/src/uts/sun4u/starcat/sys/Makefile
@@ -22,8 +22,8 @@
#
#pragma ident "%Z%%M% %I% %E% SMI"
#
-# Copyright (c) 2000-2001 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
UTSBASE = ../../..
@@ -42,11 +42,15 @@ GROUP = bin
HDRS=
-CHKHDRS= drmach.h dman.h \
- axq.h domaind.h iosramreg.h iosramio.h \
- iosramvar.h dman.h sc_cvcio.h sc_cvc.h \
+CHKHDRS= drmach.h \
+ domaind.h \
+ sc_cvcio.h \
sckm_msg.h sckm_io.h
+CLOSED_CHKHDRS= axq.h dman.h iosramio.h iosramreg.h iosramvar.h sc_cvc.h
+
+$(CLOSED_BUILD)CHKHDRS += $(CLOSED_CHKHDRS:%=$(CLOSED)/uts/sun4u/starcat/sys/%)
+
STARHDRS= $(UTSBASE)/sun4u/ngdr/sys/dr.h \
$(UTSBASE)/sun4u/ngdr/sys/dr_util.h
diff --git a/usr/src/uts/sun4u/starfire/Makefile b/usr/src/uts/sun4u/starfire/Makefile
index 12f3209b06..7a08af878a 100644
--- a/usr/src/uts/sun4u/starfire/Makefile
+++ b/usr/src/uts/sun4u/starfire/Makefile
@@ -22,8 +22,8 @@
#
#ident "%Z%%M% %I% %E% SMI"
#
-# Copyright (c) 1997,1999 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
# This makefile drives the production of the sun4u starfire platform
# module.
@@ -56,7 +56,8 @@ SUN4U_LIB_DIR = $(UTSBASE)/sun4u/lint-libs/$(OBJS_DIR)
#
LINT_LIBS = $(LINT_LIB) \
$(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln) \
- $(LINT_KMODS:%=$(SUN4U_LIB_DIR)/llib-l%.ln)
+ $(LINT_KMODS:%=$(SUN4U_LIB_DIR)/llib-l%.ln) \
+ $(CLOSED_LINT_KMODS:%=$(SUN4U_LIB_DIR)/llib-l%.ln)
def := TARGET= def
all := TARGET= all
@@ -67,6 +68,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -84,6 +87,8 @@ IMPLEMENTED_PLATFORM = SUNW,Ultra-Enterprise-10000
def all clean clobber clean.lint: genassym unix .WAIT \
$(STARFIRE_CPU_KMODS) $(STARFIRE_KMODS)
+modlist: unix $(STARFIRE_CPU_KMODS) $(STARFIRE_KMODS)
+
install: $(ROOT_STARFIRE_DIR) $(USR_STARFIRE_DIR) \
$(USR_STARFIRE_INC_DIR) \
$(USR_STARFIRE_SBIN_DIR) \
@@ -95,7 +100,7 @@ lintlib: unix
modlintlib: $(STARFIRE_KMODS) $(STARFIRE_CPU_KMODS)
genassym unix $(STARFIRE_CPU_KMODS) $(STARFIRE_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
install_h check: FRC
@cd sys; pwd; $(MAKE) $(TARGET)
@@ -110,7 +115,7 @@ globallint:
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
lint: lintlib .WAIT modlintlib .WAIT $(LINT_DEPS)
-
+
#
# Include common targets.
#
diff --git a/usr/src/uts/sun4u/sys/Makefile b/usr/src/uts/sun4u/sys/Makefile
index c4420286fe..86c9846b9d 100644
--- a/usr/src/uts/sun4u/sys/Makefile
+++ b/usr/src/uts/sun4u/sys/Makefile
@@ -57,7 +57,6 @@ SUN4_HDRS= \
ivintr.h \
memlist_plat.h \
memnode.h \
- memtestio.h \
nexusdebug.h \
prom_debug.h \
scb.h \
@@ -70,14 +69,13 @@ SUN4_HDRS= \
xc_impl.h \
zsmach.h
+$(CLOSED_BUILD)CLOSED_SUN4_HDRS= \
+ memtestio.h
+
HDRS= \
cheetahregs.h \
cpr_impl.h \
ecc_kstat.h \
- envctrl.h \
- envctrl_gen.h \
- envctrl_ue250.h \
- envctrl_ue450.h \
gpio_87317.h \
fc_plat.h \
iocache.h \
@@ -88,14 +86,6 @@ HDRS= \
machparam.h \
machsystm.h \
machthread.h \
- memtestio_u.h \
- memtestio_ch.h \
- memtestio_chp.h \
- memtestio_ja.h \
- memtestio_jg.h \
- memtestio_pn.h \
- memtestio_sf.h \
- memtestio_sr.h \
mmu.h \
prom_plat.h \
pte.h \
@@ -118,15 +108,32 @@ HDRS= \
wrsm_common.h \
wrsm_types.h
+$(CLOSED_BUILD)CLOSED_HDRS= \
+ envctrl.h \
+ envctrl_gen.h \
+ envctrl_ue250.h \
+ envctrl_ue450.h \
+ memtestio_ch.h \
+ memtestio_chp.h \
+ memtestio_ja.h \
+ memtestio_jg.h \
+ memtestio_pn.h \
+ memtestio_sf.h \
+ memtestio_sr.h \
+ memtestio_u.h
+
DMFEHDRS = dmfe.h dmfe_impl.h miiregs.h
ROOTDMFEDIR = $(ROOT)/usr/include/sys
ROOTDMFEHDRS = $(DMFEHDRS:%=$(ROOTDMFEDIR)/%)
+$(CLOSED_BUILD)CLOSED_I2CHDRS = clients/scmi2c.h
+
I2CHDRS = clients/max1617.h misc/i2c_svc.h clients/i2c_client.h \
- clients/scmi2c.h clients/hpc3130.h clients/lm75.h \
- clients/pcf8591.h clients/ssc050.h
+ clients/hpc3130.h clients/lm75.h \
+ clients/pcf8591.h clients/ssc050.h $(CLOSED_I2CHDRS)
+
I2C_DIRS= clients misc
USR_PSM_ISYS_I2C_ROOT= $(USR_PSM_ISYS_DIR)/i2c
USR_PSM_ISYS_I2C_DIRS= $(USR_PSM_ISYS_I2C_ROOT) \
@@ -134,14 +141,16 @@ USR_PSM_ISYS_I2C_DIRS= $(USR_PSM_ISYS_I2C_ROOT) \
ROOTI2CHDRS= $(I2CHDRS:%=$(USR_PSM_ISYS_I2C_ROOT)/%)
-
MONHDRS=
#MONHDRS= eeprom.h idprom.h keyboard.h password.h
USR_PSM_MON_DIR= $(USR_PSM_ISYS_DIR)/mon
ROOTHDRS= $(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
+$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
+
SUN4_ROOTHDRS= $(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
+$(CLOSED_BUILD)SUN4_ROOTHDRS += $(CLOSED_SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
ROOTMONHDRS= $(MONHDRS:%=$(USR_PSM_MON_DIR)/%)
@@ -155,6 +164,10 @@ CHECKHDRS= $(HDRS:%.h=%.check) \
$(MONHDRS:%.h=mon/%.check) \
$(SUN4_HDRS:%.h=%.cmncheck)
+$(CLOSED_BUILD)CHECKHDRS += $(CLOSED_HDRS:%.h=$(CLOSED)/uts/sun4u/sys/%.check)
+$(CLOSED_BUILD)CHECKHDRS += \
+ $(CLOSED_I2CHDRS:%.h=$(CLOSED)/uts/sun4u/sys/i2c/%.check)
+
.KEEP_STATE:
.PARALLEL: $(CHECKHDRS) $(ROOTHDRS) $(ROOTMONHDRS) $(SUN4_ROOTHDRS)
@@ -175,6 +188,12 @@ $(USR_PSM_MON_DIR): $(USR_PSM_ISYS_DIR)
$(USR_PSM_ISYS_I2C_DIRS):
$(INS.dir.root.bin)
+$(USR_PSM_ISYS_DIR)/%: $(CLOSED)/uts/sun4u/sys/% $(USR_PSM_ISYS_DIR)
+ $(INS.file)
+
+$(USR_PSM_ISYS_DIR)/%: $(CLOSED)/uts/sun4/sys/% $(USR_PSM_ISYS_DIR)
+ $(INS.file)
+
$(USR_PSM_ISYS_DIR)/%: ../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
$(INS.file)
diff --git a/usr/src/uts/sun4u/taco/Makefile b/usr/src/uts/sun4u/taco/Makefile
index d8fb18b675..6302ecaed2 100644
--- a/usr/src/uts/sun4u/taco/Makefile
+++ b/usr/src/uts/sun4u/taco/Makefile
@@ -21,7 +21,7 @@
#
#
# uts/sun4u/taco/Makefile
-# Copyright 2002-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -51,6 +51,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -59,7 +61,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: $(TACO_KMODS)
+def all clean clean.lint clobber modlist: $(TACO_KMODS)
modlintlib: $(TACO_KMODS)
@@ -92,6 +94,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(TACO_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -99,7 +102,7 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(TACO_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
$(TACO_CRYPTO_LINKS): $(ROOT_TACO_CRYPTO_DIR_64)
-$(RM) $(ROOT_TACO_CRYPTO_DIR_64)/$@;
diff --git a/usr/src/uts/sun4u/tazmo/Makefile b/usr/src/uts/sun4u/tazmo/Makefile
index 34aeae6768..1f69f760e9 100644
--- a/usr/src/uts/sun4u/tazmo/Makefile
+++ b/usr/src/uts/sun4u/tazmo/Makefile
@@ -21,7 +21,8 @@
#
#
# uts/sun4u/tazmo/Makefile
-# Copyright (c) 1997 by Sun Microsystems, Inc.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
#
@@ -50,6 +51,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -58,15 +61,15 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clean.lint clobber: $(TAZMO_KMODS)
-
-modlintlib: $(TAZMO_KMODS)
-
+def all clean clean.lint clobber modlist: $(TAZMO_KMODS) $(CLOSED_TAZMO_KMODS)
+
+modlintlib: $(TAZMO_KMODS) $(CLOSED_TAZMO_KMODS)
+
install: $(ROOT_TAZMO_DIR) $(USR_TAZMO_DIR) \
$(USR_TAZMO_INC_DIR) \
$(USR_TAZMO_SBIN_DIR) \
$(USR_TAZMO_LIB_DIR) \
- $(TAZMO_KMODS)
+ $(TAZMO_KMODS) $(CLOSED_TAZMO_KMODS)
check install_h:
@@ -81,6 +84,7 @@ lint: modlintlib
LINT_LIBS = $(LINT_LIB) \
-L$(TAZMO_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
@@ -88,7 +92,10 @@ lint.platmod: modlintlib
@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
$(TAZMO_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
+$(CLOSED_TAZMO_KMODS): FRC
+ cd $(CLOSED)/uts/sun4u/tazmo/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
#
# Include common targets.
diff --git a/usr/src/uts/sun4u/tazmo/Makefile.targ b/usr/src/uts/sun4u/tazmo/Makefile.targ
index e6f5131624..40a592af5a 100644
--- a/usr/src/uts/sun4u/tazmo/Makefile.targ
+++ b/usr/src/uts/sun4u/tazmo/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,66 +18,12 @@
#
# CDDL HEADER END
#
-#
-# Copyright 1998-2003 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# Common targets for sun4u Tazmo implementation specific modules.
+# ident "%Z%%M% %I% %E% SMI"
#
-IMPLEMENTED_PLATFORM = SUNW,Ultra-4
-
-.KEEP_STATE:
-
-#
-# Rules for implementation subdirectories.
-#
-$(ROOT_TAZMO_DIR): $(ROOT_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_TAZMO_MOD_DIR): $(ROOT_TAZMO_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_TAZMO_DRV_DIR_32): $(ROOT_TAZMO_MOD_DIR)
- -$(INS.dir.root.sys)
-
-$(ROOT_TAZMO_DRV_DIR_64): $(ROOT_TAZMO_DRV_DIR_32)
- -$(INS.dir.root.sys)
-
-$(ROOT_TAZMO_MISC_DIR_32): $(ROOT_TAZMO_MOD_DIR)
- -$(INS.dir.root.sys)
+UTSTREE=$(UTSBASE)
-$(ROOT_TAZMO_MISC_DIR_64): $(ROOT_TAZMO_MISC_DIR_32)
- -$(INS.dir.root.sys)
-
-$(USR_TAZMO_DIR): $(USR_PLAT_DIR)
- -$(INS.dir.root.sys)
-
-$(USR_TAZMO_INC_DIR): $(USR_TAZMO_DIR)
- -$(INS.slink4)
-
-$(USR_TAZMO_SBIN_DIR): $(USR_TAZMO_DIR)
- -$(INS.slink5)
-
-$(USR_TAZMO_LIB_DIR): $(USR_TAZMO_DIR)
- -$(INS.dir.root.bin)
-
-$(USR_TAZMO_ISYS_DIR): $(USR_TAZMO_INC_DIR)
- -$(INS.dir.bin.bin)
-
-$(ROOT_TAZMO_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_TAZMO_MOD_DIR) FRC
- $(INS.file)
-
-$(ROOT_TAZMO_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_TAZMO_MISC_DIR) FRC
- $(INS.file)
-
-$(ROOT_TAZMO_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_TAZMO_DRV_DIR) FRC
- $(INS.file)
-
-#
-# Include common targets.
-#
-include $(UTSBASE)/sun4u/tazmo/Makefile.rules
-include $(UTSBASE)/sun4u/Makefile.targ
+include $(UTSBASE)/sun4u/tazmo/Makefile.targ.shared
diff --git a/usr/src/uts/sun4u/tazmo/Makefile.targ.shared b/usr/src/uts/sun4u/tazmo/Makefile.targ.shared
new file mode 100644
index 0000000000..1dffe3de4c
--- /dev/null
+++ b/usr/src/uts/sun4u/tazmo/Makefile.targ.shared
@@ -0,0 +1,84 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# Common targets for sun4u Tazmo implementation specific modules.
+#
+
+IMPLEMENTED_PLATFORM = SUNW,Ultra-4
+
+.KEEP_STATE:
+
+#
+# Rules for implementation subdirectories.
+#
+$(ROOT_TAZMO_DIR): $(ROOT_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_TAZMO_MOD_DIR): $(ROOT_TAZMO_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_TAZMO_DRV_DIR_32): $(ROOT_TAZMO_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_TAZMO_DRV_DIR_64): $(ROOT_TAZMO_DRV_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(ROOT_TAZMO_MISC_DIR_32): $(ROOT_TAZMO_MOD_DIR)
+ -$(INS.dir.root.sys)
+
+$(ROOT_TAZMO_MISC_DIR_64): $(ROOT_TAZMO_MISC_DIR_32)
+ -$(INS.dir.root.sys)
+
+$(USR_TAZMO_DIR): $(USR_PLAT_DIR)
+ -$(INS.dir.root.sys)
+
+$(USR_TAZMO_INC_DIR): $(USR_TAZMO_DIR)
+ -$(INS.slink4)
+
+$(USR_TAZMO_SBIN_DIR): $(USR_TAZMO_DIR)
+ -$(INS.slink5)
+
+$(USR_TAZMO_LIB_DIR): $(USR_TAZMO_DIR)
+ -$(INS.dir.root.bin)
+
+$(USR_TAZMO_ISYS_DIR): $(USR_TAZMO_INC_DIR)
+ -$(INS.dir.bin.bin)
+
+$(ROOT_TAZMO_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_TAZMO_MOD_DIR) FRC
+ $(INS.file)
+
+$(ROOT_TAZMO_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_TAZMO_MISC_DIR) FRC
+ $(INS.file)
+
+$(ROOT_TAZMO_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_TAZMO_DRV_DIR) FRC
+ $(INS.file)
+
+#
+# Include common targets.
+#
+include $(UTSTREE)/sun4u/tazmo/Makefile.rules
+include $(UTSTREE)/sun4u/Makefile.targ
diff --git a/usr/src/uts/sun4u/tazmo/Makefile.tazmo b/usr/src/uts/sun4u/tazmo/Makefile.tazmo
index 0270342ea4..0f3a8c3c3a 100644
--- a/usr/src/uts/sun4u/tazmo/Makefile.tazmo
+++ b/usr/src/uts/sun4u/tazmo/Makefile.tazmo
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,59 +18,12 @@
#
# CDDL HEADER END
#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
-# uts/sun4u/tazmo/Makefile.impl
-# Copyright (c) 1999 by Sun Microsystems, Inc.
-#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# Global definitions for sun4u implementation specific modules.
-#
-
-#
-# Define directories.
+# ident "%Z%%M% %I% %E% SMI"
#
-ROOT_TAZMO_DIR = $(ROOT_PLAT_DIR)/SUNW,Ultra-4
-ROOT_TAZMO_MOD_DIR = $(ROOT_TAZMO_DIR)/kernel
-
-ROOT_TAZMO_KERN_DIR_32 = $(ROOT_TAZMO_MOD_DIR)
-ROOT_TAZMO_KERN_DIR_64 = $(ROOT_TAZMO_MOD_DIR)/$(SUBDIR64)
-ROOT_TAZMO_DRV_DIR_32 = $(ROOT_TAZMO_MOD_DIR)/drv
-ROOT_TAZMO_DRV_DIR_64 = $(ROOT_TAZMO_MOD_DIR)/drv/$(SUBDIR64)
-ROOT_TAZMO_MISC_DIR_32 = $(ROOT_TAZMO_MOD_DIR)/misc
-ROOT_TAZMO_MISC_DIR_64 = $(ROOT_TAZMO_MOD_DIR)/misc/$(SUBDIR64)
-
-ROOT_TAZMO_KERN_DIR = $(ROOT_TAZMO_KERN_DIR_$(CLASS))
-ROOT_TAZMO_MISC_DIR = $(ROOT_TAZMO_MISC_DIR_$(CLASS))
-ROOT_TAZMO_DRV_DIR = $(ROOT_TAZMO_DRV_DIR_$(CLASS))
-
-ROOT_PLAT_MOD_DIRS += $(ROOT_TAZMO_MOD_DIR)
-ROOT_PLAT_MISC_DIRS += $(ROOT_TAZMO_MISC_DIR)
-ROOT_PLAT_MISC_DIRS_32 += $(ROOT_TAZMO_MISC_DIR_32)
-ROOT_PLAT_DRV_DIRS = $(ROOT_TAZMO_DRV_DIR)
-
-USR_TAZMO_DIR = $(USR_PLAT_DIR)/SUNW,Ultra-4
-USR_TAZMO_LINKED_DIR = $(USR_PLAT_DIR)/$(LINKED_PLATFORM)
-USR_TAZMO_INC_DIR = $(USR_TAZMO_DIR)/include
-USR_TAZMO_ISYS_DIR = $(USR_TAZMO_INC_DIR)/sys
-USR_TAZMO_SBIN_DIR = $(USR_TAZMO_DIR)/sbin
-USR_TAZMO_LIB_DIR = $(USR_TAZMO_DIR)/lib
-TAZMO_LINT_LIB_DIR= $(UTSBASE)/$(PLATFORM)/tazmo/lint-libs/$(OBJS_DIR)
+UTSTREE=$(UTSBASE)
-#
-# Define objects.
-#
-TAZMO_OBJS = tazmo.o
-
-#
-# Define modules.
-#
-TAZMO_KMODS = envctrl platmod
-
-include $(UTSBASE)/sun4u/tazmo/Makefile.files
-
-#
-# Include common rules.
-#
-include $(UTSBASE)/sun4u/Makefile.sun4u
+include $(UTSBASE)/sun4u/tazmo/Makefile.tazmo.shared
diff --git a/usr/src/uts/sun4u/tazmo/Makefile.tazmo.shared b/usr/src/uts/sun4u/tazmo/Makefile.tazmo.shared
new file mode 100644
index 0000000000..a7f9a83e57
--- /dev/null
+++ b/usr/src/uts/sun4u/tazmo/Makefile.tazmo.shared
@@ -0,0 +1,78 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/sun4u/tazmo/Makefile.impl
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# Global definitions for sun4u implementation specific modules.
+#
+
+#
+# Define directories.
+#
+ROOT_TAZMO_DIR = $(ROOT_PLAT_DIR)/SUNW,Ultra-4
+ROOT_TAZMO_MOD_DIR = $(ROOT_TAZMO_DIR)/kernel
+
+ROOT_TAZMO_KERN_DIR_32 = $(ROOT_TAZMO_MOD_DIR)
+ROOT_TAZMO_KERN_DIR_64 = $(ROOT_TAZMO_MOD_DIR)/$(SUBDIR64)
+ROOT_TAZMO_DRV_DIR_32 = $(ROOT_TAZMO_MOD_DIR)/drv
+ROOT_TAZMO_DRV_DIR_64 = $(ROOT_TAZMO_MOD_DIR)/drv/$(SUBDIR64)
+ROOT_TAZMO_MISC_DIR_32 = $(ROOT_TAZMO_MOD_DIR)/misc
+ROOT_TAZMO_MISC_DIR_64 = $(ROOT_TAZMO_MOD_DIR)/misc/$(SUBDIR64)
+
+ROOT_TAZMO_KERN_DIR = $(ROOT_TAZMO_KERN_DIR_$(CLASS))
+ROOT_TAZMO_MISC_DIR = $(ROOT_TAZMO_MISC_DIR_$(CLASS))
+ROOT_TAZMO_DRV_DIR = $(ROOT_TAZMO_DRV_DIR_$(CLASS))
+
+ROOT_PLAT_MOD_DIRS += $(ROOT_TAZMO_MOD_DIR)
+ROOT_PLAT_MISC_DIRS += $(ROOT_TAZMO_MISC_DIR)
+ROOT_PLAT_MISC_DIRS_32 += $(ROOT_TAZMO_MISC_DIR_32)
+ROOT_PLAT_DRV_DIRS = $(ROOT_TAZMO_DRV_DIR)
+
+USR_TAZMO_DIR = $(USR_PLAT_DIR)/SUNW,Ultra-4
+USR_TAZMO_LINKED_DIR = $(USR_PLAT_DIR)/$(LINKED_PLATFORM)
+USR_TAZMO_INC_DIR = $(USR_TAZMO_DIR)/include
+USR_TAZMO_ISYS_DIR = $(USR_TAZMO_INC_DIR)/sys
+USR_TAZMO_SBIN_DIR = $(USR_TAZMO_DIR)/sbin
+USR_TAZMO_LIB_DIR = $(USR_TAZMO_DIR)/lib
+
+TAZMO_LINT_LIB_DIR= $(UTSBASE)/$(PLATFORM)/tazmo/lint-libs/$(OBJS_DIR)
+
+#
+# Define objects.
+#
+TAZMO_OBJS = tazmo.o
+
+include $(UTSBASE)/sun4u/tazmo/Makefile.files
+
+#
+# Include common rules.
+#
+include $(UTSTREE)/sun4u/Makefile.sun4u
+
+#
+# Define modules (must come after Makefile.sun4u, for CLOSED_BUILD).
+#
+TAZMO_KMODS = platmod
+$(CLOSED_BUILD)CLOSED_TAZMO_KMODS = envctrl
diff --git a/usr/src/uts/sun4v/Makefile b/usr/src/uts/sun4v/Makefile
index 5ea8b75cbf..2192fe8ebd 100644
--- a/usr/src/uts/sun4v/Makefile
+++ b/usr/src/uts/sun4v/Makefile
@@ -49,6 +49,7 @@ SPARC_LINTS =
#
LINT_LIBS = $(LINT_LIB) \
$(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
+ $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
$(SPARC_LINTS:%=$(SPARC_LIB_DIR)/llib-l%.ln)
# EXPORT DELETE START
@@ -58,7 +59,10 @@ LINT_LIBS = $(LINT_LIB) \
# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
# should not be listed in the lint target.
#
-CRYPTO_EK_KMODS += arcfour2048
+# Don't build this for OpenSolaris, since it will be replaced by
+# a binary that is signed by Sun RE.
+#
+$(CLOSED_BUILD)CRYPTO_EK_KMODS += arcfour2048
# EXPORT DELETE END
def := TARGET= def
@@ -70,37 +74,64 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist modlist.sparc := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
.KEEP_STATE:
-.PARALLEL: $(KMODS) $(XMODS)
+.PARALLEL: $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
+ modlist modlist.sparc
# Override for CPU_KMODS... they cannot be built
# in parallel
.NO_PARALLEL: $(CPU_KMODS)
-def all clean clobber clean.lint: genassym unix .WAIT $(KMODS) $(XMODS) \
- $(IMPLEMENTATIONS)
+def all clean clobber clean.lint: genassym unix .WAIT \
+ $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS)
-install: install_platforms genassym unix .WAIT $(KMODS) $(XMODS) \
+# list the modules under sun4v.
+modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \
$(IMPLEMENTATIONS)
+# list the modules for Install -k sun4v.
+modlist.karch: modlist modlist.sparc
+
+modlist.sparc:
+ @cd $(SRC)/uts/sparc; pwd; $(MAKE) $(NO_STATE) modlist
+
+install: install_platforms genassym unix .WAIT $(KMODS) $(CLOSED_KMODS) \
+ $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS)
+
lintlib: unix
-modlintlib: $(LINT_KMODS)
+modlintlib: $(LINT_KMODS) $(CLOSED_LINT_KMODS)
+
+genassym unix $(KMODS): FRC
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
-genassym unix $(KMODS) $(IMPLEMENTATIONS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+$(IMPLEMENTATIONS): FRC
+ @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET)
$(XMODS): FRC
@if [ -f $@/Makefile ]; then \
- cd $@; pwd; $(MAKE) $(TARGET); \
+ cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
else \
true; \
fi
+$(CLOSED_XMODS): FRC
+ @if [ -f $(CLOSED)/uts/sun4v/$@/Makefile ]; then \
+ cd $(CLOSED)/uts/sun4v/$@; pwd; \
+ $(MAKE) $(NO_STATE) $(TARGET); \
+ else \
+ true; \
+ fi
+
+$(CLOSED_KMODS): FRC
+ cd $(CLOSED)/uts/sun4v/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
+
install_h check: install_platforms $(IMPLEMENTATIONS) FRC
@cd sys; pwd; $(MAKE) $(TARGET)
@cd vm; pwd; $(MAKE) $(TARGET)
@@ -193,7 +224,11 @@ include ../Makefile.targ
# Cross-reference customization: build a cross-reference over all of the
# sun4v-related directories.
#
-XRDIRS = ../sun4v ../sun4 ../sfmmu ../sparc ../sun ../common
+SHARED_XRDIRS = ../sun4v ../sun4 ../sfmmu ../sparc ../sun ../common
+CLOSED_XRDIRS = $(SHARED_XRDIRS:../%=../% ../../../closed/uts/%)
+XRDIRS = $(SHARED_XRDIRS)
+$(CLOSED_BUILD)XRDIRS = $(CLOSED_XRDIRS:../../../closed/uts/sfmmu=)
+
XRPRUNE = i86pc
cscope.out tags: FRC
diff --git a/usr/src/uts/sun4v/Makefile.files b/usr/src/uts/sun4v/Makefile.files
index 65193d93d1..1216af14d7 100644
--- a/usr/src/uts/sun4v/Makefile.files
+++ b/usr/src/uts/sun4v/Makefile.files
@@ -110,8 +110,6 @@ QCN_OBJS = qcn.o
VNEX_OBJS = vnex.o
GLVC_OBJS = glvc.o
MDESC_OBJS = mdesc.o
-NCP_OBJS = ncp.o ncp_kcf.o ncp_debug.o ncp_kstat.o ncp_rsa.o \
- ncp_dsa.o bignumimpl.o
#
# Misc modules
diff --git a/usr/src/uts/sun4v/Makefile.rules b/usr/src/uts/sun4v/Makefile.rules
index ec546b88a6..f77ddb66f2 100644
--- a/usr/src/uts/sun4v/Makefile.rules
+++ b/usr/src/uts/sun4v/Makefile.rules
@@ -51,20 +51,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/memtest/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4/io/memtest/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/memtest/%.s
- $(COMPILE.s) -o $@ $<
-
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4/io/memtest/%.s
- $(COMPILE.s) -o $@ $<
-
$(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/ml/%.s
$(COMPILE.s) -o $@ $<
@@ -83,10 +69,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/px/%.c
$(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/px/%.s
$(COMPILE.s) -o $@ $<
-$(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/io/ncp/%.c
- $(COMPILE.c) -o $@ $<
- $(CTFCONVERT_O)
-
$(OBJS_DIR)/%.o: $(UTSBASE)/sun4v/vm/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -140,27 +122,12 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/cpu/%.s
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/memtest/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4/io/memtest/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/memtest/%.s
- @($(LHEAD) $(LINT.s) $< $(LTAIL))
-
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4/io/memtest/%.s
- @($(LHEAD) $(LINT.s) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/px/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/px/%.s
@($(LHEAD) $(LINT.s) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/io/ncp/%.c
- @($(LHEAD) $(LINT.c) $< $(LTAIL))
-
$(LINTS_DIR)/%.ln: $(UTSBASE)/sun4v/ml/%.s
@($(LHEAD) $(LINT.s) $< $(LTAIL))
diff --git a/usr/src/uts/sun4v/Makefile.sun4v b/usr/src/uts/sun4v/Makefile.sun4v
index dc7235ae0d..a4e93da34d 100644
--- a/usr/src/uts/sun4v/Makefile.sun4v
+++ b/usr/src/uts/sun4v/Makefile.sun4v
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,379 +18,12 @@
#
# CDDL HEADER END
#
-#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
-# This makefile contains the common definitions for the sun4v unix
-# and all sun4v implementation architecture dependent modules.
-#
-
-#
-# Machine type (implementation architecture):
-#
-PLATFORM = sun4v
-LINKED_PLATFORMS += SUNW,Sun-Fire-T1000
-PROMIF = ieee1275
-PSMBASE = $(UTSBASE)/../psm
-
-#
-# Definitions for the platform-specific /platform directories.
-#
-# PLATFORMS designates those sun4v machines which have no platform
-# specific code.
-#
-# IMPLEMENTATIONS is used to designate sun4v machines which have
-# platform specific modules. All code specific to a given implementation
-# resides in the appropriately named subdirectory. This requires
-# these platforms to have their own Makefiles to define ROOT_PLAT_DIRS,
-# USR_PLAT_DIRS, etc.
-# The number of IMPLEMENTATIONS should not grow!
-#
-# So if we had an implementation named 'foo', we would need the following
-# Makefiles in the foo subdirectory:
-#
-# sun4v/foo/Makefile
-# sun4v/foo/Makefile.foo
-# sun4v/foo/Makefile.targ
-#
-
-#
-# all PLATFORMS that do not belong in the $(IMPLEMENTATIONS) list.
-# This list should be empty. A platform without platform modules
-# is a plain, generic sun4v platform.
-#
-#IMPLEMENTED_PLATFORM =
-#PLATFORMS = $(IMPLEMENTED_PLATFORM)
-
-# IMPLEMENTATIONS is used by Install.sh, must not use backslash to continue
-# the lines.
-IMPLEMENTATIONS = ontario
-
-#ROOT_PLAT_DIRS = $(PLATFORMS:%=$(ROOT_PLAT_DIR)/%)
-#USR_PLAT_DIRS = $(PLATFORMS:%=$(USR_PLAT_DIR)/%)
-
-#USR_DESKTOP_DIR = $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM)
-#USR_DESKTOP_INC_DIR = $(USR_DESKTOP_DIR)/include
-#USR_DESKTOP_SBIN_DIR = $(USR_DESKTOP_DIR)/sbin
-#USR_DESKTOP_LIB_DIR = $(USR_DESKTOP_DIR)/lib
-
-#
-# Define supported builds
-#
-DEF_BUILDS = $(DEF_BUILDS64)
-ALL_BUILDS = $(ALL_BUILDS64)
-
-#
-# Everybody needs to know how to build modstubs.o and to locate unix.o
-#
-UNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix
-GENLIB_DIR = $(UTSBASE)/$(PLATFORM)/genunix
-MODSTUBS_DIR = $(UNIX_DIR)
-DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
-LINTS_DIR = $(OBJS_DIR)
-LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
-
-DTRACESTUBS_O = $(OBJS_DIR)/dtracestubs.o
-DTRACESTUBS = $(OBJS_DIR)/libdtracestubs.so
-
-UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
-MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
-GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
-
-LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
-GEN_LINT_LIB = $(LINT_LIB_DIR)/llib-lgenunix.ln
-
-LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/$(PLATFORM)/lint-libs/%)
-LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln)
-
-#
-# cpu and platform modules need to know how to build their own symcheck module
-#
-PLATMOD = platmod
-PLATLIB = $(PLAT_DIR)/$(OBJS_DIR)/libplatmod.so
-
-CPUNAME = cpu
-CPULIB = $(CPU_DIR)/$(OBJS_DIR)/libcpu.so
-
-SYM_MOD = $(OBJS_DIR)/unix.sym
-
-#
-# Include the makefiles which define build rule templates, the
-# collection of files per module, and a few specific flags. Note
-# that order is significant, just as with an include path. The
-# first build rule template which matches the files name will be
-# used. By including these in order from most machine dependent
-# to most machine independent, we allow a machine dependent file
-# to be used in preference over a machine independent version
-# (Such as a machine specific optimization, which preserves the
-# interfaces.)
-#
-include $(UTSBASE)/sun4/Makefile.files
-include $(UTSBASE)/$(PLATFORM)/Makefile.files
-include $(UTSBASE)/sfmmu/Makefile.files
-include $(UTSBASE)/sparc/v9/Makefile.files
-include $(UTSBASE)/sparc/Makefile.files
-include $(UTSBASE)/sun/Makefile.files
-include $(SRC)/psm/promif/$(PROMIF)/common/Makefile.files
-include $(SRC)/psm/promif/$(PROMIF)/$(PLATFORM)/Makefile.files
-include $(UTSBASE)/common/Makefile.files
-
-#
-# Include machine independent rules. Note that this does not imply
-# that the resulting module from rules in Makefile.uts is machine
-# independent. Only that the build rules are machine independent.
-#
-include $(UTSBASE)/Makefile.uts
-
-CTFMERGE_GUDIR = sun4v
-
-#
-# machine specific optimization, override default in Makefile.master
-#
-QTOOLS_ROOT= $(SPRO_ROOT)/sun4v
-sparc_AS= $(QTOOLS_ROOT)/qas -xregsym=no
-sparcv9_AS= $(QTOOLS_ROOT)/qas -xregsym=no
-
-CC_XARCH = -xarch=v9a
-AS_XARCH = -xarch=v9d
-COPTIMIZE = -xO3
-CCMODE = -Xa
-
-CFLAGS = -xchip=ultra $(CCABS32) $(CCREGSYM)
-CFLAGS += $(CC_XARCH)
-CFLAGS += $(COPTIMIZE)
-CFLAGS += $(EXTRA_CFLAGS)
-CFLAGS += $(XAOPT)
-CFLAGS += $(INLINES) -D_ASM_INLINES
-CFLAGS += $(CCMODE)
-CFLAGS += $(SPACEFLAG)
-CFLAGS += $(CERRWARN)
-CFLAGS += $(CTF_FLAGS)
-CFLAGS += $(C99MODE)
-CFLAGS += $(CCUNBOUND)
-CFLAGS += -xregs=no%float
-CPPFLAGS += -DGLREG
-
-ASFLAGS += $(AS_XARCH) -DGLREG
-
-AS_INC_PATH += -I$(DSF_DIR)/$(OBJS_DIR)
-
-LINT_KMODS += $(GENUNIX_KMODS)
-
-LINT_DEFS = -Xarch=v9
-
-#
-# The following must be defined for all implementations:
-#
-# MAPFILE: ld mapfile for the build of kernel/unix.
-# MODSTUBS: Module stubs source file.
-# GENCONST_SRC: genconst.c
-# OFFSETS: offsets.in
-# PLATFORM_OFFSETS: Platform specific mach_offsets.in
-# FDOFFSETS: fd_offsets.in
-#
-MAPFILE = $(UTSBASE)/sun4/conf/Mapfile
-MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s
-GENCONST_SRC = $(UTSBASE)/sun4/ml/genconst.c
-OFFSETS = $(UTSBASE)/sun4/ml/offsets.in
-PLATFORM_OFFSETS = $(UTSBASE)/sun4v/ml/mach_offsets.in
-FDOFFSETS = $(UTSBASE)/sun/io/fd_offsets.in
-
-#
-# Define the actual specific platforms
-#
-
-MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU
-
-$(MPSAS_BUILD)MACHINE_DEFS += -DMPSAS
-
-#
-# Software workarounds for hardware "features"
-#
-
-include $(UTSBASE)/$(PLATFORM)/Makefile.workarounds
-
-#
-# Debugging level
-#
-# Special knowledge of which special debugging options effect which
-# file is used to optimize the build if these flags are changed.
-#
-# XXX: The above could possibly be done for more flags and files, but
-# is left as an experiment to the interested reader. Be forewarned,
-# that excessive use could lead to maintenance difficulties.
-#
-# Note: kslice can be enabled for the sun4v, but is disabled by default
-# in all cases.
-#
-
-DEBUG_DEFS_OBJ64 =
-DEBUG_DEFS_DBG64 = -DDEBUG
-DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
-
-DEBUG_COND_OBJ64 :sh = echo \\043
-DEBUG_COND_DBG64 =
-IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
-
-$(IF_DEBUG_OBJ)trap.o := DEBUG_DEFS += -DTRAPDEBUG
-$(IF_DEBUG_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPDEBUG
-$(IF_DEBUG_OBJ)syscall_trap.o := DEBUG_DEFS += -DSYSCALLTRACE
-$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=0
-
-IF_TRAPTRACE_OBJ = $(IF_DEBUG_OBJ)
-# comment this out for a non-debug kernel with TRAPTRACE
-#IF_TRAPTRACE_OBJ = $(OBJS_DIR)/
-
-$(IF_TRAPTRACE_OBJ)locore.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_locore.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mlsetup.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)syscall_trap.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)startup.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_startup.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)cpu_states.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_cpu_states.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)interrupt.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_interrupt.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_sfmmu_asm.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)sfmmu_asm.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)trap_table.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)xc.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_xc.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)wbuf.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)trap.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPTRACE
-$(IF_TRAPTRACE_OBJ)cheetah_asm.o := DEBUG_DEFS += -DTRAPTRACE
-
-# Comment these out if you don't want dispatcher lock statistics.
-
-#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_LOCK_STATS
-#$(IF_DEBUG_OBJ)disp.o := DEBUG_DEFS += -DDISP_LOCK_STATS
-
-# Comment these out if you don't want dispatcher debugging
-
-#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_DEBUG
-
-#
-# Build `options'. These are mostly historical and the need for these
-# is largely removed by the module technology. However, the static
-# build will continue to require these.
-#
-OPTION_DEFS = -DC2_AUDIT
-
-#
-# Collect the preprocessor definitions to be associated with *all*
-# files.
-#
-ALL_DEFS = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \
- $(OPTION_DEFS)
-GENCONST_DEFS = $(MACHINE_DEFS) $(OPTION_DEFS)
-
-#
-# ----- TRANSITIONAL SECTION --------------------------------------------------
-#
-
-#
-# Not everything which *should* be a module is a module yet. The
-# following is a list of such objects which are currently part of
-# the base kernel but should soon become kmods.
-#
-MACH_NOT_YET_KMODS = $(AUTOCONF_OBJS)
-#
-# ----- END OF TRANSITIONAL SECTION -------------------------------------------
-#
-
-#
-# The kernels modules which are "implementation architecture"
-# specific for this machine are enumerated below. Note that most
-# of these modules must exist (in one form or another) for each
-# architecture.
-#
-# Common Drivers (usually pseudo drivers) (/kernel/drv):
-#
-
-#
-# Machine Specific Driver Modules (/kernel/drv):
-#
-DRV_KMODS += vnex
-DRV_KMODS += qcn
-DRV_KMODS += dma
-DRV_KMODS += cpc
-DRV_KMODS += rootnex
-DRV_KMODS += trapstat
-DRV_KMODS += px
-DRV_KMODS += glvc
-DRV_KMODS += bge
-DRV_KMODS += mdesc
-DRV_KMODS += ncp
-DRV_KMODS += ebus
-DRV_KMODS += su
-DRV_KMODS += memtest
-
-#
-# Exec Class Modules (/kernel/exec):
-#
-EXEC_KMODS +=
+UTSTREE=$(UTSBASE)
-#
-# Scheduling Class Modules (/kernel/sched):
-#
-SCHED_KMODS +=
-
-#
-# File System Modules (/kernel/fs):
-#
-FS_KMODS +=
-
-#
-# Streams Modules (/kernel/strmod):
-#
-# STRMOD_KMODS += kb
-
-#
-# 'System' Modules (/kernel/sys):
-#
-SYS_KMODS +=
-
-#
-# 'User' Modules (/kernel/misc):
-#
-MISC_KMODS += obpsym bootdev vis platmod
-
-# md5 optimized for Niagara
-#
-MISC_KMODS += md5
-
-#
-# Software Cryptographic Providers (/kernel/crypto):
-#
-CRYPTO_KMODS += arcfour
-
-#
-# generic-unix module (/kernel/genunix):
-#
-GENUNIX_KMODS += genunix
-
-# 'User' "Modules" excluded from the Full Kernel lint target:
-#
-NLMISC_KMODS += forthdebug
-
-#
-# Modules eXcluded from the product:
-#
-XMODS +=
-
-#
-# cpu modules
-#
-CPU_KMODS += generic niagara
-
-#
-# Performance Counter BackEnd Modules (/usr/kernel/pcbe):
-#
-PCBE_KMODS += niagara_pcbe
+include $(UTSBASE)/sun4v/Makefile.sun4v.shared
diff --git a/usr/src/uts/sun4v/Makefile.sun4v.shared b/usr/src/uts/sun4v/Makefile.sun4v.shared
new file mode 100644
index 0000000000..9255dd5a61
--- /dev/null
+++ b/usr/src/uts/sun4v/Makefile.sun4v.shared
@@ -0,0 +1,399 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+# This makefile contains the common definitions for the sun4v unix
+# and all sun4v implementation architecture dependent modules.
+#
+
+#
+# Machine type (implementation architecture):
+#
+PLATFORM = sun4v
+LINKED_PLATFORMS += SUNW,Sun-Fire-T1000
+PROMIF = ieee1275
+PSMBASE = $(UTSBASE)/../psm
+
+#
+# Definitions for the platform-specific /platform directories.
+#
+# PLATFORMS designates those sun4v machines which have no platform
+# specific code.
+#
+# IMPLEMENTATIONS is used to designate sun4v machines which have
+# platform specific modules. All code specific to a given implementation
+# resides in the appropriately named subdirectory. This requires
+# these platforms to have their own Makefiles to define ROOT_PLAT_DIRS,
+# USR_PLAT_DIRS, etc.
+# The number of IMPLEMENTATIONS should not grow!
+#
+# So if we had an implementation named 'foo', we would need the following
+# Makefiles in the foo subdirectory:
+#
+# sun4v/foo/Makefile
+# sun4v/foo/Makefile.foo
+# sun4v/foo/Makefile.targ
+#
+
+#
+# all PLATFORMS that do not belong in the $(IMPLEMENTATIONS) list.
+# This list should be empty. A platform without platform modules
+# is a plain, generic sun4v platform.
+#
+#IMPLEMENTED_PLATFORM =
+#PLATFORMS = $(IMPLEMENTED_PLATFORM)
+
+IMPLEMENTATIONS = ontario
+
+#ROOT_PLAT_DIRS = $(PLATFORMS:%=$(ROOT_PLAT_DIR)/%)
+#USR_PLAT_DIRS = $(PLATFORMS:%=$(USR_PLAT_DIR)/%)
+
+#USR_DESKTOP_DIR = $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM)
+#USR_DESKTOP_INC_DIR = $(USR_DESKTOP_DIR)/include
+#USR_DESKTOP_SBIN_DIR = $(USR_DESKTOP_DIR)/sbin
+#USR_DESKTOP_LIB_DIR = $(USR_DESKTOP_DIR)/lib
+
+#
+# Define supported builds
+#
+DEF_BUILDS = $(DEF_BUILDS64)
+ALL_BUILDS = $(ALL_BUILDS64)
+
+#
+# Everybody needs to know how to build modstubs.o and to locate unix.o
+#
+UNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix
+GENLIB_DIR = $(UTSBASE)/$(PLATFORM)/genunix
+MODSTUBS_DIR = $(UNIX_DIR)
+DSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym
+LINTS_DIR = $(OBJS_DIR)
+LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR)
+
+DTRACESTUBS_O = $(OBJS_DIR)/dtracestubs.o
+DTRACESTUBS = $(OBJS_DIR)/libdtracestubs.so
+
+UNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
+MODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
+GENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
+
+LINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln
+GEN_LINT_LIB = $(LINT_LIB_DIR)/llib-lgenunix.ln
+
+LINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/$(PLATFORM)/lint-libs/%)
+LINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln)
+
+#
+# cpu and platform modules need to know how to build their own symcheck module
+#
+PLATMOD = platmod
+PLATLIB = $(PLAT_DIR)/$(OBJS_DIR)/libplatmod.so
+
+CPUNAME = cpu
+CPULIB = $(CPU_DIR)/$(OBJS_DIR)/libcpu.so
+
+SYM_MOD = $(OBJS_DIR)/unix.sym
+
+#
+# Include the makefiles which define build rule templates, the
+# collection of files per module, and a few specific flags. Note
+# that order is significant, just as with an include path. The
+# first build rule template which matches the files name will be
+# used. By including these in order from most machine dependent
+# to most machine independent, we allow a machine dependent file
+# to be used in preference over a machine independent version
+# (Such as a machine specific optimization, which preserves the
+# interfaces.)
+#
+include $(UTSBASE)/sun4/Makefile.files
+include $(UTSTREE)/$(PLATFORM)/Makefile.files
+include $(UTSBASE)/sfmmu/Makefile.files
+include $(UTSBASE)/sparc/v9/Makefile.files
+include $(UTSBASE)/sparc/Makefile.files
+include $(UTSTREE)/sun/Makefile.files
+include $(SRC)/psm/promif/$(PROMIF)/common/Makefile.files
+include $(SRC)/psm/promif/$(PROMIF)/$(PLATFORM)/Makefile.files
+include $(UTSTREE)/common/Makefile.files
+
+#
+# Include machine independent rules. Note that this does not imply
+# that the resulting module from rules in Makefile.uts is machine
+# independent. Only that the build rules are machine independent.
+#
+include $(UTSBASE)/Makefile.uts
+
+CTFMERGE_GUDIR = sun4v
+
+#
+# machine specific optimization, override default in Makefile.master
+#
+QTOOLS_ROOT= $(SPRO_ROOT)/sun4v
+sparc_AS= $(QTOOLS_ROOT)/qas -xregsym=no
+sparcv9_AS= $(QTOOLS_ROOT)/qas -xregsym=no
+
+CC_XARCH = -xarch=v9a
+AS_XARCH = -xarch=v9d
+COPTIMIZE = -xO3
+CCMODE = -Xa
+
+CFLAGS = -xchip=ultra $(CCABS32) $(CCREGSYM)
+CFLAGS += $(CC_XARCH)
+CFLAGS += $(COPTIMIZE)
+CFLAGS += $(EXTRA_CFLAGS)
+CFLAGS += $(XAOPT)
+CFLAGS += $(INLINES) -D_ASM_INLINES
+CFLAGS += $(CCMODE)
+CFLAGS += $(SPACEFLAG)
+CFLAGS += $(CERRWARN)
+CFLAGS += $(CTF_FLAGS)
+CFLAGS += $(C99MODE)
+CFLAGS += $(CCUNBOUND)
+CFLAGS += -xregs=no%float
+CPPFLAGS += -DGLREG
+
+ASFLAGS += $(AS_XARCH) -DGLREG
+
+AS_INC_PATH += -I$(DSF_DIR)/$(OBJS_DIR)
+
+LINT_KMODS += $(GENUNIX_KMODS)
+
+LINT_DEFS = -Xarch=v9
+
+#
+# The following must be defined for all implementations:
+#
+# MAPFILE: ld mapfile for the build of kernel/unix.
+# MODSTUBS: Module stubs source file.
+# GENCONST_SRC: genconst.c
+# OFFSETS: offsets.in
+# PLATFORM_OFFSETS: Platform specific mach_offsets.in
+# FDOFFSETS: fd_offsets.in
+#
+MAPFILE = $(UTSBASE)/sun4/conf/Mapfile
+MODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s
+GENCONST_SRC = $(UTSBASE)/sun4/ml/genconst.c
+OFFSETS = $(UTSBASE)/sun4/ml/offsets.in
+PLATFORM_OFFSETS = $(UTSBASE)/sun4v/ml/mach_offsets.in
+FDOFFSETS = $(UTSBASE)/sun/io/fd_offsets.in
+
+#
+# Define the actual specific platforms
+#
+
+MACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU
+
+$(MPSAS_BUILD)MACHINE_DEFS += -DMPSAS
+
+#
+# Software workarounds for hardware "features"
+#
+
+include $(UTSBASE)/$(PLATFORM)/Makefile.workarounds
+
+#
+# Debugging level
+#
+# Special knowledge of which special debugging options effect which
+# file is used to optimize the build if these flags are changed.
+#
+# XXX: The above could possibly be done for more flags and files, but
+# is left as an experiment to the interested reader. Be forewarned,
+# that excessive use could lead to maintenance difficulties.
+#
+# Note: kslice can be enabled for the sun4v, but is disabled by default
+# in all cases.
+#
+
+DEBUG_DEFS_OBJ64 =
+DEBUG_DEFS_DBG64 = -DDEBUG
+DEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE))
+
+DEBUG_COND_OBJ64 :sh = echo \\043
+DEBUG_COND_DBG64 =
+IF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
+
+$(IF_DEBUG_OBJ)trap.o := DEBUG_DEFS += -DTRAPDEBUG
+$(IF_DEBUG_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPDEBUG
+$(IF_DEBUG_OBJ)syscall_trap.o := DEBUG_DEFS += -DSYSCALLTRACE
+$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=0
+
+IF_TRAPTRACE_OBJ = $(IF_DEBUG_OBJ)
+# comment this out for a non-debug kernel with TRAPTRACE
+#IF_TRAPTRACE_OBJ = $(OBJS_DIR)/
+
+$(IF_TRAPTRACE_OBJ)locore.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_locore.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mlsetup.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)syscall_trap.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)startup.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_startup.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_mp_startup.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)cpu_states.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_cpu_states.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)interrupt.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_interrupt.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_sfmmu_asm.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)sfmmu_asm.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)trap_table.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)xc.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_xc.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)wbuf.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)trap.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPTRACE
+$(IF_TRAPTRACE_OBJ)cheetah_asm.o := DEBUG_DEFS += -DTRAPTRACE
+
+# Comment these out if you don't want dispatcher lock statistics.
+
+#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_LOCK_STATS
+#$(IF_DEBUG_OBJ)disp.o := DEBUG_DEFS += -DDISP_LOCK_STATS
+
+# Comment these out if you don't want dispatcher debugging
+
+#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_DEBUG
+
+#
+# Build `options'. These are mostly historical and the need for these
+# is largely removed by the module technology. However, the static
+# build will continue to require these.
+#
+OPTION_DEFS = -DC2_AUDIT
+
+#
+# Collect the preprocessor definitions to be associated with *all*
+# files.
+#
+ALL_DEFS = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \
+ $(OPTION_DEFS)
+GENCONST_DEFS = $(MACHINE_DEFS) $(OPTION_DEFS)
+
+#
+# ----- TRANSITIONAL SECTION --------------------------------------------------
+#
+
+#
+# Not everything which *should* be a module is a module yet. The
+# following is a list of such objects which are currently part of
+# the base kernel but should soon become kmods.
+#
+MACH_NOT_YET_KMODS = $(AUTOCONF_OBJS)
+
+#
+# ----- END OF TRANSITIONAL SECTION -------------------------------------------
+#
+
+#
+# The kernels modules which are "implementation architecture"
+# specific for this machine are enumerated below. Note that most
+# of these modules must exist (in one form or another) for each
+# architecture.
+#
+# Common Drivers (usually pseudo drivers) (/kernel/drv):
+#
+
+#
+# Machine Specific Driver Modules (/kernel/drv):
+#
+DRV_KMODS += vnex
+DRV_KMODS += qcn
+DRV_KMODS += dma
+DRV_KMODS += cpc
+DRV_KMODS += rootnex
+DRV_KMODS += trapstat
+DRV_KMODS += px
+DRV_KMODS += glvc
+DRV_KMODS += bge
+DRV_KMODS += mdesc
+DRV_KMODS += ebus
+DRV_KMODS += su
+
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += memtest
+$(CLOSED_BUILD)CLOSED_DRV_KMODS += ncp
+
+#
+# Exec Class Modules (/kernel/exec):
+#
+EXEC_KMODS +=
+
+#
+# Scheduling Class Modules (/kernel/sched):
+#
+SCHED_KMODS +=
+
+#
+# File System Modules (/kernel/fs):
+#
+FS_KMODS +=
+
+#
+# Streams Modules (/kernel/strmod):
+#
+# STRMOD_KMODS += kb
+
+#
+# 'System' Modules (/kernel/sys):
+#
+SYS_KMODS +=
+
+#
+# 'User' Modules (/kernel/misc):
+#
+MISC_KMODS += obpsym bootdev vis platmod
+
+# md5 optimized for Niagara
+#
+MISC_KMODS += md5
+
+#
+# Software Cryptographic Providers (/kernel/crypto):
+#
+# Don't build this for OpenSolaris, since it will be replaced by
+# a binary that is signed by Sun RE.
+#
+$(CLOSED_BUILD)CRYPTO_KMODS += arcfour
+
+#
+# generic-unix module (/kernel/genunix):
+#
+GENUNIX_KMODS += genunix
+
+# 'User' "Modules" excluded from the Full Kernel lint target:
+#
+$(CLOSED_BUILD)CLOSED_NLMISC_KMODS += forthdebug
+
+#
+# Modules eXcluded from the product:
+#
+XMODS +=
+
+#
+# cpu modules
+#
+CPU_KMODS += generic niagara
+
+#
+# Performance Counter BackEnd Modules (/usr/kernel/pcbe):
+#
+PCBE_KMODS += niagara_pcbe
diff --git a/usr/src/uts/sun4v/Makefile.targ b/usr/src/uts/sun4v/Makefile.targ
index 780316d9ff..939028c403 100644
--- a/usr/src/uts/sun4v/Makefile.targ
+++ b/usr/src/uts/sun4v/Makefile.targ
@@ -1,4 +1,3 @@
-#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
@@ -19,32 +18,12 @@
#
# CDDL HEADER END
#
-#
-# uts/sun4v/Makefile.targ
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#ident "%Z%%M% %I% %E% SMI"
-#
-# This Makefile defines the set of all required, target containing
-# included Makefiles for the sun4v "implementation architecture".
+# ident "%Z%%M% %I% %E% SMI"
#
-#
-# Targets for all implementations:
-#
-include $(UTSBASE)/Makefile.targ
+UTSTREE=$(UTSBASE)
-#
-# Target set for sun4v (order is somewhat important, sun4 should come
-# after sun4v)
-#
-include $(UTSBASE)/sun4/Makefile.rules
-include $(UTSBASE)/sun4v/Makefile.rules
-include $(UTSBASE)/sfmmu/Makefile.rules
-include $(UTSBASE)/sparc/v9/Makefile.rules
-include $(UTSBASE)/sparc/Makefile.rules
-include $(UTSBASE)/sun/Makefile.rules
-include $(PSMBASE)/promif/$(PROMIF)/common/Makefile.rules
-include $(PSMBASE)/promif/$(PROMIF)/sun4v/Makefile.rules
-include $(UTSBASE)/common/Makefile.rules
+include $(UTSBASE)/sun4v/Makefile.targ.shared
diff --git a/usr/src/uts/sun4v/Makefile.targ.shared b/usr/src/uts/sun4v/Makefile.targ.shared
new file mode 100644
index 0000000000..d23af6942f
--- /dev/null
+++ b/usr/src/uts/sun4v/Makefile.targ.shared
@@ -0,0 +1,50 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (the "License"). You may not use this file except in compliance
+# with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# uts/sun4v/Makefile.targ
+# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+#ident "%Z%%M% %I% %E% SMI"
+#
+# This Makefile defines the set of all required, target containing
+# included Makefiles for the sun4v "implementation architecture".
+#
+
+#
+# Targets for all implementations:
+#
+include $(UTSBASE)/Makefile.targ
+
+#
+# Target set for sun4v (order is somewhat important, sun4 should come
+# after sun4v)
+#
+include $(UTSBASE)/sun4/Makefile.rules
+include $(UTSTREE)/sun4v/Makefile.rules
+include $(UTSBASE)/sfmmu/Makefile.rules
+include $(UTSBASE)/sparc/v9/Makefile.rules
+include $(UTSBASE)/sparc/Makefile.rules
+include $(UTSTREE)/sun/Makefile.rules
+include $(PSMBASE)/promif/$(PROMIF)/common/Makefile.rules
+include $(PSMBASE)/promif/$(PROMIF)/sun4v/Makefile.rules
+include $(UTSTREE)/common/Makefile.rules
diff --git a/usr/src/uts/sun4v/ontario/Makefile b/usr/src/uts/sun4v/ontario/Makefile
index bc9b63ffb0..cada29fd6e 100644
--- a/usr/src/uts/sun4v/ontario/Makefile
+++ b/usr/src/uts/sun4v/ontario/Makefile
@@ -51,6 +51,8 @@ clobber := TARGET= clobber
lint := TARGET= lint
lintlib := TARGET= lintlib
modlintlib := TARGET= modlintlib
+modlist := TARGET= modlist
+modlist := NO_STATE= -K $$MODSTATE$$$$
clean.lint := TARGET= clean.lint
check := TARGET= check
@@ -59,7 +61,7 @@ check := TARGET= check
#
.KEEP_STATE:
-def all clean clobber clean.lint: $(ONTARIO_KMODS)
+def all clean clobber clean.lint modlist: $(ONTARIO_KMODS)
lintlib: unix
@@ -76,7 +78,7 @@ install: $(ROOT_ONTARIO_DIR) $(USR_ONTARIO_DIR) \
.WAIT $(ONTARIO_KMODS)
$(ONTARIO_KMODS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+ @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
install_h check: FRC
@@ -85,6 +87,7 @@ lint: modlintlib .WAIT $(LINT_DEPS)
LINT_LIBS = $(LINT_LIB) \
-L$(ONTARIO_LINT_LIB_DIR) \
-L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
+ $(CLOSED_LINT_KMODS:%=-l%) \
-L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
lint.platmod: modlintlib
diff --git a/usr/src/uts/sun4v/sys/Makefile b/usr/src/uts/sun4v/sys/Makefile
index a8a0834a3b..27aaa80b8a 100644
--- a/usr/src/uts/sun4v/sys/Makefile
+++ b/usr/src/uts/sun4v/sys/Makefile
@@ -56,7 +56,6 @@ SUN4_HDRS= \
ivintr.h \
memlist_plat.h \
memnode.h \
- memtestio.h \
nexusdebug.h \
prom_debug.h \
scb.h \
@@ -69,6 +68,9 @@ SUN4_HDRS= \
xc_impl.h \
zsmach.h
+CLOSED_SUN4_HDRS= \
+ memtestio.h
+
HDRS= \
hypervisor_api.h \
machasi.h \
@@ -79,8 +81,6 @@ HDRS= \
machparam.h \
machsystm.h \
machthread.h \
- memtestio_ni.h \
- memtestio_v.h \
mmu.h \
niagaraasi.h \
niagararegs.h \
@@ -89,8 +89,15 @@ HDRS= \
qcn.h \
traptrace.h
+CLOSED_HDRS= \
+ memtestio_ni.h \
+ memtestio_v.h
+
ROOTHDRS= $(HDRS:%=$(USR_PSM_ISYS_DIR)/%)
+$(CLOSED_BUILD)ROOTHDRS += $(CLOSED_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
+
SUN4_ROOTHDRS= $(SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
+$(CLOSED_BUILD)SUN4_ROOTHDRS += $(CLOSED_SUN4_HDRS:%=$(USR_PSM_ISYS_DIR)/%)
ROOTDIR= $(ROOT)/usr/share/src
ROOTDIRS= $(ROOTDIR)/uts $(ROOTDIR)/uts/$(PLATFORM)
@@ -100,6 +107,9 @@ LINKDEST= ../../../../platform/$(PLATFORM)/include/sys
CHECKHDRS= $(HDRS:%.h=%.check) \
$(SUN4_HDRS:%.h=%.cmncheck)
+$(CLOSED_BUILD)CHECKHDRS += \
+ $(CLOSED_HDRS:%.h=%.check) \
+ $(CLOSED_SUN4_HDRS:%.h=%.cmncheck)
.KEEP_STATE:
@@ -120,6 +130,12 @@ $(USR_PSM_ISYS_DIR)/%: ../../sfmmu/sys/% $(USR_PSM_ISYS_DIR)
$(USR_PSM_ISYS_DIR)/%: ../../sun4/sys/% $(USR_PSM_ISYS_DIR)
$(INS.file)
+$(USR_PSM_ISYS_DIR)/%: $(CLOSED)/uts/sun4/sys/% $(USR_PSM_ISYS_DIR)
+ $(INS.file)
+
+$(USR_PSM_ISYS_DIR)/%: $(CLOSED)/uts/sun4v/sys/% $(USR_PSM_ISYS_DIR)
+ $(INS.file)
+
$(ROOTDIRS):
$(INS.dir.root.bin)
@@ -132,8 +148,12 @@ mon/%.check: mon/%.h
%.check: ../../sfmmu/sys/%.h
$(DOT_H_CHECK)
+%.check: $(CLOSED)/uts/sun4v/sys/%.h
+ $(DOT_H_CHECK)
%.cmncheck: ../../sun4/sys/%.h
$(DOT_H_CHECK)
+%.cmncheck: $(CLOSED)/uts/sun4/sys/%.h
+ $(DOT_H_CHECK)
FRC:
diff --git a/usr/src/xmod/cry_files b/usr/src/xmod/cry_files
index 22b156fa9b..141dbf9d68 100644
--- a/usr/src/xmod/cry_files
+++ b/usr/src/xmod/cry_files
@@ -52,14 +52,14 @@ usr/src/uts/intel/Makefile
usr/src/uts/sparc/Makefile
usr/src/uts/sun4u/Makefile
usr/src/uts/sun4u/excalibur/Makefile
-usr/src/uts/sun4u/chalupa/Makefile
+usr/closed/uts/sun4u/chalupa/Makefile
usr/src/uts/sun4u/cherrystone/Makefile
usr/src/uts/sun4u/daktari/Makefile
usr/src/uts/sun4u/enchilada/Makefile
-usr/src/uts/sun4u/ents/Makefile
+usr/closed/uts/sun4u/ents/Makefile
usr/src/uts/sun4u/littleneck/Makefile
-usr/src/uts/sun4u/lw2plus/Makefile
-usr/src/uts/sun4u/lw8/Makefile
+usr/closed/uts/sun4u/lw2plus/Makefile
+usr/closed/uts/sun4u/lw8/Makefile
usr/src/uts/sun4u/mpxu/Makefile
usr/src/uts/sun4u/serengeti/Makefile
usr/src/uts/sun4u/starcat/Makefile
diff --git a/usr/src/xmod/xmod_files b/usr/src/xmod/xmod_files
index f45e5a132a..d40dfece4a 100644
--- a/usr/src/xmod/xmod_files
+++ b/usr/src/xmod/xmod_files
@@ -1,86 +1,86 @@
-uts/sparc/svvs
-uts/intel/svvs
-uts/common/io/lmodb.c
-uts/common/io/lmode.c
-uts/common/io/lmodr.c
-uts/common/io/lmodt.c
-uts/common/io/lo.c
-uts/common/io/lo.conf
-uts/common/sys/lo.h
-uts/common/io/tidg.c
-uts/common/sys/tidg.h
-uts/common/io/tidg.conf
-uts/common/io/tivc.c
-uts/common/sys/tivc.h
-uts/common/io/tivc.conf
-uts/common/io/tmux.c
-uts/common/io/tmux.conf
-uts/common/sys/tmux.h
-uts/sparc/wsdrv
-uts/sun/io/wsdrv.c
-uts/sun/io/wsdrv.conf
-uts/common/io/e1000g
-uts/intel/e1000g
-uts/sparc/e1000g
-uts/common/io/nge
-uts/intel/nge
-uts/intel/io/adpu320
-uts/intel/adpu320
-uts/intel/io/lsimega
-uts/intel/lsimega
-uts/i86pc/spwr
-uts/i86pc/io/spwr
+../closed/uts/sparc/svvs
+../closed/uts/intel/svvs
+../closed/uts/common/io/lmodb.c
+../closed/uts/common/io/lmode.c
+../closed/uts/common/io/lmodr.c
+../closed/uts/common/io/lmodt.c
+../closed/uts/common/io/lo.c
+../closed/uts/common/io/lo.conf
+../closed/uts/common/sys/lo.h
+../closed/uts/common/io/tidg.c
+../closed/uts/common/sys/tidg.h
+../closed/uts/common/io/tidg.conf
+../closed/uts/common/io/tivc.c
+../closed/uts/common/sys/tivc.h
+../closed/uts/common/io/tivc.conf
+../closed/uts/common/io/tmux.c
+../closed/uts/common/io/tmux.conf
+../closed/uts/common/sys/tmux.h
+../closed/uts/sparc/wsdrv
+../closed/uts/sun/io/wsdrv.c
+../closed/uts/sun/io/wsdrv.conf
+../closed/uts/common/io/e1000g
+../closed/uts/intel/e1000g
+../closed/uts/sparc/e1000g
+../closed/uts/common/io/nge
+../closed/uts/intel/nge
+../closed/uts/intel/io/adpu320
+../closed/uts/intel/adpu320
+../closed/uts/intel/io/lsimega
+../closed/uts/intel/lsimega
+../closed/uts/i86pc/spwr
+../closed/uts/i86pc/io/spwr
cmd/openssl
cmd/ssh
common/net/wanboot
lib/libwanboot
lib/libwanbootutil
-lib/udapl/udapl_tavor
+../closed/lib/udapl/udapl_tavor
stand/lib/crypto
stand/lib/ssl
stand/lib/scrypt
stand/lib/wanboot
cmd/cmd-inet/usr.lib/wanboot
cmd/cmd-inet/usr.sbin/bootconfchk
-cmd/cmd-crypto/etc/keys
-cmd/dodatadm
-uts/sparc/tavor
-uts/intel/tavor
-uts/common/io/ib/adapters/tavor
-uts/common/sys/ib/adapters/tavor/tavor.h
-uts/common/sys/ib/adapters/tavor/tavor_agents.h
-uts/common/sys/ib/adapters/tavor/tavor_cfg.h
-uts/common/sys/ib/adapters/tavor/tavor_cmd.h
-uts/common/sys/ib/adapters/tavor/tavor_cq.h
-uts/common/sys/ib/adapters/tavor/tavor_event.h
-uts/common/sys/ib/adapters/tavor/tavor_hw.h
-uts/common/sys/ib/adapters/tavor/tavor_misc.h
-uts/common/sys/ib/adapters/tavor/tavor_mr.h
-uts/common/sys/ib/adapters/tavor/tavor_qp.h
-uts/common/sys/ib/adapters/tavor/tavor_rsrc.h
-uts/common/sys/ib/adapters/tavor/tavor_srq.h
-uts/common/sys/ib/adapters/tavor/tavor_typedef.h
-uts/common/sys/ib/adapters/tavor/tavor_umap.h
-uts/common/sys/ib/adapters/tavor/tavor_wr.h
-uts/sun4/forthdebug/tavor.fdbg
-uts/sparc/daplt
-uts/intel/daplt
-uts/common/io/ib/clients/daplt
-uts/common/sys/ib/clients/daplt
+../closed/cmd/cmd-crypto/etc/keys
+../closed/cmd/dodatadm
+../closed/uts/sparc/tavor
+../closed/uts/intel/tavor
+../closed/uts/common/io/ib/adapters/tavor
+../closed/uts/common/sys/ib/adapters/tavor/tavor.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_agents.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_cfg.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_cmd.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_cq.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_event.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_hw.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_misc.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_mr.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_qp.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_rsrc.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_srq.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_typedef.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_umap.h
+../closed/uts/common/sys/ib/adapters/tavor/tavor_wr.h
+../closed/uts/sun4/forthdebug/tavor.fdbg
+../closed/uts/sparc/daplt
+../closed/uts/intel/daplt
+../closed/uts/common/io/ib/clients/daplt
+../closed/uts/common/sys/ib/clients/daplt
common/openssl
lib/libresolv2/cylink
lib/libresolv2/dnssafe
-lib/gss_mechs/mech_dh/backend/Makefile.export
-lib/gss_mechs/mech_dh/backend/mapfile-vers-export
-lib/gss_mechs/mech_dh/dh1024/Makefile.export
-lib/gss_mechs/mech_dh/dh1024/mapfile-vers-export
-lib/gss_mechs/mech_dh/dh192/Makefile.export
-lib/gss_mechs/mech_dh/dh192/mapfile-vers-export
-lib/gss_mechs/mech_dh/dh640/Makefile.export
-lib/gss_mechs/mech_dh/dh640/mapfile-vers-export
-lib/gss_mechs/mech_dummy/Makefile.export
-lib/gss_mechs/mech_krb5/Makefile.export
-lib/gss_mechs/mech_krb5/spec/krb5_export.spec
-lib/gss_mechs/mech_spnego/Makefile.export
-lib/gss_mechs/mech_spnego/spec/export.spec
-lib/libgss/Makefile.export
+../closed/lib/gss_mechs/mech_dh/backend/Makefile.export
+../closed/lib/gss_mechs/mech_dh/backend/mapfile-vers-export
+../closed/lib/gss_mechs/mech_dh/dh1024/Makefile.export
+../closed/lib/gss_mechs/mech_dh/dh1024/mapfile-vers-export
+../closed/lib/gss_mechs/mech_dh/dh192/Makefile.export
+../closed/lib/gss_mechs/mech_dh/dh192/mapfile-vers-export
+../closed/lib/gss_mechs/mech_dh/dh640/Makefile.export
+../closed/lib/gss_mechs/mech_dh/dh640/mapfile-vers-export
+../closed/lib/gss_mechs/mech_dummy/Makefile.export
+../closed/lib/gss_mechs/mech_krb5/Makefile.export
+../closed/lib/gss_mechs/mech_krb5/spec/krb5_export.spec
+../closed/lib/gss_mechs/mech_spnego/Makefile.export
+../closed/lib/gss_mechs/mech_spnego/spec/export.spec
+../closed/lib/libgss/Makefile.export