xref: /titanic_44/usr/src/uts/sparc/daplt/Makefile (revision 34f9b3eef6fdadbda0a846aa4d68691ac40eace5)
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
83#
84#	Default build targets.
85#
86.KEEP_STATE:
87
88def:		$(DEF_DEPS)
89
90all:		$(ALL_DEPS)
91
92clean:		$(CLEAN_DEPS)
93		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
94
95clobber:	$(CLOBBER_DEPS)
96		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
97
98lint:		$(LINT_DEPS)
99
100modlintlib:	$(MODLINTLIB_DEPS)
101
102clean.lint:	$(CLEAN_LINT_DEPS)
103
104install:	$(INSTALL_DEPS)
105
106#
107#	Include common targets.
108#
109include $(UTSBASE)/sparc/Makefile.targ
110
111#
112#       Defines for local commands.
113#
114WARLOCK         = warlock
115WLCC            = wlcc
116TOUCH           = touch
117TEST            = test
118
119DAPL_FILES = $(DAPL_OBJS:%.o= -l ../daplt/%.ll)
120
121warlock: $(WARLOCK_OK) $(WARLOCK_OUT)
122
123$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/daplt.wlcmd warlock_ddi.files
124	$(WARLOCK) -c $(WLCMD_DIR)/daplt.wlcmd $(WARLOCK_OUT) \
125		-l $(UTSBASE)/sparc/warlock/ddi_dki_impl.ll
126	$(TOUCH) $@
127
128%.ll: $(UTSBASE)/common/io/ib/clients/daplt/%.c \
129	$(UTSBASE)/common/sys/ib/clients/daplt/daplt.h \
130	$(UTSBASE)/common/sys/ib/clients/daplt/daplt_if.h
131	$(WLCC)  $(CPPFLAGS) -DDEBUG -o $@ $<
132
133warlock_ddi.files:
134	@cd $(UTSBASE)/sparc/warlock; pwd; $(MAKE) warlock
135