xref: /titanic_41/usr/src/uts/sparc/daplt/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
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#
23# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#
27
28#
29#	Path to the base of the uts directory tree (usually /usr/src/uts).
30#
31UTSBASE = ../..
32
33#
34#	Define the module and object file sets.
35#
36MODULE		= daplt
37OBJECTS		= $(DAPLT_OBJS:%=$(OBJS_DIR)/%)
38LINTS		= $(DAPLT_OBJS:%.o=$(LINTS_DIR)/%.ln)
39ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
40CONF_SRCDIR	= $(UTSBASE)/common/io/ib/clients/daplt
41LDFLAGS		+= -dy -Nmisc/ibtl -Nmisc/ibcm
42WARLOCK_OUT     = $(DAPLT_OBJS:%.o=%.ll)
43WARLOCK_OK	= $(MODULE).ok
44WLCMD_DIR	= $(UTSBASE)/common/io/warlock
45
46#
47#	Include common rules.
48#
49include $(UTSBASE)/sparc/Makefile.sparc
50
51#
52#	Define targets
53#
54ALL_TARGET	= $(BINARY) $(SRC_CONFILE)
55LINT_TARGET	= $(MODULE).lint
56INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
57
58#
59# path for header files
60#
61INCLUDE_PATH += -I$(UTSBASE)/common/sys/ib/clients/daplt
62
63#
64# lint pass one enforcement
65#
66CFLAGS += $(CCVERBOSE)
67
68#
69#       Overrides.
70#
71ALL_BUILDS      = $(ALL_BUILDSONLY64)
72DEF_BUILDS      = $(DEF_BUILDSONLY64)
73
74#
75# For now, disable these lint checks; maintainers should endeavor
76# to investigate and remove these for maximum lint coverage.
77# Please do not carry these forward to new Makefiles.
78#
79LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
80LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
81LINTTAGS	+= -erroff=E_STATIC_UNUSED
82
83CERRWARN	+= -_gcc=-Wno-parentheses
84CERRWARN	+= -_gcc=-Wno-unused-variable
85CERRWARN	+= -_gcc=-Wno-unused-function
86CERRWARN	+= -_gcc=-Wno-uninitialized
87
88#
89#	Default build targets.
90#
91.KEEP_STATE:
92
93def:		$(DEF_DEPS)
94
95all:		$(ALL_DEPS)
96
97clean:		$(CLEAN_DEPS)
98		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
99
100clobber:	$(CLOBBER_DEPS)
101		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
102
103lint:		$(LINT_DEPS)
104
105modlintlib:	$(MODLINTLIB_DEPS)
106
107clean.lint:	$(CLEAN_LINT_DEPS)
108
109install:	$(INSTALL_DEPS)
110
111#
112#	Include common targets.
113#
114include $(UTSBASE)/sparc/Makefile.targ
115
116#
117#       Defines for local commands.
118#
119WARLOCK         = warlock
120WLCC            = wlcc
121TOUCH           = touch
122TEST            = test
123
124DAPL_FILES = $(DAPL_OBJS:%.o= -l ../daplt/%.ll)
125
126warlock: $(WARLOCK_OK) $(WARLOCK_OUT)
127
128$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/daplt.wlcmd warlock_ddi.files
129	$(WARLOCK) -c $(WLCMD_DIR)/daplt.wlcmd $(WARLOCK_OUT) \
130		-l $(UTSBASE)/sparc/warlock/ddi_dki_impl.ll
131	$(TOUCH) $@
132
133%.ll: $(UTSBASE)/common/io/ib/clients/daplt/%.c \
134	$(UTSBASE)/common/sys/ib/clients/daplt/daplt.h \
135	$(UTSBASE)/common/sys/ib/clients/daplt/daplt_if.h
136	$(WLCC)  $(CPPFLAGS) -DDEBUG -o $@ $<
137
138warlock_ddi.files:
139	@cd $(UTSBASE)/sparc/warlock; pwd; $(MAKE) warlock
140