xref: /titanic_52/usr/src/uts/intel/Makefile (revision ba4e3c84e6b9390bbf7df80b5f1d11dec34cc525)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21# uts/intel/Makefile
22#
23# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28#
29#	This makefile drives the production of all implementation architecture
30#	independent modules for Intel processors.
31
32UTSBASE = ..
33
34include Makefile.intel
35
36LINT_LIBS	= $(LINT_LIB) $(GEN_LINT_LIB) \
37		  $(LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
38		  $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
39
40# EXPORT DELETE START
41$(CLOSED_BUILD)LINT_LIBS	+= $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
42$(CLOSED_BUILD)LINT_CLOSED_XMOD3	 = $(CLOSED_XMODS:lsimega=)
43$(CLOSED_BUILD)LINT_CLOSED_XMOD2	 = $(LINT_CLOSED_XMOD3:adpu320=)
44$(CLOSED_BUILD)LINT_CLOSED_XMOD1	 = $(LINT_CLOSED_XMOD2:e1000g=)
45$(CLOSED_BUILD)LINT_XMODLIBS	= $(LINT_CLOSED_XMOD1:nge=)
46$(CLOSED_BUILD)LINT_LIBS	+= $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln)
47
48#
49# dprov is delivered in the SUNWcrtptoint package.
50#
51DRV_KMODS	+= dprov
52
53#
54# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*)
55# They need to be listed separately since they duplicate global symbols
56# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
57# should not be listed in the lint target.
58#
59# Don't build these for OpenSolaris, since they will be replaced by
60# binaries that are signed by Sun RE.
61#
62$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= aes256
63$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= arcfour2048
64$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= blowfish448
65
66# EXPORT DELETE END
67
68#
69#
70def		:=	TARGET= def
71all		:=	TARGET= all
72install		:=	TARGET= install
73clean		:=	TARGET= clean
74clobber		:=	TARGET= clobber
75lint		:=	TARGET= lint
76modlintlib	:=	TARGET= modlintlib
77modlist		:=	TARGET= modlist
78modlist		:=	NO_STATE= -K $$MODSTATE$$$$
79clean.lint	:=	TARGET= clean.lint
80check		:=	TARGET= check
81install_h	:=	TARGET= install_h
82
83.KEEP_STATE:
84
85.PARALLEL:	$(KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) $(CLOSED_XMODS) \
86		config $(LINT_DEPS)
87
88def all install clean clobber modlist: $(KMODS) $(CLOSED_KMODS) \
89		$(SVVS) $(XMODS) $(CLOSED_XMODS) config
90
91modlintlib clean.lint: $(LINT_KMODS) $(CLOSED_LINT_KMODS) $(SVVS) \
92	$(XMODS) $(CLOSED_XMODS)
93
94$(KMODS) $(SUBDIRS) config:	FRC
95	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
96
97$(CLOSED_KMODS):	FRC
98	cd $(CLOSED)/uts/intel/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
99
100$(XMODS):	FRC
101	@if [ -f $@/Makefile  ]; then \
102		cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
103	else \
104		true; \
105	fi
106
107$(SVVS) $(CLOSED_XMODS):	FRC
108	@if [ -f $(CLOSED)/uts/intel/$@/Makefile  ]; then \
109		cd $(CLOSED)/uts/intel/$@; pwd; \
110		    $(MAKE) $(NO_STATE) $(TARGET); \
111	else \
112		true; \
113	fi
114
115install_h check:	FRC
116	@cd sys; pwd; $(MAKE) $(TARGET)
117	@cd asm; pwd; $(MAKE) $(TARGET)
118	@cd ia32/sys; pwd; $(MAKE) $(TARGET)
119	@cd amd64/sys; pwd; $(MAKE) $(TARGET)
120
121#
122#	Full kernel lint target.
123#
124LINT_TARGET	= globallint
125
126globallint:
127	@-$(ECHO) "\nFULL KERNEL: global crosschecks:"
128	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
129
130lint:	modlintlib .WAIT $(LINT_DEPS)
131
132# EXPORT DELETE START
133
134EXPORT_SRC:
135	$(RM) Makefile+
136	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
137	    < Makefile > Makefile+
138	$(MV) Makefile+ Makefile
139	$(CHMOD) 444 Makefile
140
141# EXPORT DELETE END
142
143include ../Makefile.targ
144