xref: /titanic_50/usr/src/uts/sparc/scsa1394/Makefile (revision 99ebb4ca412cb0a19d77a3899a87c055b9c30fa8)
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 2006 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
42
43#
44#	Include common rules.
45#
46include $(UTSBASE)/sparc/Makefile.sparc
47
48#
49#	Define targets
50#
51ALL_TARGET	= $(BINARY)
52LINT_TARGET	= $(MODULE).lint
53INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
54
55#
56#       Overrides
57#
58ALL_BUILDS	= $(ALL_BUILDSONLY64)
59DEF_BUILDS	= $(DEF_BUILDSONLY64)
60CLEANLINTFILES	+= $(LINT32_FILES)
61
62#
63# lint pass one enforcement
64#
65CFLAGS += $(CCVERBOSE)
66
67#
68# For now, disable these lint checks; maintainers should endeavor
69# to investigate and remove these for maximum lint coverage.
70# Please do not carry these forward to new Makefiles.
71#
72LINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
73LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
74LINTTAGS	+= -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
75LINTTAGS	+= -erroff=E_STATIC_UNUSED
76LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
77LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
78
79#
80# depends on
81#
82LDFLAGS		+= -dy -Nmisc/scsi -Nmisc/s1394 -Nmisc/sbp2
83
84#	Default build targets.
85#
86.KEEP_STATE:
87
88def:		$(DEF_DEPS)
89
90all:		$(ALL_DEPS)
91
92clean:		$(CLEAN_DEPS); \
93		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
94
95clobber:	$(CLOBBER_DEPS); \
96		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
97
98modlintlib:	$(MODLINTLIB_DEPS) lint32
99
100lint:		$(LINT_DEPS)
101
102clean.lint:	$(CLEAN_LINT_DEPS)
103
104install:	$(INSTALL_DEPS)
105
106#
107#	Include common targets.
108#
109include $(UTSBASE)/sparc/Makefile.targ
110
111#
112#	Defines for local commands.
113#
114WARLOCK		= warlock
115WLCC		= wlcc
116TOUCH		= touch
117SCCS		= sccs
118TEST		= test
119
120#
121#	Warlock targets
122#
123WARLOCK_OBJECTS	= $(SCSA1394_OBJS:%.o=%.ll)
124SBP2_FILES = $(SBP2_OBJS:%.o= -l ../sbp2/%.ll)
125SD_FILES   = $(SD_OBJS:%.o=../sd/%.ll)
126SCSI_FILES = $(SCSI_OBJS:%.o= -l ../scsi/%.ll)
127
128warlock: $(MODULE).ok
129
130%.wlcmd:
131	$(TEST) -f $@ || $(SCCS) get $@
132
133$(MODULE).ok: $(WARLOCK_OBJECTS) sbp2.files warlock_ddi.files scsa1394.wlcmd \
134	sd.files scsi.files
135	$(WARLOCK) -c scsa1394.wlcmd $(WARLOCK_OBJECTS) $(SD_FILES) \
136		$(SCSI_FILES) \
137		$(SBP2_FILES) \
138		-l ../warlock/ddi_dki_impl.ll
139	$(TOUCH) $@
140
141%.ll: $(UTSBASE)/common/io/1394/targets/scsa1394/%.c
142	$(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
143
144sbp2.files:
145	@cd ../sbp2; pwd; $(MAKE) warlock
146
147warlock_ddi.files:
148	@cd ../warlock; pwd; $(MAKE) warlock
149
150sd.files:
151	@cd ../sd; pwd; $(MAKE) warlock_alone
152
153scsi.files:
154	@cd ../scsi; pwd; $(MAKE) warlock
155
156
157