xref: /titanic_41/usr/src/uts/sparc/av1394/Makefile (revision ba2e4443695ee6a6f420a35cd4fc3d3346d22932)
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		= av1394
38OBJECTS		= $(AV1394_OBJS:%=$(OBJS_DIR)/%)
39LINTS		= $(AV1394_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
61DEBUG_DEFS_DBG32	+= -DTNF_DEBUG
62DEBUG_DEFS_DBG64	+= -DTNF_DEBUG
63
64#
65# lint pass one enforcement
66#
67CFLAGS += $(CCVERBOSE)
68
69#
70# depends on misc/s1394
71LDFLAGS		+= -dy -Nmisc/s1394
72
73#	Default build targets.
74#
75.KEEP_STATE:
76
77def:		$(DEF_DEPS)
78
79all:		$(ALL_DEPS)
80
81clean:		$(CLEAN_DEPS)
82
83clobber:	$(CLOBBER_DEPS)
84
85lint:		$(LINT_DEPS)
86
87modlintlib:	$(MODLINTLIB_DEPS) lint32
88
89clean.lint:	$(CLEAN_LINT_DEPS)
90
91install:	$(INSTALL_DEPS)
92
93#
94#	Include common targets.
95#
96include $(UTSBASE)/sparc/Makefile.targ
97
98#
99#	Defines for local commands.
100#
101WARLOCK		= warlock
102WLCC		= wlcc
103TOUCH		= touch
104SCCS		= sccs
105TEST		= test
106
107#
108#	Warlock targets
109#
110WARLOCK_OBJECTS	= $(AV1394_OBJS:%.o=%.ll)
111
112warlock: $(MODULE).ok
113
114%.wlcmd:
115	$(TEST) -f $@ || $(SCCS) get $@
116
117$(MODULE).ok: $(WARLOCK_OBJECTS) warlock_ddi.files av1394.wlcmd
118	$(WARLOCK) -c av1394.wlcmd $(WARLOCK_OBJECTS) \
119		-l ../warlock/ddi_dki_impl.ll
120	$(TOUCH) $@
121
122%.ll: $(UTSBASE)/common/io/1394/targets/av1394/%.c
123	$(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
124
125warlock_ddi.files:
126	@cd ../warlock; pwd; $(MAKE) warlock
127