xref: /illumos-gate/usr/src/uts/Makefile.uts (revision 3873d743)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
502e56f3fSwesolows# Common Development and Distribution License (the "License").
602e56f3fSwesolows# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
2102e56f3fSwesolows
227c478bd9Sstevel@tonic-gate#
23b83ec4edSjmcp# Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
2489b43686SBayard Bell# Copyright (c) 2011 Bayard G. Bell. All rights reserved.
2545a4b79dSSebastien Roy# Copyright (c) 2011,2017 by Delphix. All rights reserved.
26ea76c26cSAndy Stormont# Copyright (c) 2013 Andrew Stormont.  All rights reserved.
27f73e0305SHans Rosenfeld# Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
28d58ceae2SJohn Levon# Copyright 2019 Joyent, Inc.
297c478bd9Sstevel@tonic-gate#
3002e56f3fSwesolows
317c478bd9Sstevel@tonic-gate#
327c478bd9Sstevel@tonic-gate#	This Makefile contains the common targets and definitions for
337c478bd9Sstevel@tonic-gate#	all kernels. It is to be included in the Makefiles for specific
347c478bd9Sstevel@tonic-gate#	implementation architectures and processor architecture dependent
357c478bd9Sstevel@tonic-gate#	modules: i.e.: all driving kernel Makefiles.
367c478bd9Sstevel@tonic-gate#
377c478bd9Sstevel@tonic-gate#	Include global definitions:
387c478bd9Sstevel@tonic-gate#
397c478bd9Sstevel@tonic-gateinclude $(SRC)/Makefile.master
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gate#
427c478bd9Sstevel@tonic-gate#	No text domain in the kernel.
437c478bd9Sstevel@tonic-gate#
447c478bd9Sstevel@tonic-gateDTEXTDOM =
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gate#
47b6c711ccSRichard Lowe#	Keep references to $(SRC)/common relative.
487c478bd9Sstevel@tonic-gateCOMMONBASE=	$(UTSBASE)/../common
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gate#
517c478bd9Sstevel@tonic-gate#	Setup build-specific vars
527c478bd9Sstevel@tonic-gate#	To add a build type:
537c478bd9Sstevel@tonic-gate#		add name to ALL_BUILDS32 & ALL_BUILDS64
547c478bd9Sstevel@tonic-gate#		set CLASS_name and OBJ_DIR_name
557c478bd9Sstevel@tonic-gate#		add targets to Makefile.targ
567c478bd9Sstevel@tonic-gate#
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gate#
590aaef2f5SRichard Lowe#	DEF_BUILDS is for def, sischeck, and install
607c478bd9Sstevel@tonic-gate#	ALL_BUILDS is for everything else (all, clean, ...)
617c478bd9Sstevel@tonic-gate#
627c478bd9Sstevel@tonic-gate# The NOT_RELEASE_BUILD noise is to maintain compatibility with the
637c478bd9Sstevel@tonic-gate# gatekeeper's nightly build script.
647c478bd9Sstevel@tonic-gate#
65bbbed746SGordon RossDEF_BUILDS32				= obj32
667c478bd9Sstevel@tonic-gateDEF_BUILDS64				= obj64
677c478bd9Sstevel@tonic-gateDEF_BUILDSONLY64			= obj64
68bbbed746SGordon Ross$(NOT_RELEASE_BUILD)DEF_BUILDS32	= debug32
697c478bd9Sstevel@tonic-gate$(NOT_RELEASE_BUILD)DEF_BUILDS64	= debug64
707c478bd9Sstevel@tonic-gate$(NOT_RELEASE_BUILD)DEF_BUILDSONLY64	= debug64
71bbbed746SGordon RossALL_BUILDS32				= obj32 debug32
727c478bd9Sstevel@tonic-gateALL_BUILDS64				= obj64 debug64
737c478bd9Sstevel@tonic-gateALL_BUILDSONLY64			= obj64 debug64
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gate#
76bbbed746SGordon Ross#	Build class (32b or 64b)
777c478bd9Sstevel@tonic-gate#
78bbbed746SGordon RossCLASS_OBJ32	= 32
79bbbed746SGordon RossCLASS_DBG32	= 32
807c478bd9Sstevel@tonic-gateCLASS_OBJ64	= 64
817c478bd9Sstevel@tonic-gateCLASS_DBG64	= 64
827c478bd9Sstevel@tonic-gateCLASS		= $(CLASS_$(BUILD_TYPE))
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gate#
857c478bd9Sstevel@tonic-gate#	Build subdirectory
867c478bd9Sstevel@tonic-gate#
87bbbed746SGordon RossOBJS_DIR_OBJ32	= obj32
88bbbed746SGordon RossOBJS_DIR_DBG32	= debug32
897c478bd9Sstevel@tonic-gateOBJS_DIR_OBJ64	= obj64
907c478bd9Sstevel@tonic-gateOBJS_DIR_DBG64	= debug64
917c478bd9Sstevel@tonic-gateOBJS_DIR	= $(OBJS_DIR_$(BUILD_TYPE))
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gate#
947c478bd9Sstevel@tonic-gate#	Create defaults so empty rules don't
957c478bd9Sstevel@tonic-gate#	confuse make
967c478bd9Sstevel@tonic-gate#
9795cb2e31SToomas SoomeCLASS_		= 64
9895cb2e31SToomas SoomeOBJS_DIR_	= debug64
997c478bd9Sstevel@tonic-gate
1007c478bd9Sstevel@tonic-gate#
1017c478bd9Sstevel@tonic-gate#	Build tools
1027c478bd9Sstevel@tonic-gate#
1037c478bd9Sstevel@tonic-gateCC_sparc_32	= $(sparc_CC)
1047c478bd9Sstevel@tonic-gateCC_sparc_64	= $(sparcv9_CC)
1057c478bd9Sstevel@tonic-gate
1067c478bd9Sstevel@tonic-gateCC_i386_32	= $(i386_CC)
1077c478bd9Sstevel@tonic-gateCC_i386_64	= $(amd64_CC)
1087c478bd9Sstevel@tonic-gateCC_amd64_64	= $(amd64_CC)
1097c478bd9Sstevel@tonic-gate
1107c478bd9Sstevel@tonic-gateCC		= $(CC_$(MACH)_$(CLASS))
1117c478bd9Sstevel@tonic-gate
1127c478bd9Sstevel@tonic-gateAS_sparc_32	= $(sparc_AS)
1137c478bd9Sstevel@tonic-gateAS_sparc_64	= $(sparcv9_AS)
1147c478bd9Sstevel@tonic-gate
1157c478bd9Sstevel@tonic-gateAS_i386_32	= $(i386_AS)
1167c478bd9Sstevel@tonic-gateAS_i386_64	= $(amd64_AS)
1177c478bd9Sstevel@tonic-gateAS_amd64_64	= $(amd64_AS)
1187c478bd9Sstevel@tonic-gate
1197c478bd9Sstevel@tonic-gateAS		= $(AS_$(MACH)_$(CLASS))
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gateLD_sparc_32	= $(sparc_LD)
1227c478bd9Sstevel@tonic-gateLD_sparc_64	= $(sparcv9_LD)
1237c478bd9Sstevel@tonic-gate
1247c478bd9Sstevel@tonic-gateLD_i386_32	= $(i386_LD)
1257c478bd9Sstevel@tonic-gateLD_i386_64	= $(amd64_LD)
1267c478bd9Sstevel@tonic-gateLD_amd64_64	= $(amd64_LD)
1277c478bd9Sstevel@tonic-gate
1287c478bd9Sstevel@tonic-gateLD		= $(LD_$(MACH)_$(CLASS))
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gateMODEL_32	= ilp32
1317c478bd9Sstevel@tonic-gateMODEL_64	= lp64
1327c478bd9Sstevel@tonic-gateMODEL		= $(MODEL_$(CLASS))
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gate#
1357c478bd9Sstevel@tonic-gate#	Build the compile/assemble lines:
1367c478bd9Sstevel@tonic-gate#
137b6c711ccSRichard LoweEXTRA_OPTIONS		=
1387c478bd9Sstevel@tonic-gateAS_DEFS			= -D_ASM -D__STDC__=0
1397c478bd9Sstevel@tonic-gate
1404ab75253SmrjALWAYS_DEFS_32		= -D_KERNEL -D_SYSCALL32 -D_DDI_STRICT
1414ab75253SmrjALWAYS_DEFS_64		= -D_KERNEL -D_SYSCALL32 -D_SYSCALL32_IMPL -D_ELF64 \
1424ab75253Smrj			-D_DDI_STRICT
1437c478bd9Sstevel@tonic-gate#
1447c478bd9Sstevel@tonic-gate# XX64	This should be defined by the compiler!
1457c478bd9Sstevel@tonic-gate#
1467c478bd9Sstevel@tonic-gateALWAYS_DEFS_64		+= -Dsun -D__sun -D__SVR4
1477c478bd9Sstevel@tonic-gateALWAYS_DEFS		= $(ALWAYS_DEFS_$(CLASS))
1487c478bd9Sstevel@tonic-gate
1497c478bd9Sstevel@tonic-gate#
1507c478bd9Sstevel@tonic-gate#	CPPFLAGS is deliberatly set with a "=" and not a "+=".  For the kernel
1517c478bd9Sstevel@tonic-gate#	the header include path should not look for header files outside of
1527c478bd9Sstevel@tonic-gate#	the kernel code.  This "=" removes the search path built in
1537c478bd9Sstevel@tonic-gate#	Makefile.master inside CPPFLAGS.  Ditto for AS_CPPFLAGS.
1547c478bd9Sstevel@tonic-gate#
1557c478bd9Sstevel@tonic-gateCPPFLAGS	= $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS) \
1567c478bd9Sstevel@tonic-gate		   $(INCLUDE_PATH) $(EXTRA_OPTIONS)
1577c478bd9Sstevel@tonic-gateASFLAGS		+= -P
1587c478bd9Sstevel@tonic-gateAS_CPPFLAGS	= $(ALWAYS_DEFS) $(ALL_DEFS) $(CONFIG_DEFS) $(AS_DEFS) \
1597c478bd9Sstevel@tonic-gate		   $(AS_INC_PATH) $(EXTRA_OPTIONS)
1607c478bd9Sstevel@tonic-gate
1617c478bd9Sstevel@tonic-gate#
1627c478bd9Sstevel@tonic-gate#	Make it (relatively) easy to share compilation options between
1637c478bd9Sstevel@tonic-gate#	all kernel implementations.
1647c478bd9Sstevel@tonic-gate#
1657c478bd9Sstevel@tonic-gate
166f56c1286Srobinson# Override the default, the kernel is squeaky clean
167f56c1286SrobinsonCERRWARN = -errtags=yes -errwarn=%all
168f56c1286Srobinson
1697014882cSRichard LoweCERRWARN += -_gcc=-Wno-missing-braces
1707014882cSRichard LoweCERRWARN += -_gcc=-Wno-sign-compare
1717014882cSRichard LoweCERRWARN += -_gcc=-Wno-unknown-pragmas
1727014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-parameter
1737014882cSRichard LoweCERRWARN += -_gcc=-Wno-missing-field-initializers
1747014882cSRichard Lowe
175*3873d743SRichard LoweCNOWARN_UNINIT = -_gcc=-Wno-maybe-uninitialized
176d3b5f563SJohn Levon
1777014882cSRichard Lowe# DEBUG v. -nd make for frequent unused variables, empty conditions, etc. in
1787014882cSRichard Lowe# -nd builds
1797014882cSRichard Lowe$(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused
1807014882cSRichard Lowe$(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-empty-body
1817014882cSRichard Lowe
1821f5207b7SJohn LevonCERRWARN += -_smatch=-p=illumos_kernel
1831f5207b7SJohn Levoninclude $(SRC)/Makefile.smatch
1841f5207b7SJohn Levon
1851f5207b7SJohn Levon#
1861f5207b7SJohn Levon# Unfortunately, _IOWR() is regularly used with a third argument of 0,
1871f5207b7SJohn Levon# so we have to disable all these smatch checks.
1881f5207b7SJohn Levon#
1891f5207b7SJohn LevonSMOFF += sizeof
1901f5207b7SJohn Levon
191d58ceae2SJohn Levon#
192d58ceae2SJohn Levon# Ensure that the standard function prologue remains at the very start
193d58ceae2SJohn Levon# of a function, so DTrace fbt will instrument the right place.
194d58ceae2SJohn Levon#
195*3873d743SRichard LoweCFLAGS_uts_i386 += -_gcc=-fno-shrink-wrap
19665f20420SRobert Mustacchi#
19765f20420SRobert Mustacchi# retpoline support
19865f20420SRobert Mustacchi#
199*3873d743SRichard LoweCFLAGS_uts_i386 += -_gcc=-mindirect-branch=thunk-extern
200*3873d743SRichard LoweCFLAGS_uts_i386 += -_gcc=-mindirect-branch-register
20165f20420SRobert Mustacchi
202bd0ce624SYuri PankovCSTD = $(CSTD_GNU99)
203ae115bc7Smrj
2047c478bd9Sstevel@tonic-gateCFLAGS_uts		=
2057c478bd9Sstevel@tonic-gateCFLAGS_uts		+= $(STAND_FLAGS_$(CLASS))
2067c478bd9Sstevel@tonic-gateCFLAGS_uts		+= $(CCVERBOSE)
2077c478bd9Sstevel@tonic-gateCFLAGS_uts		+= $(ILDOFF)
2087c478bd9Sstevel@tonic-gateCFLAGS_uts		+= $(XAOPT)
2092d4be7aaSRichard LoweCFLAGS_uts		+= $(CTF_FLAGS_$(CLASS))
2107c478bd9Sstevel@tonic-gateCFLAGS_uts		+= $(CERRWARN)
2116a3e8e86SRichard LoweCFLAGS_uts		+= $(CCNOAUTOINLINE)
212b6c711ccSRichard LoweCFLAGS_uts		+= $(CCNOREORDER)
21392c1a611SBryan CantrillCFLAGS_uts		+= $(CCNOAGGRESSIVELOOPS)
21496ccc8cbSesaxeCFLAGS_uts		+= $(CGLOBALSTATIC)
2157c478bd9Sstevel@tonic-gateCFLAGS_uts		+= $(EXTRA_CFLAGS)
216d69cdb36SRichard LoweCFLAGS_uts		+= $(CSOURCEDEBUGFLAGS)
217d69cdb36SRichard LoweCFLAGS_uts		+= $(CUSERFLAGS)
218d58ceae2SJohn LevonCFLAGS_uts		+= $(CFLAGS_uts_$(MACH))
2199b9e3196SRichard LoweCFLAGS_uts		+= -_gcc=-fno-asynchronous-unwind-tables
2207c478bd9Sstevel@tonic-gate
2217c478bd9Sstevel@tonic-gate#
2220aaef2f5SRichard Lowe#	Declare that $(OBJECTS) can be compiled in parallel.  The DUMMY target
2230aaef2f5SRichard Lowe#	is for those instances where OBJECTS is empty (to avoid an
2240aaef2f5SRichard Lowe#	unconditional .PARALLEL).
2250aaef2f5SRichard Lowe.PARALLEL:	$(OBJECTS) DUMMY
2267c478bd9Sstevel@tonic-gate
2277c478bd9Sstevel@tonic-gate#
2287c478bd9Sstevel@tonic-gate#	Expanded dependencies
2297c478bd9Sstevel@tonic-gate#
2307c478bd9Sstevel@tonic-gateDEF_DEPS	= $(DEF_BUILDS:%=def.%)
2317c478bd9Sstevel@tonic-gateALL_DEPS	= $(ALL_BUILDS:%=all.%)
2327c478bd9Sstevel@tonic-gateCLEAN_DEPS	= $(ALL_BUILDS:%=clean.%)
2337c478bd9Sstevel@tonic-gateCLOBBER_DEPS	= $(ALL_BUILDS:%=clobber.%)
234fb9f9b97SkupferMODLIST_DEPS	= $(DEF_BUILDS:%=modlist.%)
2357c478bd9Sstevel@tonic-gateINSTALL_DEPS	= $(DEF_BUILDS:%=install.%)
2367c478bd9Sstevel@tonic-gateSYM_DEPS	= $(SYM_BUILDS:%=symcheck.%)
237112f9fc1SyzSISCHECK_DEPS	= $(DEF_BUILDS:%=sischeck.%)
238112f9fc1SyzSISCLEAN_DEPS	= $(ALL_BUILDS:%=sisclean.%)
2397c478bd9Sstevel@tonic-gate
2407c478bd9Sstevel@tonic-gate#
2417c478bd9Sstevel@tonic-gate#	Default module name
2427c478bd9Sstevel@tonic-gate#
2437c478bd9Sstevel@tonic-gateBINARY		= $(OBJS_DIR)/$(MODULE)
2447c478bd9Sstevel@tonic-gate
2457c478bd9Sstevel@tonic-gate#
2467c478bd9Sstevel@tonic-gate#	Default cleanup definitions
2477c478bd9Sstevel@tonic-gate#
2480aaef2f5SRichard LoweCLEANFILES	= $(OBJECTS)
2497c478bd9Sstevel@tonic-gateCLOBBERFILES	= $(BINARY) $(CLEANFILES)
2507c478bd9Sstevel@tonic-gate
2517c478bd9Sstevel@tonic-gate#
2527c478bd9Sstevel@tonic-gate#	Installation constants:
2537c478bd9Sstevel@tonic-gate#
2547c478bd9Sstevel@tonic-gate#		FILEMODE is the mode given to the kernel modules
2557c478bd9Sstevel@tonic-gate#		CFILEMODE is the mode given to the '.conf' files
2567c478bd9Sstevel@tonic-gate#
2577c478bd9Sstevel@tonic-gateFILEMODE	 = 755
2587c478bd9Sstevel@tonic-gateDIRMODE		 = 755
2597c478bd9Sstevel@tonic-gateCFILEMODE	 = 644
2607c478bd9Sstevel@tonic-gate
2617c478bd9Sstevel@tonic-gate#
2627c478bd9Sstevel@tonic-gate#	Special Installation Macros for the installation of '.conf' files.
2637c478bd9Sstevel@tonic-gate#
2647c478bd9Sstevel@tonic-gate#	These are unique because they are not installed from the current
2657c478bd9Sstevel@tonic-gate#	working directory.
2667c478bd9Sstevel@tonic-gate#
2677c478bd9Sstevel@tonic-gate# Sigh.  Apparently at some time in the past there was a confusion on
2687c478bd9Sstevel@tonic-gate# whether the name is SRC_CONFFILE or SRC_CONFILE.  Consistency with the
2697c478bd9Sstevel@tonic-gate# other names would indicate SRC_CONFFILE, but the voting is >180 Makefiles
2707c478bd9Sstevel@tonic-gate# with SRC_CONFILE and about 11 with SRC_CONFFILE.  Software development
2717c478bd9Sstevel@tonic-gate# isn't a popularity contest, though, and so my inclination is to define
2727c478bd9Sstevel@tonic-gate# both names for now and incrementally convert to SRC_CONFFILE to be consistent
2737c478bd9Sstevel@tonic-gate# with the other names.
2747c478bd9Sstevel@tonic-gate#
2757c478bd9Sstevel@tonic-gateCONFFILE		= $(MODULE).conf
2767c478bd9Sstevel@tonic-gateSRC_CONFFILE		= $(CONF_SRCDIR)/$(CONFFILE)
2777c478bd9Sstevel@tonic-gateSRC_CONFILE		= $(SRC_CONFFILE)
2787c478bd9Sstevel@tonic-gateROOT_CONFFILE_32	= $(ROOTMODULE).conf
2797c478bd9Sstevel@tonic-gateROOT_CONFFILE_64	= $(ROOTMODULE:%/$(SUBDIR64)/$(MODULE)=%/$(MODULE)).conf
2807c478bd9Sstevel@tonic-gateROOT_CONFFILE		= $(ROOT_CONFFILE_$(CLASS))
2817c478bd9Sstevel@tonic-gate
2827c478bd9Sstevel@tonic-gate
2837c478bd9Sstevel@tonic-gateINS.conffile= \
2847c478bd9Sstevel@tonic-gate	$(RM) $@; $(INS) -s -m $(CFILEMODE) -f $(@D) $(SRC_CONFFILE)
28544961713Sgirish
28606abc743SJohn Levon#
28706abc743SJohn Levon# By default, instead of $VERSION, we use $(UTS_LABEL), which is by
28806abc743SJohn Levon# default set to $RELEASE aka "5.11".
28906abc743SJohn Levon#
29006abc743SJohn Levon# $VERSION changes when the git HEAD changes, leading to annoying merge
29106abc743SJohn Levon# uniquification conflicts when doing partial builds during development.
29206abc743SJohn Levon# The information from $VERSION is available via "buildversion" anyway.
29306abc743SJohn Levon#
29406abc743SJohn LevonCTFCVTFLAGS = -X -l "$(UTS_LABEL)"
29506abc743SJohn LevonCTFMRGFLAGS += -l "$(UTS_LABEL)"
29606abc743SJohn Levon
2977c478bd9Sstevel@tonic-gate#
2987c478bd9Sstevel@tonic-gate# The CTF merge of child kernel modules is performed against one of the genunix
2997c478bd9Sstevel@tonic-gate# modules.  For Intel builds, all modules will be used with a single genunix:
3007c478bd9Sstevel@tonic-gate# the one built in intel/genunix.  For SPARC builds, a given
3017c478bd9Sstevel@tonic-gate# module may be
3027c478bd9Sstevel@tonic-gate# used with one of a number of genunix files, depending on what platform the
3037c478bd9Sstevel@tonic-gate# module is deployed on.  We merge against the sun4u genunix to optimize for
3047c478bd9Sstevel@tonic-gate# the common case.  We also merge against the ip driver since networking is
3057c478bd9Sstevel@tonic-gate# typically loaded and types defined therein are shared between many modules.
3067c478bd9Sstevel@tonic-gate#
3077c478bd9Sstevel@tonic-gateCTFMERGE_GUDIR_sparc	= sun4u
3087c478bd9Sstevel@tonic-gateCTFMERGE_GUDIR_i386	= intel
3097c478bd9Sstevel@tonic-gateCTFMERGE_GUDIR		= $(CTFMERGE_GUDIR_$(MACH))
3107c478bd9Sstevel@tonic-gate
311b6c711ccSRichard LoweCTFMERGE_GENUNIX	= \
3127c478bd9Sstevel@tonic-gate	$(UTSBASE)/$(CTFMERGE_GUDIR)/genunix/$(OBJS_DIR)/genunix
3137c478bd9Sstevel@tonic-gate
3147c478bd9Sstevel@tonic-gate#
31506abc743SJohn Levon# Used to uniquify a non-genunix module against genunix.
3167c478bd9Sstevel@tonic-gate#
317b1e09399SJonathan Adams# For the ease of developers dropping modules onto possibly unrelated systems,
31819b94df9SMatthew Ahrens# you can set NO_GENUNIX_UNIQUIFY= in the environment to skip uniquifying
31919b94df9SMatthew Ahrens# against genunix.
320b1e09399SJonathan Adams#
32106abc743SJohn Levon#
322b1e09399SJonathan AdamsNO_GENUNIX_UNIQUIFY=$(POUND_SIGN)
323105958d7SGarrett D'AmoreCTFMERGE_GENUNIX_DFLAG=-d $(CTFMERGE_GENUNIX)
32401934956SMatt Ahrens$(NO_GENUNIX_UNIQUIFY)CTFMERGE_GENUNIX_DFLAG=
325b1e09399SJonathan Adams
32606abc743SJohn LevonCTFMERGE_UNIQUIFY_AGAINST_GENUNIX = \
32706abc743SJohn Levon	$(CTFMERGE) $(CTFMRGFLAGS) $(CTFMERGE_GENUNIX_DFLAG) \
32806abc743SJohn Levon	-o $@ $(OBJECTS) $(CTFEXTRAOBJS)
329105958d7SGarrett D'Amore
330105958d7SGarrett D'Amore#
331105958d7SGarrett D'Amore# Used to merge the genunix module.
3327c478bd9Sstevel@tonic-gate#
33306abc743SJohn LevonCTFMERGE_GENUNIX_MERGE = \
33406abc743SJohn Levon	$(CTFMERGE) $(CTFMRGFLAGS) -o $@ \
335105958d7SGarrett D'Amore	$(OBJECTS) $(CTFEXTRAOBJS) $(IPCTF_TARGET)
3367c478bd9Sstevel@tonic-gate
3377c478bd9Sstevel@tonic-gate#
3387c478bd9Sstevel@tonic-gate# We ctfmerge the ip objects into genunix to maximize the number of common types
3397c478bd9Sstevel@tonic-gate# found there, thus maximizing the effectiveness of uniquification.  We don't
3407c478bd9Sstevel@tonic-gate# want the genunix build to have to know about the individual ip objects, so we
3417c478bd9Sstevel@tonic-gate# put them in an archive.  The genunix ctfmerge then includes this archive.
3427c478bd9Sstevel@tonic-gate#
343ae115bc7SmrjIPCTF		= $(IPDRV_DIR)/$(OBJS_DIR)/ipctf.a
3447c478bd9Sstevel@tonic-gate
34502e56f3fSwesolows#
34602e56f3fSwesolows# Rule for building fake shared libraries used for symbol resolution
34702e56f3fSwesolows# when building other modules.  -znoreloc is needed here to avoid
34802e56f3fSwesolows# tripping over code that isn't really suitable for shared libraries.
34902e56f3fSwesolows#
35002e56f3fSwesolowsBUILD.SO		= \
35102e56f3fSwesolows	$(LD) -o $@ $(GSHARED) $(ZNORELOC) -h $(SONAME)
35202e56f3fSwesolows
35302e56f3fSwesolows#
35402e56f3fSwesolows# SONAME defaults for common fake shared libraries.
35502e56f3fSwesolows#
35602e56f3fSwesolows$(LIBGEN)		:= SONAME = $(MODULE)
35702e56f3fSwesolows$(PLATLIB)		:= SONAME = misc/platmod
35802e56f3fSwesolows$(CPULIB)		:= SONAME = 'cpu/$$CPU'
35902e56f3fSwesolows$(DTRACESTUBS)		:= SONAME = dtracestubs
36002e56f3fSwesolows
3617c478bd9Sstevel@tonic-gate#
3627c478bd9Sstevel@tonic-gate#	Installation directories
3637c478bd9Sstevel@tonic-gate#
3647c478bd9Sstevel@tonic-gate
3657c478bd9Sstevel@tonic-gate#
3667c478bd9Sstevel@tonic-gate#	For now, 64b modules install into a subdirectory
3677c478bd9Sstevel@tonic-gate#	of their 32b brethren.
3687c478bd9Sstevel@tonic-gate#
3697c478bd9Sstevel@tonic-gateSUBDIR64_sparc		= sparcv9
3707c478bd9Sstevel@tonic-gateSUBDIR64_i386		= amd64
3717c478bd9Sstevel@tonic-gateSUBDIR64		= $(SUBDIR64_$(MACH))
3727c478bd9Sstevel@tonic-gate
3737c478bd9Sstevel@tonic-gateROOT_MOD_DIR		= $(ROOT)/kernel
3747c478bd9Sstevel@tonic-gate
3757c478bd9Sstevel@tonic-gateROOT_KERN_DIR_32	= $(ROOT_MOD_DIR)
3769acbbeafSnnROOT_BRAND_DIR_32	= $(ROOT_MOD_DIR)/brand
3777c478bd9Sstevel@tonic-gateROOT_DRV_DIR_32		= $(ROOT_MOD_DIR)/drv
3787c478bd9Sstevel@tonic-gateROOT_DTRACE_DIR_32	= $(ROOT_MOD_DIR)/dtrace
3797c478bd9Sstevel@tonic-gateROOT_EXEC_DIR_32	= $(ROOT_MOD_DIR)/exec
3807c478bd9Sstevel@tonic-gateROOT_FS_DIR_32		= $(ROOT_MOD_DIR)/fs
3817c478bd9Sstevel@tonic-gateROOT_SCHED_DIR_32	= $(ROOT_MOD_DIR)/sched
3820f1702c5SYu XiangningROOT_SOCK_DIR_32	= $(ROOT_MOD_DIR)/socketmod
3837c478bd9Sstevel@tonic-gateROOT_STRMOD_DIR_32	= $(ROOT_MOD_DIR)/strmod
3847c478bd9Sstevel@tonic-gateROOT_IPP_DIR_32		= $(ROOT_MOD_DIR)/ipp
3857c478bd9Sstevel@tonic-gateROOT_SYS_DIR_32		= $(ROOT_MOD_DIR)/sys
3867c478bd9Sstevel@tonic-gateROOT_MISC_DIR_32	= $(ROOT_MOD_DIR)/misc
3877c478bd9Sstevel@tonic-gateROOT_KGSS_DIR_32	= $(ROOT_MOD_DIR)/misc/kgss
3881e1ddd6cScthROOT_SCSI_VHCI_DIR_32	= $(ROOT_MOD_DIR)/misc/scsi_vhci
3892fd415f4SDavid HollisterROOT_PMCS_FW_DIR_32	= $(ROOT_MOD_DIR)/misc/pmcs
390fcf3ce44SJohn ForteROOT_QLC_FW_DIR_32	= $(ROOT_MOD_DIR)/misc/qlc
391291a2b48SSukumar SwaminathanROOT_EMLXS_FW_DIR_32	= $(ROOT_MOD_DIR)/misc/emlxs
3927c478bd9Sstevel@tonic-gateROOT_NLMISC_DIR_32	= $(ROOT_MOD_DIR)/misc
3937c478bd9Sstevel@tonic-gateROOT_MACH_DIR_32	= $(ROOT_MOD_DIR)/mach
3947c478bd9Sstevel@tonic-gateROOT_CPU_DIR_32		= $(ROOT_MOD_DIR)/cpu
3957c478bd9Sstevel@tonic-gateROOT_TOD_DIR_32		= $(ROOT_MOD_DIR)/tod
3967c478bd9Sstevel@tonic-gateROOT_FONT_DIR_32	= $(ROOT_MOD_DIR)/fonts
3977c478bd9Sstevel@tonic-gateROOT_DACF_DIR_32	= $(ROOT_MOD_DIR)/dacf
3987c478bd9Sstevel@tonic-gateROOT_CRYPTO_DIR_32	= $(ROOT_MOD_DIR)/crypto
399ba2e4443SsebROOT_MAC_DIR_32		= $(ROOT_MOD_DIR)/mac
40045a4b79dSSebastien RoyROOT_CC_DIR_32		= $(ROOT_MOD_DIR)/cc
401d14d7d31SisROOT_KICONV_DIR_32	= $(ROOT_MOD_DIR)/kiconv
4027c478bd9Sstevel@tonic-gate
4037c478bd9Sstevel@tonic-gateROOT_KERN_DIR_64	= $(ROOT_MOD_DIR)/$(SUBDIR64)
4049acbbeafSnnROOT_BRAND_DIR_64	= $(ROOT_MOD_DIR)/brand/$(SUBDIR64)
4057c478bd9Sstevel@tonic-gateROOT_DRV_DIR_64		= $(ROOT_MOD_DIR)/drv/$(SUBDIR64)
4067c478bd9Sstevel@tonic-gateROOT_DTRACE_DIR_64	= $(ROOT_MOD_DIR)/dtrace/$(SUBDIR64)
4077c478bd9Sstevel@tonic-gateROOT_EXEC_DIR_64	= $(ROOT_MOD_DIR)/exec/$(SUBDIR64)
4087c478bd9Sstevel@tonic-gateROOT_FS_DIR_64		= $(ROOT_MOD_DIR)/fs/$(SUBDIR64)
4097c478bd9Sstevel@tonic-gateROOT_SCHED_DIR_64	= $(ROOT_MOD_DIR)/sched/$(SUBDIR64)
4100f1702c5SYu XiangningROOT_SOCK_DIR_64	= $(ROOT_MOD_DIR)/socketmod/$(SUBDIR64)
4117c478bd9Sstevel@tonic-gateROOT_STRMOD_DIR_64	= $(ROOT_MOD_DIR)/strmod/$(SUBDIR64)
4127c478bd9Sstevel@tonic-gateROOT_IPP_DIR_64		= $(ROOT_MOD_DIR)/ipp/$(SUBDIR64)
4137c478bd9Sstevel@tonic-gateROOT_SYS_DIR_64		= $(ROOT_MOD_DIR)/sys/$(SUBDIR64)
4147c478bd9Sstevel@tonic-gateROOT_MISC_DIR_64	= $(ROOT_MOD_DIR)/misc/$(SUBDIR64)
4157c478bd9Sstevel@tonic-gateROOT_KGSS_DIR_64	= $(ROOT_MOD_DIR)/misc/kgss/$(SUBDIR64)
4161e1ddd6cScthROOT_SCSI_VHCI_DIR_64	= $(ROOT_MOD_DIR)/misc/scsi_vhci/$(SUBDIR64)
4172fd415f4SDavid HollisterROOT_PMCS_FW_DIR_64	= $(ROOT_MOD_DIR)/misc/pmcs/$(SUBDIR64)
418fcf3ce44SJohn ForteROOT_QLC_FW_DIR_64	= $(ROOT_MOD_DIR)/misc/qlc/$(SUBDIR64)
419291a2b48SSukumar SwaminathanROOT_EMLXS_FW_DIR_64	= $(ROOT_MOD_DIR)/misc/emlxs/$(SUBDIR64)
4207c478bd9Sstevel@tonic-gateROOT_NLMISC_DIR_64	= $(ROOT_MOD_DIR)/misc/$(SUBDIR64)
4217c478bd9Sstevel@tonic-gateROOT_MACH_DIR_64	= $(ROOT_MOD_DIR)/mach/$(SUBDIR64)
4227c478bd9Sstevel@tonic-gateROOT_CPU_DIR_64		= $(ROOT_MOD_DIR)/cpu/$(SUBDIR64)
4237c478bd9Sstevel@tonic-gateROOT_TOD_DIR_64		= $(ROOT_MOD_DIR)/tod/$(SUBDIR64)
4247c478bd9Sstevel@tonic-gateROOT_FONT_DIR_64	= $(ROOT_MOD_DIR)/fonts/$(SUBDIR64)
4257c478bd9Sstevel@tonic-gateROOT_DACF_DIR_64	= $(ROOT_MOD_DIR)/dacf/$(SUBDIR64)
4267c478bd9Sstevel@tonic-gateROOT_CRYPTO_DIR_64	= $(ROOT_MOD_DIR)/crypto/$(SUBDIR64)
427ba2e4443SsebROOT_MAC_DIR_64		= $(ROOT_MOD_DIR)/mac/$(SUBDIR64)
42845a4b79dSSebastien RoyROOT_CC_DIR_64		= $(ROOT_MOD_DIR)/cc/$(SUBDIR64)
429d14d7d31SisROOT_KICONV_DIR_64	= $(ROOT_MOD_DIR)/kiconv/$(SUBDIR64)
4307c478bd9Sstevel@tonic-gate
4317c478bd9Sstevel@tonic-gateROOT_KERN_DIR		= $(ROOT_KERN_DIR_$(CLASS))
4329acbbeafSnnROOT_BRAND_DIR		= $(ROOT_BRAND_DIR_$(CLASS))
4337c478bd9Sstevel@tonic-gateROOT_DRV_DIR		= $(ROOT_DRV_DIR_$(CLASS))
4347c478bd9Sstevel@tonic-gateROOT_DTRACE_DIR		= $(ROOT_DTRACE_DIR_$(CLASS))
4357c478bd9Sstevel@tonic-gateROOT_EXEC_DIR		= $(ROOT_EXEC_DIR_$(CLASS))
4367c478bd9Sstevel@tonic-gateROOT_FS_DIR		= $(ROOT_FS_DIR_$(CLASS))
4377c478bd9Sstevel@tonic-gateROOT_SCHED_DIR		= $(ROOT_SCHED_DIR_$(CLASS))
4380f1702c5SYu XiangningROOT_SOCK_DIR		= $(ROOT_SOCK_DIR_$(CLASS))
4397c478bd9Sstevel@tonic-gateROOT_STRMOD_DIR		= $(ROOT_STRMOD_DIR_$(CLASS))
4407c478bd9Sstevel@tonic-gateROOT_IPP_DIR		= $(ROOT_IPP_DIR_$(CLASS))
4417c478bd9Sstevel@tonic-gateROOT_SYS_DIR		= $(ROOT_SYS_DIR_$(CLASS))
4427c478bd9Sstevel@tonic-gateROOT_MISC_DIR		= $(ROOT_MISC_DIR_$(CLASS))
4437c478bd9Sstevel@tonic-gateROOT_KGSS_DIR		= $(ROOT_KGSS_DIR_$(CLASS))
4441e1ddd6cScthROOT_SCSI_VHCI_DIR	= $(ROOT_SCSI_VHCI_DIR_$(CLASS))
4452fd415f4SDavid HollisterROOT_PMCS_FW_DIR	= $(ROOT_PMCS_FW_DIR_$(CLASS))
446fcf3ce44SJohn ForteROOT_QLC_FW_DIR		= $(ROOT_QLC_FW_DIR_$(CLASS))
447291a2b48SSukumar SwaminathanROOT_EMLXS_FW_DIR	= $(ROOT_EMLXS_FW_DIR_$(CLASS))
4487c478bd9Sstevel@tonic-gateROOT_NLMISC_DIR		= $(ROOT_NLMISC_DIR_$(CLASS))
4497c478bd9Sstevel@tonic-gateROOT_MACH_DIR		= $(ROOT_MACH_DIR_$(CLASS))
4507c478bd9Sstevel@tonic-gateROOT_CPU_DIR		= $(ROOT_CPU_DIR_$(CLASS))
4517c478bd9Sstevel@tonic-gateROOT_TOD_DIR		= $(ROOT_TOD_DIR_$(CLASS))
4527c478bd9Sstevel@tonic-gateROOT_FONT_DIR		= $(ROOT_FONT_DIR_$(CLASS))
4537c478bd9Sstevel@tonic-gateROOT_DACF_DIR		= $(ROOT_DACF_DIR_$(CLASS))
4547c478bd9Sstevel@tonic-gateROOT_CRYPTO_DIR		= $(ROOT_CRYPTO_DIR_$(CLASS))
455ba2e4443SsebROOT_MAC_DIR		= $(ROOT_MAC_DIR_$(CLASS))
45645a4b79dSSebastien RoyROOT_CC_DIR		= $(ROOT_CC_DIR_$(CLASS))
457d14d7d31SisROOT_KICONV_DIR		= $(ROOT_KICONV_DIR_$(CLASS))
458f73e0305SHans RosenfeldROOT_FIRMWARE_DIR	= $(ROOT_MOD_DIR)/firmware
4597c478bd9Sstevel@tonic-gate
4609acbbeafSnnROOT_MOD_DIRS_32	= $(ROOT_BRAND_DIR_32) $(ROOT_DRV_DIR_32)
4619acbbeafSnnROOT_MOD_DIRS_32	= $(ROOT_BRAND_DIR_32) $(ROOT_DRV_DIR_32)
4629acbbeafSnnROOT_MOD_DIRS_32	+= $(ROOT_EXEC_DIR_32) $(ROOT_DTRACE_DIR_32)
4637c478bd9Sstevel@tonic-gateROOT_MOD_DIRS_32	+= $(ROOT_FS_DIR_32) $(ROOT_SCHED_DIR_32)
4647c478bd9Sstevel@tonic-gateROOT_MOD_DIRS_32	+= $(ROOT_STRMOD_DIR_32) $(ROOT_SYS_DIR_32)
4650f1702c5SYu XiangningROOT_MOD_DIRS_32	+= $(ROOT_IPP_DIR_32) $(ROOT_SOCK_DIR_32)
4667c478bd9Sstevel@tonic-gateROOT_MOD_DIRS_32	+= $(ROOT_MISC_DIR_32) $(ROOT_MACH_DIR_32)
4677c478bd9Sstevel@tonic-gateROOT_MOD_DIRS_32	+= $(ROOT_KGSS_DIR_32)
4681e1ddd6cScthROOT_MOD_DIRS_32	+= $(ROOT_SCSI_VHCI_DIR_32)
4692fd415f4SDavid HollisterROOT_MOD_DIRS_32	+= $(ROOT_PMCS_FW_DIR_32)
470fcf3ce44SJohn ForteROOT_MOD_DIRS_32        += $(ROOT_QLC_FW_DIR_32)
471291a2b48SSukumar SwaminathanROOT_MOD_DIRS_32        += $(ROOT_EMLXS_FW_DIR_32)
4727c478bd9Sstevel@tonic-gateROOT_MOD_DIRS_32	+= $(ROOT_CPU_DIR_32) $(ROOT_FONT_DIR_32)
4737c478bd9Sstevel@tonic-gateROOT_MOD_DIRS_32	+= $(ROOT_TOD_DIR_32) $(ROOT_DACF_DIR_32)
474ba2e4443SsebROOT_MOD_DIRS_32	+= $(ROOT_CRYPTO_DIR_32) $(ROOT_MAC_DIR_32)
47545a4b79dSSebastien RoyROOT_MOD_DIRS_32	+= $(ROOT_CC_DIR_32)
4763c5e027bSEric TaylorROOT_MOD_DIRS_32	+= $(ROOT_KICONV_DIR_32)
477f73e0305SHans RosenfeldROOT_MOD_DIRS_32	+= $(ROOT_FIRMWARE_DIR)
4787c478bd9Sstevel@tonic-gate
4797c478bd9Sstevel@tonic-gateUSR_MOD_DIR		= $(ROOT)/usr/kernel
4807c478bd9Sstevel@tonic-gate
4817c478bd9Sstevel@tonic-gateUSR_DRV_DIR_32		= $(USR_MOD_DIR)/drv
4827c478bd9Sstevel@tonic-gateUSR_EXEC_DIR_32		= $(USR_MOD_DIR)/exec
4837c478bd9Sstevel@tonic-gateUSR_FS_DIR_32		= $(USR_MOD_DIR)/fs
4847c478bd9Sstevel@tonic-gateUSR_SCHED_DIR_32	= $(USR_MOD_DIR)/sched
4850f1702c5SYu XiangningUSR_SOCK_DIR_32		= $(USR_MOD_DIR)/socketmod
4867c478bd9Sstevel@tonic-gateUSR_STRMOD_DIR_32	= $(USR_MOD_DIR)/strmod
4877c478bd9Sstevel@tonic-gateUSR_SYS_DIR_32		= $(USR_MOD_DIR)/sys
4887c478bd9Sstevel@tonic-gateUSR_MISC_DIR_32		= $(USR_MOD_DIR)/misc
4897c478bd9Sstevel@tonic-gateUSR_DACF_DIR_32		= $(USR_MOD_DIR)/dacf
4907c478bd9Sstevel@tonic-gateUSR_PCBE_DIR_32		= $(USR_MOD_DIR)/pcbe
4919a9ae70fSjvUSR_DTRACE_DIR_32	= $(USR_MOD_DIR)/dtrace
4929a9ae70fSjvUSR_BRAND_DIR_32	= $(USR_MOD_DIR)/brand
4937c478bd9Sstevel@tonic-gate
4947c478bd9Sstevel@tonic-gateUSR_DRV_DIR_64		= $(USR_MOD_DIR)/drv/$(SUBDIR64)
4957c478bd9Sstevel@tonic-gateUSR_EXEC_DIR_64		= $(USR_MOD_DIR)/exec/$(SUBDIR64)
4967c478bd9Sstevel@tonic-gateUSR_FS_DIR_64		= $(USR_MOD_DIR)/fs/$(SUBDIR64)
4977c478bd9Sstevel@tonic-gateUSR_SCHED_DIR_64	= $(USR_MOD_DIR)/sched/$(SUBDIR64)
4980f1702c5SYu XiangningUSR_SOCK_DIR_64		= $(USR_MOD_DIR)/socketmod/$(SUBDIR64)
4997c478bd9Sstevel@tonic-gateUSR_STRMOD_DIR_64	= $(USR_MOD_DIR)/strmod/$(SUBDIR64)
5007c478bd9Sstevel@tonic-gateUSR_SYS_DIR_64		= $(USR_MOD_DIR)/sys/$(SUBDIR64)
5017c478bd9Sstevel@tonic-gateUSR_MISC_DIR_64		= $(USR_MOD_DIR)/misc/$(SUBDIR64)
5027c478bd9Sstevel@tonic-gateUSR_DACF_DIR_64		= $(USR_MOD_DIR)/dacf/$(SUBDIR64)
5037c478bd9Sstevel@tonic-gateUSR_PCBE_DIR_64		= $(USR_MOD_DIR)/pcbe/$(SUBDIR64)
5049a9ae70fSjvUSR_DTRACE_DIR_64	= $(USR_MOD_DIR)/dtrace/$(SUBDIR64)
5059a9ae70fSjvUSR_BRAND_DIR_64	= $(USR_MOD_DIR)/brand/$(SUBDIR64)
5067c478bd9Sstevel@tonic-gate
5077c478bd9Sstevel@tonic-gateUSR_DRV_DIR		= $(USR_DRV_DIR_$(CLASS))
5087c478bd9Sstevel@tonic-gateUSR_EXEC_DIR		= $(USR_EXEC_DIR_$(CLASS))
5097c478bd9Sstevel@tonic-gateUSR_FS_DIR		= $(USR_FS_DIR_$(CLASS))
5107c478bd9Sstevel@tonic-gateUSR_SCHED_DIR		= $(USR_SCHED_DIR_$(CLASS))
5110f1702c5SYu XiangningUSR_SOCK_DIR		= $(USR_SOCK_DIR_$(CLASS))
5127c478bd9Sstevel@tonic-gateUSR_STRMOD_DIR		= $(USR_STRMOD_DIR_$(CLASS))
5137c478bd9Sstevel@tonic-gateUSR_SYS_DIR		= $(USR_SYS_DIR_$(CLASS))
5147c478bd9Sstevel@tonic-gateUSR_MISC_DIR		= $(USR_MISC_DIR_$(CLASS))
5157c478bd9Sstevel@tonic-gateUSR_DACF_DIR		= $(USR_DACF_DIR_$(CLASS))
5167c478bd9Sstevel@tonic-gateUSR_PCBE_DIR		= $(USR_PCBE_DIR_$(CLASS))
5179a9ae70fSjvUSR_DTRACE_DIR		= $(USR_DTRACE_DIR_$(CLASS))
5189a9ae70fSjvUSR_BRAND_DIR		= $(USR_BRAND_DIR_$(CLASS))
5197c478bd9Sstevel@tonic-gate
5207c478bd9Sstevel@tonic-gateUSR_MOD_DIRS_32		= $(USR_DRV_DIR_32) $(USR_EXEC_DIR_32)
5217c478bd9Sstevel@tonic-gateUSR_MOD_DIRS_32		+= $(USR_FS_DIR_32) $(USR_SCHED_DIR_32)
5227c478bd9Sstevel@tonic-gateUSR_MOD_DIRS_32		+= $(USR_STRMOD_DIR_32) $(USR_SYS_DIR_32)
5237c478bd9Sstevel@tonic-gateUSR_MOD_DIRS_32		+= $(USR_MISC_DIR_32) $(USR_DACF_DIR_32)
5243c5e027bSEric TaylorUSR_MOD_DIRS_32		+= $(USR_PCBE_DIR_32)
5259a9ae70fSjvUSR_MOD_DIRS_32		+= $(USR_DTRACE_DIR_32) $(USR_BRAND_DIR_32)
5260a0e9771SDarren ReedUSR_MOD_DIRS_32		+= $(USR_SOCK_DIR_32)
5277c478bd9Sstevel@tonic-gate
5287c478bd9Sstevel@tonic-gate#
5297c478bd9Sstevel@tonic-gate#
5307c478bd9Sstevel@tonic-gate#
5317c478bd9Sstevel@tonic-gateinclude $(SRC)/Makefile.psm
5327c478bd9Sstevel@tonic-gate
5337c478bd9Sstevel@tonic-gate#
5347c478bd9Sstevel@tonic-gate#	The "-r" on the remove may be considered temporary, but is required
5357c478bd9Sstevel@tonic-gate#	while the replacement of the SUNW,SPARCstation-10,SX directory by
5367c478bd9Sstevel@tonic-gate#	a symbolic link is being propagated.
5377c478bd9Sstevel@tonic-gate#
53824fe0b3bSjmcpINS.slink1= $(RM) -r $@; $(SYMLINK) $(PLATFORM) $@
53924fe0b3bSjmcpINS.slink2= $(RM) -r $@; $(SYMLINK) ../$(PLATFORM)/$(@F) $@
54024fe0b3bSjmcpINS.slink3= $(RM) -r $@; $(SYMLINK) $(IMPLEMENTED_PLATFORM) $@
54124fe0b3bSjmcpINS.slink4= $(RM) -r $@; $(SYMLINK) ../$(PLATFORM)/include $@
54224fe0b3bSjmcpINS.slink5= $(RM) -r $@; $(SYMLINK) ../$(PLATFORM)/sbin $@
54324fe0b3bSjmcpINS.slink6= $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/lib/$(MODULE) $@
54424fe0b3bSjmcpINS.slink7= $(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/sbin/$(@F) $@
5457c478bd9Sstevel@tonic-gate
5467c478bd9Sstevel@tonic-gateROOT_PLAT_LINKS		 = $(PLAT_LINKS:%=$(ROOT_PLAT_DIR)/%)
5477c478bd9Sstevel@tonic-gateROOT_PLAT_LINKS_2	 = $(PLAT_LINKS_2:%=$(ROOT_PLAT_DIR)/%)
5487c478bd9Sstevel@tonic-gateUSR_PLAT_LINKS		 = $(PLAT_LINKS:%=$(USR_PLAT_DIR)/%)
5497c478bd9Sstevel@tonic-gateUSR_PLAT_LINKS_2	 = $(PLAT_LINKS_2:%=$(USR_PLAT_DIR)/%)
5507c478bd9Sstevel@tonic-gate
5517c478bd9Sstevel@tonic-gate#
552ae115bc7Smrj# Collection of all relevant, delivered kernel modules.
553ae115bc7Smrj#
554ae115bc7Smrj# Note that we insist on building genunix first, because everything else
555ae115bc7Smrj# uniquifies against it.  When doing a 'make' from usr/src/uts/, we'll enter
556