xref: /titanic_52/usr/src/uts/intel/scsa1394/Makefile (revision b6c3f7863936abeae522e48a13887dddeb691a45)
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# 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#	Path to the base of the uts directory tree.
30#
31UTSBASE	= ../..
32
33#
34#	Define the module and object file sets.
35#
36MODULE		= scsa1394
37OBJECTS		= $(SCSA1394_OBJS:%=$(OBJS_DIR)/%)
38LINTS		= $(SCSA1394_OBJS:%.o=$(LINTS_DIR)/%.ln)
39ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
40WARLOCK_OUT     = $(SCSA1394_OBJS:%.o=%.ll)
41WARLOCK_OK      = $(MODULE).ok
42WLCMD_DIR	= $(UTSBASE)/common/io/warlock
43
44#
45#	Include common rules.
46#
47include $(UTSBASE)/intel/Makefile.intel
48
49#
50#	Define targets
51#
52ALL_TARGET	= $(BINARY)
53LINT_TARGET	= $(MODULE).lint
54INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
55
56#
57# depends on
58#
59LDFLAGS		+= -dy -Nmisc/scsi -Nmisc/s1394 -Nmisc/sbp2
60
61#
62# For now, disable these lint checks; maintainers should endeavor
63# to investigate and remove these for maximum lint coverage.
64# Please do not carry these forward to new Makefiles.
65#
66LINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
67LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
68LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
69
70#	Default build targets.
71#
72.KEEP_STATE:
73
74def:		$(DEF_DEPS)
75
76all:		$(ALL_DEPS)
77
78clean:		$(CLEAN_DEPS)
79		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
80
81clobber:	$(CLOBBER_DEPS)
82		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
83
84lint:		$(LINT_DEPS)
85
86modlintlib:	$(MODLINTLIB_DEPS)
87
88clean.lint:	$(CLEAN_LINT_DEPS)
89
90install:	$(INSTALL_DEPS)
91
92#
93#	Include common targets.
94#
95include $(UTSBASE)/intel/Makefile.targ
96
97#
98#	Defines for local commands.
99#
100WARLOCK		= warlock
101WLCC		= wlcc
102TOUCH		= touch
103TEST		= test
104
105#
106#	Warlock targets
107#
108SBP2_FILES = $(SBP2_OBJS:%.o= -l ../sbp2/%.ll)
109SD_FILES   = $(SD_OBJS:%.o=../sd/%.ll)
110SCSI_FILES = $(SCSI_OBJS:%.o= -l ../scsi/%.ll)
111CMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
112
113warlock: $(WARLOCK_OK)
114
115$(WARLOCK_OK): $(WARLOCK_OUT) sbp2.files warlock_ddi.files \
116	$(WLCMD_DIR)/scsa1394.wlcmd sd.files scsi.files cmlb.files
117	$(WARLOCK) -c $(WLCMD_DIR)/scsa1394.wlcmd $(WARLOCK_OUT) $(SD_FILES) \
118		$(SCSI_FILES) \
119		$(CMLB_FILES) \
120		$(SBP2_FILES) \
121		-l ../warlock/ddi_dki_impl.ll
122	$(TOUCH) $@
123
124%.ll: $(UTSBASE)/common/io/1394/targets/scsa1394/%.c
125	$(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
126
127sbp2.files:
128	@cd ../sbp2; pwd; $(MAKE) warlock
129
130warlock_ddi.files:
131	@cd ../warlock; pwd; $(MAKE) warlock
132
133sd.files:
134	@cd ../sd; pwd; $(MAKE) warlock_alone
135
136scsi.files:
137	@cd ../scsi; pwd; $(MAKE) warlock
138
139cmlb.files:
140	@cd ../cmlb; pwd; $(MAKE) warlock
141
142