xref: /titanic_41/usr/src/uts/sun4u/littleneck/Makefile (revision f29fbe76ce646ba8bcf62627d89087d5f02c62a8)
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#
23# uts/sun4u/littleneck/Makefile
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#	This makefile drives the production of all Littleneck system
30#	dependent modules for the sun4u architecture.
31#
32
33#
34#	Path to the base of the uts directory tree (usually /usr/src/uts).
35#
36UTSBASE = ../..
37
38#
39#	Include common rules.
40#
41include $(UTSBASE)/sun4u/littleneck/Makefile.littleneck
42
43def		:=	TARGET= def
44all		:=	TARGET= all
45install		:=	TARGET= install
46install_h	:=	TARGET= install_h
47clean		:=	TARGET= clean
48clobber		:=	TARGET= clobber
49lint		:=	TARGET= lint
50lintlib		:=	TARGET= lintlib
51modlintlib	:=	TARGET= modlintlib
52modlist		:=	TARGET= modlist
53modlist		:=	NO_STATE= -K $$MODSTATE$$$$
54clean.lint	:=	TARGET= clean.lint
55check		:=	TARGET= check
56
57#
58#	Default build targets.
59#
60.KEEP_STATE:
61
62def all clean.lint clean clobber modlist: $(LITTLENECK_KMODS)
63
64modlintlib:	$(LITTLENECK_KMODS)
65
66# EXPORT DELETE START
67#
68# aes256 is delivered in the SUNWcryr package which is removed from
69# the EXPORT_SRC build.
70#
71LITTLENECK_CRYPTO_LINKS	+= aes256
72# EXPORT DELETE END
73
74install: 	$(ROOT_LITTLENECK_DIR) $(USR_LITTLENECK_DIR) \
75		$(USR_LITTLENECK_INC_DIR) \
76		$(USR_LITTLENECK_SBIN_DIR) \
77		$(USR_LITTLENECK_LIB_DIR) \
78		$(LITTLENECK_CRYPTO_LINKS) \
79		.WAIT $(LITTLENECK_KMODS)
80
81install_h check:
82
83lint:		modlintlib
84
85LINT_LIBS	 = $(LINT_LIB) \
86		   -L$(LITTLENECK_LINT_LIB_DIR) \
87		   -L$(LINT_LIB_DIR) $(LINT_KMODS:%=-l%) \
88		       $(CLOSED_LINT_KMODS:%=-l%) \
89		   -L$(SPARC_LIB_DIR) $(SPARC_LINTS:%=-l%)
90
91lint.platmod:   modlintlib
92	@-$(ECHO) "\nLittleneck Platform-dependent module: global crosschecks:"
93	@-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2)
94
95$(LITTLENECK_KMODS):	FRC
96	@cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
97
98$(LITTLENECK_CRYPTO_LINKS): $(ROOT_LITTLENECK_CRYPTO_DIR_64)
99	-$(RM) $(ROOT_LITTLENECK_CRYPTO_DIR_64)/$@;
100	$(SYMLINK) $(ROOT_US3_CRYPTO_LINK)/$@ \
101	    $(ROOT_LITTLENECK_CRYPTO_DIR_64)/$@
102
103# EXPORT DELETE START
104
105EXPORT_SRC:
106	$(RM) Makefile+
107	sed -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d" \
108	    < Makefile > Makefile+
109	$(MV) Makefile+ Makefile
110	$(CHMOD) 444 Makefile
111
112# EXPORT DELETE END
113
114#
115#
116#	Include common targets.
117#
118include $(UTSBASE)/sun4u/littleneck/Makefile.targ
119