xref: /titanic_41/usr/src/uts/intel/si3124/Makefile (revision bd0f52d78d701efcad2c460df61b45677d041c35)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29#
30#	This makefile drives the production of the
31#	"platform/i86pc/kernel/drv/si3124" kernel module.
32#
33#	intel architecture dependent
34#
35
36#
37#	Path to the base of the uts directory tree (usually /usr/src/uts).
38#
39UTSBASE	= ../..
40
41#
42#	Define the module and object file sets.
43#
44MODULE		= si3124
45OBJECTS		= $(SI3124_OBJS:%=$(OBJS_DIR)/%)
46LINTS		= $(SI3124_OBJS:%.o=$(LINTS_DIR)/%.ln)
47ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
48CONF_SRCDIR     = $(UTSBASE)/common/io/sata/adapters/si3124
49WARLOCK_OUT     = $(SI3124_OBJS:%.o=%.ll)
50WARLOCK_OK      = $(MODULE).ok
51WLCMD_DIR	= $(UTSBASE)/common/io/warlock
52
53#
54#	Include common rules.
55#
56include $(UTSBASE)/intel/Makefile.intel
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#
78# we depend on the sata module
79LDFLAGS += -dy -N misc/sata
80
81#
82# For now, disable these lint checks; maintainers should endeavor
83# to investigate and remove these for maximum lint coverage.
84# Please do not carry these forward to new Makefiles.
85#
86LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
87LINTTAGS	+= -erroff=E_STATIC_UNUSED
88LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
89
90#
91#	Default build targets.
92#
93.KEEP_STATE:
94
95def:		$(DEF_DEPS)
96
97all:		$(ALL_DEPS)
98
99clean:		$(CLEAN_DEPS)
100		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
101
102clobber:	$(CLOBBER_DEPS)
103		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
104
105lint:		$(LINT_DEPS)
106
107modlintlib:	$(MODLINTLIB_DEPS)
108
109clean.lint:	$(CLEAN_LINT_DEPS)
110
111install:	$(INSTALL_DEPS)
112
113#
114#	Include common targets.
115#
116include $(UTSBASE)/intel/Makefile.targ
117
118
119#
120#	Defines for local commands.
121#
122WARLOCK		= warlock
123WLCC		= wlcc
124TOUCH		= touch
125TEST		= test
126
127SI3124_FILES   = $(MODULE).ll
128SD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
129SATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
130SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
131CMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
132
133warlock: $(WARLOCK_OK)
134
135$(WARLOCK_OK): $(WLCMD_DIR)/si3124.wlcmd $(WARLOCK_OUT) warlock_ddi.files \
136	sata.files scsi.files sd.files cmlb.files
137	$(WARLOCK) -c $(WLCMD_DIR)/si3124.wlcmd $(WARLOCK_OUT) \
138	$(SD_FILES) \
139	$(SCSI_FILES) \
140	$(CMLB_FILES) \
141        $(SATA_FILES) \
142	-l ../warlock/ddi_dki_impl.ll
143	$(TOUCH) $@
144
145%.ll: $(UTSBASE)/common/io/sata/adapters/si3124/%.c
146	$(WLCC) $(CPPFLAGS) -D DEBUG -o $@ $<
147
148sata.files:
149	@cd ../sata; pwd; $(MAKE) warlock
150
151scsi.files:
152	@cd ../scsi; pwd; $(MAKE) warlock
153
154sd.files:
155	@cd ../sd; pwd; $(MAKE) warlock_alone
156
157cmlb.files:
158	@cd ../cmlb; pwd; $(MAKE) warlock
159
160warlock_ddi.files:
161	@cd ../warlock; pwd; $(MAKE) warlock
162