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