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