xref: /titanic_41/usr/src/uts/sparc/ibmf/Makefile (revision 80ab886d233f514d54c2a6bdeb9fdfd951bd6881)
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 2005 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 ibmf 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		= ibmf
42OBJECTS		= $(IBMF_OBJS:%=$(OBJS_DIR)/%)
43LINTS		= $(IBMF_OBJS:%.o=$(LINTS_DIR)/%.ln)
44ROOTMODULE	= $(ROOT_MISC_DIR)/$(MODULE)
45LDFLAGS		+= -dy -Nmisc/ibtl
46WARLOCK_OUT     = $(IBMF_OBJS:%.o=%.ll)
47WARLOCK_OK      = $(MODULE).ok
48
49#
50#	Include common rules.
51#
52include $(UTSBASE)/sparc/Makefile.sparc
53
54#
55#	Define targets
56#
57ALL_TARGET	= $(BINARY)
58LINT_TARGET	= $(MODULE).lint
59INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
60
61#
62#	Overrides
63#
64
65#DEBUG_DEFS_DBG64 += -DTNF_DEBUG
66ALL_BUILDS	= $(ALL_BUILDSONLY64)
67DEF_BUILDS	= $(DEF_BUILDSONLY64)
68
69#
70# lint pass one enforcement
71#
72CFLAGS += $(CCVERBOSE)
73
74#
75#	Default build targets.
76#
77.KEEP_STATE:
78
79def:		$(DEF_DEPS)
80
81all:		$(ALL_DEPS)
82
83clean:		$(CLEAN_DEPS); \
84		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
85
86clobber:	$(CLOBBER_DEPS); \
87		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
88
89lint:		$(LINT_DEPS)
90
91modlintlib:	$(MODLINTLIB_DEPS) lint32
92
93clean.lint:	$(CLEAN_LINT_DEPS)
94
95install:	$(INSTALL_DEPS)
96
97#
98#	Include common targets.
99#
100include $(UTSBASE)/sparc/Makefile.targ
101
102#
103#	Defines for local commands.
104#
105WLCC		= wlcc
106TOUCH		= touch
107WARLOCK		= warlock
108SCS		= sccs
109TEST		= test
110
111#
112#	Warlock targets
113#
114WARLOCK_OBJECTS	= $(IBMF_OBJS:%.o=%.ll)
115IBMF_FILES = $(IBMF_OBJS:%.o= -l ../ibmf/%.ll)
116
117warlock: $(MODULE).ok
118
119%.wlcmd:
120	$(TEST) -f $@ || @$(SCCS) get $@
121
122$(MODULE).ok: $(WARLOCK_OBJECTS) warlock_ddi.files ibmf.wlcmd
123	$(WARLOCK) -c ibmf.wlcmd $(WARLOCK_OBJECTS) $(IBMF_FILES) \
124		-l ../warlock/ddi_dki_impl.ll
125	$(TOUCH) $@
126
127%.ll: $(UTSBASE)/common/io/ib/mgt/ibmf/%.c
128	$(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
129
130warlock_ddi.files:
131	@cd ../warlock; pwd; $(MAKE) warlock
132