xref: /titanic_50/usr/src/uts/intel/Makefile (revision c0889d7a91fa87e1cb7ef4457629b0cb51d47b50)
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 2008 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_KMODS_X1	= $(LINT_KMODS:nsmb=)
37LINT_KMODS_X2	= $(LINT_KMODS_X1:smbfs=)
38LINT_KMODLIBS	= $(LINT_KMODS_X2:e1000g=)
39LINT_LIBS	= $(LINT_LIB) $(GEN_LINT_LIB) \
40		  $(LINT_KMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln) \
41		  $(CLOSED_LINT_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
42
43# EXPORT DELETE START
44$(CLOSED_BUILD)LINT_LIBS	+= $(SVVS_KMODS:%=$(LINT_LIB_DIR)/llib-l%.ln)
45$(CLOSED_BUILD)LINT_CLOSED_XMOD4	= $(CLOSED_XMODS:bnx=)
46$(CLOSED_BUILD)LINT_CLOSED_XMOD3	= $(LINT_CLOSED_XMOD4:lsimega=)
47$(CLOSED_BUILD)LINT_CLOSED_XMOD2	= $(LINT_CLOSED_XMOD3:spwr=)
48$(CLOSED_BUILD)LINT_CLOSED_XMOD1	= $(LINT_CLOSED_XMOD2:adpu320=)
49$(CLOSED_BUILD)LINT_LIBS	+= $(LINT_XMODLIBS:%=$(LINT_LIB_DIR)/llib-l%.ln)
50
51#
52# dprov is delivered in the SUNWcrtptoint package.
53#
54DRV_KMODS	+= dprov
55
56#
57# CRYPTO_EK_KMODS modules go in the encryption pack (SUNWcry*)
58# They need to be listed separately since they duplicate global symbols
59# causing the 2nd pass of lint on the kernel to complain. CRYPTO_EK_KMODS
60# should not be listed in the lint target.
61#
62# Don't build these for OpenSolaris, since they will be replaced by
63# binaries that are signed by Sun RE.
64#
65$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= aes256
66$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= arcfour2048
67$(CLOSED_BUILD)CRYPTO_EK_KMODS	+= blowfish448
68
69# EXPORT DELETE END
70
71#
72#
73def		:=	TARGET= def
74all		:=	TARGET= all
75install		:=	TARGET= install
76clean		:=	TARGET= clean
77clobber		:=	TARGET= clobber
78lint		:=	TARGET= lint
79modlintlib	:=	TARGET= modlintlib
80modlist		:=	TARGET= modlist
81modlist		:=	NO_STATE= -K $$MODSTATE$$$$
82clean.lint	:=	TARGET= clean.lint
83check		:=	TARGET= check
84install_h	:=	TARGET= install_h
85
86.KEEP_STATE:
87
88.PARALLEL:	$(PARALLEL_KMODS) $(CLOSED_KMODS) $(SVVS) $(XMODS) \
89		$(CLOSED_XMODS) config $(LINT_DEPS)
90
91def all install clean clobber modlist: genassym $(KMODS) $(CLOSED_KMODS) \
92	$(SVVS) $(XMODS) $(CLOSED_XMODS) config
93
94modlintlib clean.lint: $(LINT_KMODS) $(CLOSED_LINT_KMODS) $(SVVS) \
95	$(XMODS) $(CLOSED_XMODS)
96
97genassym $(KMODS) $(SUBDIRS) config:	FRC
98	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
99
100$(CLOSED_KMODS):	FRC
101	cd $(CLOSED)/uts/intel/$@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
102
103$(XMODS):	FRC
104	@if [ -f $@/Makefile  ]; then \
105		cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \
106	else \
107		true; \
108	fi
109
110$(SVVS) $(CLOSED_XMODS):	FRC
111	@if [ -f $(CLOSED)/uts/intel/$@/Makefile  ]; then \
112		cd $(CLOSED)/uts/intel/$@; pwd; \
113		    $(MAKE) $(NO_STATE) $(TARGET); \
114	else \
115		true; \
116	fi
117
118install_h check:	FRC
119	@cd sys; pwd; $(MAKE) $(TARGET)
120	@cd asm; pwd; $(MAKE) $(TARGET)
121	@cd ia32/sys; pwd; $(MAKE) $(TARGET)
122	@cd amd64/sys; pwd; $(MAKE) $(TARGET)
123
124#
125# Work-around to disable acpica global crosscheck lint warnings
126#
127LGREP.intel =	grep -v 'intel/io/acpica'
128
129#
130#	Full kernel lint target.
131#
132LINT_TARGET	= globallint
133
134# workaround for multiply defined errors
135globallint := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2
136
137globallint:
138	@-$(ECHO) "\nFULL KERNEL: global crosschecks:"
139	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.intel) | $(LGREP.2)
140
141lint:	modlintlib .WAIT $(LINT_DEPS)
142
143# EXPORT DELETE START
144
145EXPORT_SRC:
146	$(RM) Makefile+
147	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
148	    < Makefile > Makefile+
149	$(MV) Makefile+ Makefile
150	$(CHMOD) 444 Makefile
151
152# EXPORT DELETE END
153
154include ../Makefile.targ
155