xref: /titanic_41/usr/src/uts/sparc/nv_sata/Makefile (revision 9a5d73e03cd3312ddb571a748c40a63c58bd66e5)
1# CDDL HEADER START
2#
3# The contents of this file are subject to the terms of the
4# Common Development and Distribution License (the "License").
5# You may not use this file except in compliance with the License.
6#
7# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8# or http://www.opensolaris.org/os/licensing.
9# See the License for the specific language governing permissions
10# and limitations under the License.
11#
12# When distributing Covered Code, include this CDDL HEADER in each
13# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14# If applicable, add the following below this CDDL HEADER, with the
15# fields enclosed by brackets "[]" replaced with your own identifying
16# information: Portions Copyright [yyyy] [name of copyright owner]
17#
18# CDDL HEADER END
19#
20
21#
22# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27#
28#	Path to the base of the uts directory tree (usually /usr/src/uts).
29#
30UTSBASE	= ../..
31
32#
33#	Define the module and object file sets.
34#
35MODULE		= nv_sata
36OBJECTS		= $(NV_SATA_OBJS:%=$(OBJS_DIR)/%)
37LINTS		= $(NV_SATA_OBJS:%.o=$(LINTS_DIR)/%.ln)
38WARLOCK_OUT     = $(NV_SATA_OBJS:%.o=%.ll)
39WARLOCK_OK      = $(MODULE).ok
40ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
41CONF_SRCDIR     = $(UTSBASE)/common/io/sata/adapters/nv_sata
42WLCMD_DIR       = $(UTSBASE)/common/io/warlock
43
44#
45#	Include common rules.
46#
47include $(UTSBASE)/sparc/Makefile.sparc
48
49#
50#	Define targets
51#
52ALL_TARGET	= $(BINARY)
53LINT_TARGET	= $(MODULE).lint
54INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
55
56#
57#	Overrides.
58#
59DEBUG_FLGS	=
60DEBUG_DEFS	+= $(DEBUG_FLGS)
61
62#
63# lint pass one enforcement
64#
65CFLAGS += $(CCVERBOSE)
66
67#
68#	Default build targets.
69#
70.KEEP_STATE:
71
72def:		$(DEF_DEPS)
73
74all:		$(ALL_DEPS)
75
76clean:		$(CLEAN_DEPS)
77		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
78
79clobber:	$(CLOBBER_DEPS)
80		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
81
82lint:		$(LINT_DEPS)
83
84modlintlib:	$(MODLINTLIB_DEPS)
85
86clean.lint:	$(CLEAN_LINT_DEPS)
87
88install:	$(INSTALL_DEPS)
89
90#
91#	Include common targets.
92#
93include $(UTSBASE)/sparc/Makefile.targ
94
95
96#
97#	Defines for local commands.
98#
99WARLOCK		= warlock
100WLCC		= wlcc
101TOUCH		= touch
102TEST		= test
103
104SD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
105SATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
106SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
107CMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
108
109warlock: $(WARLOCK_OK)
110
111$(WARLOCK_OK): $(WLCMD_DIR)/nv_sata.wlcmd $(WARLOCK_OUT)  warlock_ddi.files \
112	sata.files scsi.files sd.files cmlb.files
113	$(WARLOCK) -c $(WLCMD_DIR)/nv_sata.wlcmd $(WARLOCK_OUT) \
114	$(SD_FILES) \
115	$(SCSI_FILES) \
116	$(CMLB_FILES) \
117        $(SATA_FILES) \
118	-l ../warlock/ddi_dki_impl.ll
119	$(TOUCH) $@
120
121%.ll: $(UTSBASE)/common/io/sata/adapters/nv_sata/%.c
122	$(WLCC) $(CPPFLAGS) -D DEBUG -D __sparcv9 -o $@ $<
123
124sata.files:
125	@cd ../sata; pwd; $(MAKE) warlock
126
127scsi.files:
128	@cd ../scsi; pwd; $(MAKE) warlock
129
130sd.files:
131	@cd ../sd; pwd; $(MAKE) warlock_alone
132
133cmlb.files:
134	@cd ../cmlb; pwd; $(MAKE) warlock
135
136
137warlock_ddi.files:
138	@cd ../warlock; pwd; $(MAKE) warlock
139