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