xref: /titanic_51/usr/src/uts/sparc/si3124/Makefile (revision 66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24)
1*66f9d5cbSmlf# CDDL HEADER START
2*66f9d5cbSmlf#
3*66f9d5cbSmlf# The contents of this file are subject to the terms of the
4*66f9d5cbSmlf# Common Development and Distribution License (the "License").
5*66f9d5cbSmlf# You may not use this file except in compliance with the License.
6*66f9d5cbSmlf#
7*66f9d5cbSmlf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8*66f9d5cbSmlf# or http://www.opensolaris.org/os/licensing.
9*66f9d5cbSmlf# See the License for the specific language governing permissions
10*66f9d5cbSmlf# and limitations under the License.
11*66f9d5cbSmlf#
12*66f9d5cbSmlf# When distributing Covered Code, include this CDDL HEADER in each
13*66f9d5cbSmlf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14*66f9d5cbSmlf# If applicable, add the following below this CDDL HEADER, with the
15*66f9d5cbSmlf# fields enclosed by brackets "[]" replaced with your own identifying
16*66f9d5cbSmlf# information: Portions Copyright [yyyy] [name of copyright owner]
17*66f9d5cbSmlf#
18*66f9d5cbSmlf# CDDL HEADER END
19*66f9d5cbSmlf#
20*66f9d5cbSmlf
21*66f9d5cbSmlf#
22*66f9d5cbSmlf# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
23*66f9d5cbSmlf# Use is subject to license terms.
24*66f9d5cbSmlf#
25*66f9d5cbSmlf# ident	"%Z%%M%	%I%	%E% SMI"
26*66f9d5cbSmlf#
27*66f9d5cbSmlf
28*66f9d5cbSmlf#
29*66f9d5cbSmlf# uts/sparc/si3124/Makefile
30*66f9d5cbSmlf#
31*66f9d5cbSmlf#	This makefile drives the production of the
32*66f9d5cbSmlf#	"platform/i86pc/kernel/drv/si3124" kernel module.
33*66f9d5cbSmlf#
34*66f9d5cbSmlf#	sparc architecture dependent
35*66f9d5cbSmlf#
36*66f9d5cbSmlf
37*66f9d5cbSmlf#
38*66f9d5cbSmlf#	Path to the base of the uts directory tree (usually /usr/src/uts).
39*66f9d5cbSmlf#
40*66f9d5cbSmlfUTSBASE	= ../..
41*66f9d5cbSmlf
42*66f9d5cbSmlf#
43*66f9d5cbSmlf#	Define the module and object file sets.
44*66f9d5cbSmlf#
45*66f9d5cbSmlfMODULE		= si3124
46*66f9d5cbSmlfOBJECTS		= $(SI3124_OBJS:%=$(OBJS_DIR)/%)
47*66f9d5cbSmlfLINTS		= $(SI3124_OBJS:%.o=$(LINTS_DIR)/%.ln)
48*66f9d5cbSmlfWARLOCK_OUT     = $(SI3124_OBJS:%.o=%.ll)
49*66f9d5cbSmlfWARLOCK_OK      = $(MODULE).ok
50*66f9d5cbSmlfROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
51*66f9d5cbSmlfCONF_SRCDIR     = $(UTSBASE)/common/io/sata/adapters/si3124
52*66f9d5cbSmlf
53*66f9d5cbSmlf#
54*66f9d5cbSmlf#	Include common rules.
55*66f9d5cbSmlf#
56*66f9d5cbSmlfinclude $(UTSBASE)/sparc/Makefile.sparc
57*66f9d5cbSmlf
58*66f9d5cbSmlf#
59*66f9d5cbSmlf#	Define targets
60*66f9d5cbSmlf#
61*66f9d5cbSmlfALL_TARGET	= $(BINARY)
62*66f9d5cbSmlfLINT_TARGET	= $(MODULE).lint
63*66f9d5cbSmlfINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
64*66f9d5cbSmlf
65*66f9d5cbSmlf#
66*66f9d5cbSmlf#	Overrides.
67*66f9d5cbSmlf#
68*66f9d5cbSmlfDEBUG_FLGS	=
69*66f9d5cbSmlfDEBUG_DEFS	+= $(DEBUG_FLGS)
70*66f9d5cbSmlf
71*66f9d5cbSmlf#
72*66f9d5cbSmlf# lint pass one enforcement
73*66f9d5cbSmlf#
74*66f9d5cbSmlfCFLAGS += $(CCVERBOSE)
75*66f9d5cbSmlf
76*66f9d5cbSmlf#
77*66f9d5cbSmlf#	Default build targets.
78*66f9d5cbSmlf#
79*66f9d5cbSmlf.KEEP_STATE:
80*66f9d5cbSmlf
81*66f9d5cbSmlfdef:		$(DEF_DEPS)
82*66f9d5cbSmlf
83*66f9d5cbSmlfall:		$(ALL_DEPS)
84*66f9d5cbSmlf
85*66f9d5cbSmlfclean:		$(CLEAN_DEPS); \
86*66f9d5cbSmlf		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
87*66f9d5cbSmlf
88*66f9d5cbSmlfclobber:	$(CLOBBER_DEPS); \
89*66f9d5cbSmlf		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
90*66f9d5cbSmlf
91*66f9d5cbSmlflint:		$(LINT_DEPS)
92*66f9d5cbSmlf
93*66f9d5cbSmlfmodlintlib:	$(MODLINTLIB_DEPS)
94*66f9d5cbSmlf
95*66f9d5cbSmlfclean.lint:	$(CLEAN_LINT_DEPS)
96*66f9d5cbSmlf
97*66f9d5cbSmlfinstall:	$(INSTALL_DEPS)
98*66f9d5cbSmlf
99*66f9d5cbSmlf#
100*66f9d5cbSmlf#	Include common targets.
101*66f9d5cbSmlf#
102*66f9d5cbSmlfinclude $(UTSBASE)/sparc/Makefile.targ
103*66f9d5cbSmlf
104*66f9d5cbSmlf
105*66f9d5cbSmlf#
106*66f9d5cbSmlf#	Defines for local commands.
107*66f9d5cbSmlf#
108*66f9d5cbSmlfWARLOCK		= warlock
109*66f9d5cbSmlfWLCC		= wlcc
110*66f9d5cbSmlfTOUCH		= touch
111*66f9d5cbSmlfSCCS		= sccs
112*66f9d5cbSmlfTEST		= test
113*66f9d5cbSmlf
114*66f9d5cbSmlf
115*66f9d5cbSmlfSI3124_FILES   = $(MODULE).ll
116*66f9d5cbSmlfSD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
117*66f9d5cbSmlfSATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
118*66f9d5cbSmlfSCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
119*66f9d5cbSmlf
120*66f9d5cbSmlfwarlock: $(MODULE).ok
121*66f9d5cbSmlf
122*66f9d5cbSmlf%.wlcmd:
123*66f9d5cbSmlf	$(TEST) -f $@  || $(SCCS) get $@
124*66f9d5cbSmlf
125*66f9d5cbSmlf
126*66f9d5cbSmlfsi3124.ok: si3124.wlcmd $(SI3124_FILES)  warlock_ddi.files \
127*66f9d5cbSmlf	sata.files scsi.files sd.files
128*66f9d5cbSmlf	$(WARLOCK) -c ./si3124.wlcmd $(SI3124_FILES) \
129*66f9d5cbSmlf	$(SD_FILES) \
130*66f9d5cbSmlf	$(SCSI_FILES) \
131*66f9d5cbSmlf        $(SATA_FILES) \
132*66f9d5cbSmlf	-l ../warlock/ddi_dki_impl.ll
133*66f9d5cbSmlf	$(TOUCH) $@
134*66f9d5cbSmlf
135*66f9d5cbSmlf%.ll: $(UTSBASE)/common/io/sata/adapters/si3124/%.c
136*66f9d5cbSmlf	$(WLCC) $(CPPFLAGS) -D DEBUG -D __sparcv9 -o $@ $<
137*66f9d5cbSmlf
138*66f9d5cbSmlfsata.files:
139*66f9d5cbSmlf	@cd ../sata; pwd; $(MAKE) warlock
140*66f9d5cbSmlf
141*66f9d5cbSmlfscsi.files:
142*66f9d5cbSmlf	@cd ../scsi; pwd; $(MAKE) warlock
143*66f9d5cbSmlf
144*66f9d5cbSmlfsd.files:
145*66f9d5cbSmlf	@cd ../sd; pwd; $(MAKE) warlock_alone
146*66f9d5cbSmlf
147*66f9d5cbSmlfwarlock_ddi.files:
148*66f9d5cbSmlf	@cd ../warlock; pwd; $(MAKE) warlock
149