xref: /titanic_51/usr/src/uts/sparc/si3124/Makefile (revision da4badc008f69df74f592b0831d92baa6dfcee76)
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# uts/sparc/si3124/Makefile
28#
29#	This makefile drives the production of the
30#	"platform/i86pc/kernel/drv/si3124" kernel module.
31#
32#	sparc architecture dependent
33#
34
35#
36#	Path to the base of the uts directory tree (usually /usr/src/uts).
37#
38UTSBASE	= ../..
39
40#
41#	Define the module and object file sets.
42#
43MODULE		= si3124
44OBJECTS		= $(SI3124_OBJS:%=$(OBJS_DIR)/%)
45LINTS		= $(SI3124_OBJS:%.o=$(LINTS_DIR)/%.ln)
46WARLOCK_OUT     = $(SI3124_OBJS:%.o=%.ll)
47WARLOCK_OK      = $(MODULE).ok
48ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
49CONF_SRCDIR     = $(UTSBASE)/common/io/sata/adapters/si3124
50WLCMD_DIR       = $(UTSBASE)/common/io/warlock
51
52#
53#	Include common rules.
54#
55include $(UTSBASE)/sparc/Makefile.sparc
56
57#
58#	Define targets
59#
60ALL_TARGET	= $(BINARY)
61LINT_TARGET	= $(MODULE).lint
62INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
63
64#
65#	Overrides.
66#
67DEBUG_FLGS	=
68DEBUG_DEFS	+= $(DEBUG_FLGS)
69
70CERRWARN	+= -_gcc=-Wno-uninitialized
71
72#
73# lint pass one enforcement
74#
75CFLAGS += $(CCVERBOSE)
76
77#
78#	Default build targets.
79#
80.KEEP_STATE:
81
82def:		$(DEF_DEPS)
83
84all:		$(ALL_DEPS)
85
86clean:		$(CLEAN_DEPS)
87		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
88
89clobber:	$(CLOBBER_DEPS)
90		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
91
92lint:		$(LINT_DEPS)
93
94modlintlib:	$(MODLINTLIB_DEPS)
95
96clean.lint:	$(CLEAN_LINT_DEPS)
97
98install:	$(INSTALL_DEPS)
99
100#
101#	Include common targets.
102#
103include $(UTSBASE)/sparc/Makefile.targ
104
105
106#
107#	Defines for local commands.
108#
109WARLOCK		= warlock
110WLCC		= wlcc
111TOUCH		= touch
112TEST		= test
113
114SD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
115SATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
116SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
117CMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
118
119warlock: $(WARLOCK_OK)
120
121$(WARLOCK_OK): $(WLCMD_DIR)/si3124.wlcmd $(WARLOCK_OUT) warlock_ddi.files \
122	sata.files scsi.files sd.files cmlb.files
123	$(WARLOCK) -c $(WLCMD_DIR)/si3124.wlcmd $(WARLOCK_OUT) \
124	$(SD_FILES) \
125	$(SCSI_FILES) \
126	$(CMLB_FILES) \
127        $(SATA_FILES) \
128	-l ../warlock/ddi_dki_impl.ll
129	$(TOUCH) $@
130
131%.ll: $(UTSBASE)/common/io/sata/adapters/si3124/%.c
132	$(WLCC) $(CPPFLAGS) -D DEBUG -D __sparcv9 -o $@ $<
133
134sata.files:
135	@cd ../sata; pwd; $(MAKE) warlock
136
137scsi.files:
138	@cd ../scsi; pwd; $(MAKE) warlock
139
140sd.files:
141	@cd ../sd; pwd; $(MAKE) warlock_alone
142
143cmlb.files:
144	@cd ../cmlb; pwd; $(MAKE) warlock
145
146warlock_ddi.files:
147	@cd ../warlock; pwd; $(MAKE) warlock
148