xref: /titanic_52/usr/src/uts/sparc/fas/Makefile (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
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/sparc/fas/Makefile
24#
25# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
26# Use is subject to license terms.
27#
28#	This makefile drives the production of the fas driver kernel module.
29#
30#	sparc architecture dependent
31#
32#ident	"%Z%%M%	%I%	%E% SMI"
33
34#
35#	Path to the base of the uts directory tree (usually /usr/src/uts).
36#
37UTSBASE = ../..
38
39#
40#	Define the module and object file sets.
41#
42MODULE		= fas
43OBJECTS		= $(FAS_OBJS:%=$(OBJS_DIR)/%)
44LINTS		= $(FAS_OBJS:%.o=$(LINTS_DIR)/%.ln)
45ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
46
47#
48#	Include common rules.
49#
50include $(UTSBASE)/sparc/Makefile.sparc
51
52#
53#	Define targets
54#
55ALL_TARGET	= $(BINARY)
56LINT_TARGET	= $(MODULE).lint
57INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
58
59#
60# lint pass one enforcement
61#
62CFLAGS += $(CCVERBOSE)
63
64#
65#	Default build targets.
66#
67.KEEP_STATE:
68
69all:		$(ALL_DEPS)
70
71def:		$(DEF_DEPS)
72
73clean:		$(CLEAN_DEPS)
74
75clobber:	$(CLOBBER_DEPS)
76
77lint:		$(LINT_DEPS)
78
79modlintlib:	$(MODLINTLIB_DEPS)
80
81clean.lint:	$(CLEAN_LINT_DEPS)
82
83install:	$(INSTALL_DEPS)
84
85#
86#	Include common targets.
87#
88include $(UTSBASE)/sparc/Makefile.targ
89
90#
91#	Defines for local commands.
92#
93WARLOCK		= warlock
94WLCC		= wlcc
95TOUCH		= touch
96SCCS		= sccs
97TEST		= test
98
99#
100#	lock_lint rules
101#
102SCSI_FILES = $(SCSI_OBJS:%.o= -l ../scsi/%.ll)
103
104warlock: $(MODULE).ok
105
106%.wlcmd:
107	$(TEST) -f $@ || $(SCCS) get $@
108
109fas.ok: fas.ll fas_callbacks.ll fas.wlcmd warlock_ddi.files \
110	scsi.files
111	$(WARLOCK) -c fas.wlcmd fas.ll fas_callbacks.ll \
112	../warlock/scsi.ll \
113	-l ../warlock/ddi_dki_impl.ll \
114	$(SCSI_FILES)
115	$(TOUCH) $@
116
117%.ll: $(UTSBASE)/sun/io/scsi/adapters/%.c
118	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
119
120warlock_ddi.files:
121	@cd ../warlock; pwd; $(MAKE) warlock
122
123scsi.files:
124	@cd ../scsi; pwd; $(MAKE) warlock
125