xref: /titanic_50/usr/src/uts/sparc/scsa1394/Makefile (revision fa9e4066f08beec538e775443c5be79dd423fcab)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 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#	Path to the base of the uts directory tree.
31#
32UTSBASE	= ../..
33
34#
35#	Define the module and object file sets.
36#
37MODULE		= scsa1394
38OBJECTS		= $(SCSA1394_OBJS:%=$(OBJS_DIR)/%)
39LINTS		= $(SCSA1394_OBJS:%.o=$(LINTS_DIR)/%.ln)
40ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
41
42#
43#	Include common rules.
44#
45include $(UTSBASE)/sparc/Makefile.sparc
46
47#
48#	Define targets
49#
50ALL_TARGET	= $(BINARY)
51LINT_TARGET	= $(MODULE).lint
52INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
53
54#
55#       Overrides
56#
57ALL_BUILDS	= $(ALL_BUILDSONLY64)
58DEF_BUILDS	= $(DEF_BUILDSONLY64)
59CLEANLINTFILES	+= $(LINT32_FILES)
60
61#
62# lint pass one enforcement
63#
64CFLAGS += -v
65
66#
67# depends on
68#
69LDFLAGS		+= -dy -Nmisc/scsi -Nmisc/s1394 -Nmisc/sbp2
70
71#	Default build targets.
72#
73.KEEP_STATE:
74
75def:		$(DEF_DEPS)
76
77all:		$(ALL_DEPS)
78
79clean:		$(CLEAN_DEPS)
80
81clobber:	$(CLOBBER_DEPS)
82
83lint:		$(LINT_DEPS)
84
85modlintlib:	$(MODLINTLIB_DEPS) lint32
86
87clean.lint:	$(CLEAN_LINT_DEPS)
88
89install:	$(INSTALL_DEPS)
90
91#
92#	Include common targets.
93#
94include $(UTSBASE)/sparc/Makefile.targ
95
96#
97#	Defines for local commands.
98#
99WARLOCK		= warlock
100WLCC		= wlcc
101TOUCH		= touch
102SCCS		= sccs
103TEST		= test
104
105#
106#	Warlock targets
107#
108WARLOCK_OBJECTS	= $(SCSA1394_OBJS:%.o=%.ll)
109SBP2_FILES = $(SBP2_OBJS:%.o= -l ../sbp2/%.ll)
110
111warlock: $(MODULE).ok
112
113%.wlcmd:
114	$(TEST) -f $@ || $(SCCS) get $@
115
116$(MODULE).ok: $(WARLOCK_OBJECTS) sbp2.files warlock_ddi.files scsa1394.wlcmd
117	$(WARLOCK) -c scsa1394.wlcmd $(WARLOCK_OBJECTS) $(SBP2_FILES) \
118		-l ../warlock/ddi_dki_impl.ll
119	$(TOUCH) $@
120
121%.ll: $(UTSBASE)/common/io/1394/targets/scsa1394/%.c
122	$(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
123
124sbp2.files:
125	@cd ../sbp2; pwd; $(MAKE) warlock
126
127warlock_ddi.files:
128	@cd ../warlock; pwd; $(MAKE) warlock
129