xref: /titanic_50/usr/src/uts/sparc/ahci/Makefile (revision 2fcbc377041d659446ded306a92901b4b0753b68)
1*2fcbc377Syt160523# CDDL HEADER START
2*2fcbc377Syt160523#
3*2fcbc377Syt160523# The contents of this file are subject to the terms of the
4*2fcbc377Syt160523# Common Development and Distribution License (the "License").
5*2fcbc377Syt160523# You may not use this file except in compliance with the License.
6*2fcbc377Syt160523#
7*2fcbc377Syt160523# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8*2fcbc377Syt160523# or http://www.opensolaris.org/os/licensing.
9*2fcbc377Syt160523# See the License for the specific language governing permissions
10*2fcbc377Syt160523# and limitations under the License.
11*2fcbc377Syt160523#
12*2fcbc377Syt160523# When distributing Covered Code, include this CDDL HEADER in each
13*2fcbc377Syt160523# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14*2fcbc377Syt160523# If applicable, add the following below this CDDL HEADER, with the
15*2fcbc377Syt160523# fields enclosed by brackets "[]" replaced with your own identifying
16*2fcbc377Syt160523# information: Portions Copyright [yyyy] [name of copyright owner]
17*2fcbc377Syt160523#
18*2fcbc377Syt160523# CDDL HEADER END
19*2fcbc377Syt160523#
20*2fcbc377Syt160523
21*2fcbc377Syt160523#
22*2fcbc377Syt160523# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23*2fcbc377Syt160523# Use is subject to license terms.
24*2fcbc377Syt160523#
25*2fcbc377Syt160523# ident	"%Z%%M%	%I%	%E% SMI"
26*2fcbc377Syt160523#
27*2fcbc377Syt160523
28*2fcbc377Syt160523#
29*2fcbc377Syt160523# uts/sparc/ahci/Makefile
30*2fcbc377Syt160523#
31*2fcbc377Syt160523#	This makefile drives the production of the
32*2fcbc377Syt160523#	"/kernel/drv/ahci" kernel module.
33*2fcbc377Syt160523#
34*2fcbc377Syt160523#	sparc architecture dependent
35*2fcbc377Syt160523#
36*2fcbc377Syt160523
37*2fcbc377Syt160523#
38*2fcbc377Syt160523#	Path to the base of the uts directory tree (usually /usr/src/uts).
39*2fcbc377Syt160523#
40*2fcbc377Syt160523UTSBASE	= ../..
41*2fcbc377Syt160523
42*2fcbc377Syt160523#
43*2fcbc377Syt160523#	Define the module and object file sets.
44*2fcbc377Syt160523#
45*2fcbc377Syt160523MODULE		= ahci
46*2fcbc377Syt160523OBJECTS		= $(AHCI_OBJS:%=$(OBJS_DIR)/%)
47*2fcbc377Syt160523LINTS		= $(AHCI_OBJS:%.o=$(LINTS_DIR)/%.ln)
48*2fcbc377Syt160523WARLOCK_OUT     = $(AHCI_OBJS:%.o=%.ll)
49*2fcbc377Syt160523WARLOCK_OK      = $(MODULE).ok
50*2fcbc377Syt160523ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
51*2fcbc377Syt160523CONF_SRCDIR     = $(UTSBASE)/common/io/sata/adapters/ahci
52*2fcbc377Syt160523WLCMD_DIR       = $(UTSBASE)/common/io/warlock
53*2fcbc377Syt160523
54*2fcbc377Syt160523#
55*2fcbc377Syt160523#	Include common rules.
56*2fcbc377Syt160523#
57*2fcbc377Syt160523include $(UTSBASE)/sparc/Makefile.sparc
58*2fcbc377Syt160523
59*2fcbc377Syt160523#
60*2fcbc377Syt160523#	Define targets
61*2fcbc377Syt160523#
62*2fcbc377Syt160523ALL_TARGET	= $(BINARY)
63*2fcbc377Syt160523LINT_TARGET	= $(MODULE).lint
64*2fcbc377Syt160523INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
65*2fcbc377Syt160523
66*2fcbc377Syt160523#
67*2fcbc377Syt160523#	Overrides.
68*2fcbc377Syt160523#
69*2fcbc377Syt160523DEBUG_FLGS	=
70*2fcbc377Syt160523DEBUG_DEFS	+= $(DEBUG_FLGS)
71*2fcbc377Syt160523
72*2fcbc377Syt160523#
73*2fcbc377Syt160523# lint pass one enforcement
74*2fcbc377Syt160523#
75*2fcbc377Syt160523CFLAGS += $(CCVERBOSE)
76*2fcbc377Syt160523
77*2fcbc377Syt160523#
78*2fcbc377Syt160523#	Default build targets.
79*2fcbc377Syt160523#
80*2fcbc377Syt160523.KEEP_STATE:
81*2fcbc377Syt160523
82*2fcbc377Syt160523def:		$(DEF_DEPS)
83*2fcbc377Syt160523
84*2fcbc377Syt160523all:		$(ALL_DEPS)
85*2fcbc377Syt160523
86*2fcbc377Syt160523clean:		$(CLEAN_DEPS)
87*2fcbc377Syt160523		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
88*2fcbc377Syt160523
89*2fcbc377Syt160523clobber:	$(CLOBBER_DEPS)
90*2fcbc377Syt160523		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
91*2fcbc377Syt160523
92*2fcbc377Syt160523lint:		$(LINT_DEPS)
93*2fcbc377Syt160523
94*2fcbc377Syt160523modlintlib:	$(MODLINTLIB_DEPS)
95*2fcbc377Syt160523
96*2fcbc377Syt160523clean.lint:	$(CLEAN_LINT_DEPS)
97*2fcbc377Syt160523
98*2fcbc377Syt160523install:	$(INSTALL_DEPS)
99*2fcbc377Syt160523
100*2fcbc377Syt160523#
101*2fcbc377Syt160523#	Include common targets.
102*2fcbc377Syt160523#
103*2fcbc377Syt160523include $(UTSBASE)/sparc/Makefile.targ
104*2fcbc377Syt160523
105*2fcbc377Syt160523
106*2fcbc377Syt160523#
107*2fcbc377Syt160523#	Defines for local commands.
108*2fcbc377Syt160523#
109*2fcbc377Syt160523WARLOCK		= warlock
110*2fcbc377Syt160523WLCC		= wlcc
111*2fcbc377Syt160523TOUCH		= touch
112*2fcbc377Syt160523SCCS		= sccs
113*2fcbc377Syt160523TEST		= test
114*2fcbc377Syt160523
115*2fcbc377Syt160523SD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
116*2fcbc377Syt160523SATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
117*2fcbc377Syt160523SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
118*2fcbc377Syt160523
119*2fcbc377Syt160523warlock: $(WARLOCK_OK)
120*2fcbc377Syt160523
121*2fcbc377Syt160523%.wlcmd:
122*2fcbc377Syt160523	cd $(WLCMD_DIR); $(TEST) -f $@  || $(SCCS) get $@
123*2fcbc377Syt160523
124*2fcbc377Syt160523$(WARLOCK_OK): ahci.wlcmd $(WARLOCK_OUT)  warlock_ddi.files \
125*2fcbc377Syt160523	sata.files scsi.files sd.files
126*2fcbc377Syt160523	$(WARLOCK) -c $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) \
127*2fcbc377Syt160523	$(SD_FILES) \
128*2fcbc377Syt160523	$(SCSI_FILES) \
129*2fcbc377Syt160523        $(SATA_FILES) \
130*2fcbc377Syt160523	-l ../warlock/ddi_dki_impl.ll
131*2fcbc377Syt160523	$(TOUCH) $@
132*2fcbc377Syt160523
133*2fcbc377Syt160523%.ll: $(UTSBASE)/common/io/sata/adapters/ahci/%.c
134*2fcbc377Syt160523	$(WLCC) $(CPPFLAGS) -D DEBUG -D __sparcv9 -o $@ $<
135*2fcbc377Syt160523
136*2fcbc377Syt160523sata.files:
137*2fcbc377Syt160523	@cd ../sata; pwd; $(MAKE) warlock
138*2fcbc377Syt160523
139*2fcbc377Syt160523scsi.files:
140*2fcbc377Syt160523	@cd ../scsi; pwd; $(MAKE) warlock
141*2fcbc377Syt160523
142*2fcbc377Syt160523sd.files:
143*2fcbc377Syt160523	@cd ../sd; pwd; $(MAKE) warlock_alone
144*2fcbc377Syt160523
145*2fcbc377Syt160523warlock_ddi.files:
146*2fcbc377Syt160523	@cd ../warlock; pwd; $(MAKE) warlock
147