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