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