xref: /titanic_50/usr/src/uts/sparc/ibtl/Makefile (revision 554ff184129088135ad2643c1c9832174a17be88)
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#	This makefile drives the production of the ibtl kernel module.
29#
30#	sparc architecture dependent
31#
32
33#
34#	Path to the base of the uts directory tree (usually /usr/src/uts).
35#
36UTSBASE	= ../..
37
38#
39#	Define the module and object file sets.
40#
41MODULE		= ibtl
42OBJECTS		= $(IBTL_OBJS:%=$(OBJS_DIR)/%)
43LINTS		= $(IBTL_OBJS:%.o=$(LINTS_DIR)/%.ln)
44ROOTMODULE	= $(ROOT_MISC_DIR)/$(MODULE)
45WARLOCK_OBJS    = $(IBTL_OBJS:%.o=%.ll)
46WARLOCK_OK      = $(MODULE).ok
47
48#
49#	Include common rules.
50#
51include $(UTSBASE)/sparc/Makefile.sparc
52
53#
54#	Define targets
55#
56ALL_TARGET	= $(BINARY)
57LINT_TARGET	= $(MODULE).lint
58INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
59
60#
61#	Overrides.
62#
63ALL_BUILDS	= $(ALL_BUILDSONLY64)
64DEF_BUILDS	= $(DEF_BUILDSONLY64)
65
66#
67# lint pass one enforcement
68#
69CFLAGS += $(CCVERBOSE)
70
71#
72#	Default build targets.
73#
74.KEEP_STATE:
75
76def:		$(DEF_DEPS)
77
78all:		$(ALL_DEPS)
79
80clean:		$(CLEAN_DEPS); \
81		$(RM) $(WARLOCK_OBJS) $(WARLOCK_OK)
82
83clobber:	$(CLOBBER_DEPS); \
84		$(RM) $(WARLOCK_OBJS) $(WARLOCK_OK)
85
86lint:		$(LINT_DEPS)
87
88modlintlib:	$(MODLINTLIB_DEPS) lint32
89
90clean.lint:	$(CLEAN_LINT_DEPS)
91
92install:	$(INSTALL_DEPS)
93
94#
95#	Include common targets.
96#
97include $(UTSBASE)/sparc/Makefile.targ
98
99#
100#       Defines for local commands.
101#
102WARLOCK         = warlock
103WLCC            = wlcc
104TOUCH           = touch
105SCCS            = sccs
106TEST            = test
107
108warlock: $(MODULE).ok
109
110%.wlcmd:
111	$(TEST) -f $@ || $(SCCS) get $@
112
113$(MODULE).ok: $(WARLOCK_OBJS) warlock_ddi.files ibtl.wlcmd
114	$(WARLOCK) -c ./ibtl.wlcmd $(WARLOCK_OBJS) -l ../warlock/ddi_dki_impl.ll
115	$(TOUCH) $@
116
117%.ll: $(UTSBASE)/common/io/ib/ibtl/%.c
118	$(WLCC)  $(CPPFLAGS) -DDEBUG -o $@ $<
119
120warlock_ddi.files:
121	@cd ../warlock; pwd; $(MAKE) warlock
122