xref: /titanic_50/usr/src/uts/sparc/nv_sata/Makefile (revision a9478106a12424322498e53cf7cd75bd8a4d6004)
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
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
90CERRWARN	+= -_gcc=-Wno-uninitialized
91
92#
93#	Include common targets.
94#
95include $(UTSBASE)/sparc/Makefile.targ
96
97
98#
99#	Defines for local commands.
100#
101WARLOCK		= warlock
102WLCC		= wlcc
103TOUCH		= touch
104TEST		= test
105
106SD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
107SATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
108SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
109CMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
110
111warlock: $(WARLOCK_OK)
112
113$(WARLOCK_OK): $(WLCMD_DIR)/nv_sata.wlcmd $(WARLOCK_OUT)  warlock_ddi.files \
114	sata.files scsi.files sd.files cmlb.files
115	$(WARLOCK) -c $(WLCMD_DIR)/nv_sata.wlcmd $(WARLOCK_OUT) \
116	$(SD_FILES) \
117	$(SCSI_FILES) \
118	$(CMLB_FILES) \
119        $(SATA_FILES) \
120	-l ../warlock/ddi_dki_impl.ll
121	$(TOUCH) $@
122
123%.ll: $(UTSBASE)/common/io/sata/adapters/nv_sata/%.c
124	$(WLCC) $(CPPFLAGS) -D DEBUG -D __sparcv9 -o $@ $<
125
126sata.files:
127	@cd ../sata; pwd; $(MAKE) warlock
128
129scsi.files:
130	@cd ../scsi; pwd; $(MAKE) warlock
131
132sd.files:
133	@cd ../sd; pwd; $(MAKE) warlock_alone
134
135cmlb.files:
136	@cd ../cmlb; pwd; $(MAKE) warlock
137
138
139warlock_ddi.files:
140	@cd ../warlock; pwd; $(MAKE) warlock
141