xref: /titanic_51/usr/src/uts/sparc/si3124/Makefile (revision 20c794b39650d115e17a15983b6b82e46238cf45)
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#
29# uts/sparc/si3124/Makefile
30#
31#	This makefile drives the production of the
32#	"platform/i86pc/kernel/drv/si3124" kernel module.
33#
34#	sparc architecture dependent
35#
36
37#
38#	Path to the base of the uts directory tree (usually /usr/src/uts).
39#
40UTSBASE	= ../..
41
42#
43#	Define the module and object file sets.
44#
45MODULE		= si3124
46OBJECTS		= $(SI3124_OBJS:%=$(OBJS_DIR)/%)
47LINTS		= $(SI3124_OBJS:%.o=$(LINTS_DIR)/%.ln)
48WARLOCK_OUT     = $(SI3124_OBJS:%.o=%.ll)
49WARLOCK_OK      = $(MODULE).ok
50ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
51CONF_SRCDIR     = $(UTSBASE)/common/io/sata/adapters/si3124
52WLCMD_DIR       = $(UTSBASE)/common/io/warlock
53
54#
55#	Include common rules.
56#
57include $(UTSBASE)/sparc/Makefile.sparc
58
59#
60#	Define targets
61#
62ALL_TARGET	= $(BINARY)
63LINT_TARGET	= $(MODULE).lint
64INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
65
66#
67#	Overrides.
68#
69DEBUG_FLGS	=
70DEBUG_DEFS	+= $(DEBUG_FLGS)
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