xref: /titanic_50/usr/src/uts/sparc/hci1394/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# uts/sparc/hci1394/Makefile
23#
24# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27#ident	"%Z%%M%	%I%	%E% SMI"
28#
29#	This makefile drives the production of the hci1394 OHCI HAL module.
30#
31#	sparc architecture dependent
32#
33
34#
35#	Path to the base of the uts directory tree (usually /usr/src/uts).
36#
37UTSBASE	= ../..
38
39#
40#	Define the module and object file sets.
41#
42MODULE		= hci1394
43OBJECTS		= $(HCI1394_OBJS:%=$(OBJS_DIR)/%)
44LINTS		= $(HCI1394_OBJS:%.o=$(LINTS_DIR)/%.ln)
45ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
46CONF_SRCDIR	= $(UTSBASE)/common/io/1394/adapters
47LDFLAGS		+= -dy -Nmisc/s1394
48WARLOCK_OUT     = $(HCI1394_OBJS:%.o=%.ll)
49WARLOCK_OK      = $(MODULE).ok
50
51#
52#	Include common rules.
53#
54include $(UTSBASE)/sparc/Makefile.sparc
55
56#
57#	Define targets
58#
59ALL_TARGET	= $(BINARY) $(SRC_CONFILE)
60LINT_TARGET	= $(MODULE).lint
61INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
62
63#
64#	Overrides
65#
66ALL_BUILDS	= $(ALL_BUILDSONLY64)
67DEF_BUILDS	= $(DEF_BUILDSONLY64)
68CLEANLINTFILES	+= $(LINT32_FILES)
69
70DEBUG_DEFS_DBG32 += -DTNF_DEBUG
71DEBUG_DEFS_DBG64 += -DTNF_DEBUG
72
73#
74# lint pass one enforcement
75#
76CFLAGS += $(CCVERBOSE)
77
78#
79# For now, disable these lint checks; maintainers should endeavor
80# to investigate and remove these for maximum lint coverage.
81# Please do not carry these forward to new Makefiles.
82#
83LINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
84LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
85LINTTAGS	+= -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
86LINTTAGS	+= -erroff=E_STATIC_UNUSED
87LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
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) lint32
108
109clean.lint:	$(CLEAN_LINT_DEPS)
110
111install:	$(INSTALL_DEPS)
112
113#
114#	Include common targets.
115#
116include $(UTSBASE)/sparc/Makefile.targ
117
118#
119#	Defines for local commands.
120#
121WARLOCK		= warlock
122WLCC		= wlcc
123TOUCH		= touch
124SCCS		= sccs
125TEST		= test
126
127#
128#	Warlock targets
129#
130WARLOCK_OBJECTS	= $(HCI1394_OBJS:%.o=%.ll)
131S1394_FILES = $(S1394_OBJS:%.o= -l ../s1394/%.ll)
132
133warlock: $(MODULE).ok
134
135%.wlcmd:
136	$(TEST) -f $@ || $(SCCS) get $@
137
138$(MODULE).ok: $(WARLOCK_OBJECTS) s1394.files warlock_ddi.files hci1394.wlcmd
139	$(WARLOCK) -c hci1394.wlcmd $(WARLOCK_OBJECTS) $(S1394_FILES) \
140		-l ../warlock/ddi_dki_impl.ll
141	$(TOUCH) $@
142
143%.ll: $(UTSBASE)/common/io/1394/adapters/%.c
144	$(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
145
146warlock_ddi.files:
147	@cd ../warlock; pwd; $(MAKE) warlock
148
149s1394.files:
150	@cd ../s1394; pwd; $(MAKE) warlock
151
152