xref: /titanic_44/usr/src/uts/sparc/ibmf/Makefile (revision 1cb6af97c6f66f456d4f726ef056e1ebc0f73305)
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 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
46#
47#	Include common rules.
48#
49include $(UTSBASE)/sparc/Makefile.sparc
50
51#
52#	Define targets
53#
54ALL_TARGET	= $(BINARY)
55LINT_TARGET	= $(MODULE).lint
56INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
57
58#
59#	Overrides
60#
61
62#DEBUG_DEFS_DBG64 += -DTNF_DEBUG
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
82clobber:	$(CLOBBER_DEPS)
83
84lint:		$(LINT_DEPS)
85
86modlintlib:	$(MODLINTLIB_DEPS) lint32
87
88clean.lint:	$(CLEAN_LINT_DEPS)
89
90install:	$(INSTALL_DEPS)
91
92#
93#	Include common targets.
94#
95include $(UTSBASE)/sparc/Makefile.targ
96
97#
98#	Defines for local commands.
99#
100WLCC		= wlcc
101TOUCH		= touch
102WARLOCK		= warlock
103SCS		= sccs
104TEST		= test
105
106#
107#	Warlock targets
108#
109WARLOCK_OBJECTS	= $(IBMF_OBJS:%.o=%.ll)
110IBMF_FILES = $(IBMF_OBJS:%.o= -l ../ibmf/%.ll)
111
112warlock: $(MODULE).ok
113
114%.wlcmd:
115	$(TEST) -f $@ || @$(SCCS) get $@
116
117$(MODULE).ok: $(WARLOCK_OBJECTS) warlock_ddi.files ibmf.wlcmd
118	$(WARLOCK) -c ibmf.wlcmd $(WARLOCK_OBJECTS) $(IBMF_FILES) \
119		-l ../warlock/ddi_dki_impl.ll
120	$(TOUCH) $@
121
122%.ll: $(UTSBASE)/common/io/ib/mgt/ibmf/%.c
123	$(WLCC) $(CPPFLAGS) -DNPROBE -DDEBUG -o $@ $<
124
125warlock_ddi.files:
126	@cd ../warlock; pwd; $(MAKE) warlock
127