xref: /titanic_44/usr/src/uts/sparc/si3124/Makefile (revision 28167c24ba5be8b7c1d05e02d053f4a55cd21cc9)
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 2005 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
52
53#
54#	Include common rules.
55#
56include $(UTSBASE)/sparc/Makefile.sparc
57
58#
59#	Define targets
60#
61ALL_TARGET	= $(BINARY)
62LINT_TARGET	= $(MODULE).lint
63INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
64
65#
66#	Overrides.
67#
68DEBUG_FLGS	=
69DEBUG_DEFS	+= $(DEBUG_FLGS)
70
71#
72# lint pass one enforcement
73#
74CFLAGS += $(CCVERBOSE)
75
76#
77#	Default build targets.
78#
79.KEEP_STATE:
80
81def:		$(DEF_DEPS)
82
83all:		$(ALL_DEPS)
84
85clean:		$(CLEAN_DEPS); \
86		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
87
88clobber:	$(CLOBBER_DEPS); \
89		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
90
91lint:		$(LINT_DEPS)
92
93modlintlib:	$(MODLINTLIB_DEPS)
94
95clean.lint:	$(CLEAN_LINT_DEPS)
96
97install:	$(INSTALL_DEPS)
98
99#
100#	Include common targets.
101#
102include $(UTSBASE)/sparc/Makefile.targ
103
104
105#
106#	Defines for local commands.
107#
108WARLOCK		= warlock
109WLCC		= wlcc
110TOUCH		= touch
111SCCS		= sccs
112TEST		= test
113
114
115SI3124_FILES   = $(MODULE).ll
116SD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
117SATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
118SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
119
120warlock: $(MODULE).ok
121
122%.wlcmd:
123	$(TEST) -f $@  || $(SCCS) get $@
124
125
126si3124.ok: si3124.wlcmd $(SI3124_FILES)  warlock_ddi.files \
127	sata.files scsi.files sd.files
128	$(WARLOCK) -c ./si3124.wlcmd $(SI3124_FILES) \
129	$(SD_FILES) \
130	$(SCSI_FILES) \
131        $(SATA_FILES) \
132	-l ../warlock/ddi_dki_impl.ll
133	$(TOUCH) $@
134
135%.ll: $(UTSBASE)/common/io/sata/adapters/si3124/%.c
136	$(WLCC) $(CPPFLAGS) -D DEBUG -D __sparcv9 -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
147warlock_ddi.files:
148	@cd ../warlock; pwd; $(MAKE) warlock
149