xref: /titanic_44/usr/src/uts/sparc/rdsv3/Makefile (revision 5fd03bc0f2e00e7ba02316c2e08f45d52aab15db)
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# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
23#
24#	This makefile drives the production of the rds driver
25#	kernel module.
26#
27#	sparc architecture dependent
28#
29
30#
31#	Path to the base of the uts directory tree (usually /usr/src/uts).
32#
33UTSBASE	= ../..
34
35#
36#	Define the module and object file sets.
37#
38MODULE		= rdsv3
39OBJECTS		= $(RDSV3_OBJS:%=$(OBJS_DIR)/%)
40LINTS		= $(RDSV3_OBJS:%.o=$(LINTS_DIR)/%.ln)
41ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
42CONF_SRCDIR	= $(UTSBASE)/common/io/ib/clients/rdsv3
43WARLOCK_OUT     = $(RDSV3_OBJS:%.o=%.ll)
44WARLOCK_OK	= $(MODULE).ok
45WLCMD_DIR	= $(UTSBASE)/common/io/warlock
46
47#
48#	Include common rules.
49#
50include $(UTSBASE)/sparc/Makefile.sparc
51
52#
53#	Define targets
54#
55ALL_TARGET	= $(BINARY) $(SRC_CONFILE)
56LINT_TARGET	= $(MODULE).lint
57INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
58
59#
60# lint pass one enforcement and OS version
61#
62CFLAGS += $(CCVERBOSE)
63
64CERRWARN	+= -_gcc=-Wno-unused-label
65CERRWARN	+= -_gcc=-Wno-unused-variable
66CERRWARN	+= -_gcc=-Wno-unused-function
67CERRWARN	+= -_gcc=-Wno-uninitialized
68CERRWARN	+= -_gcc=-Wno-parentheses
69
70#
71# Disable these lint checks since some errors suppressed here are
72# in the OFED code, but we'd like to keep it as is as much as possible.
73# Note. maintainers should endeavor to investigate and remove these for
74# maximum lint coverage, but please do not carry these forward to new
75# Makefiles blindly.
76#
77LINTTAGS        += -erroff=E_STATIC_UNUSED
78LINTTAGS        += -erroff=E_CONSTANT_CONDITION
79LINTTAGS	+= -erroff=E_FUNC_VAR_UNUSED
80LINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
81LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
82LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
83LINTTAGS	+= -erroff=E_FUNC_SET_NOT_USED
84LINTTAGS	+= -erroff=E_FUNC_USED_VAR_ARG2
85LINTTAGS	+= -erroff=E_INCONS_ARG_USED2
86
87LDFLAGS += -dy -Nfs/sockfs -Nmisc/ksocket -Ndrv/ip -Nmisc/ibtl -Nmisc/ibcm -Nmisc/sol_ofs
88
89#
90#	Default build targets.
91#
92.KEEP_STATE:
93
94def:		$(DEF_DEPS)
95
96all:		$(ALL_DEPS)
97
98clean:		$(CLEAN_DEPS)
99
100clobber:	$(CLOBBER_DEPS)
101
102lint:		$(LINT_DEPS)
103
104modlintlib:	$(MODLINTLIB_DEPS) lint64
105
106clean.lint:	$(CLEAN_LINT_DEPS)
107
108install:	$(INSTALL_DEPS)
109
110$(ROOTLINK):	$(ROOT_STRMOD_DIR) $(ROOTMODULE)
111	-$(RM) $@; ln $(ROOTMODULE) $@
112
113#
114#	Include common targets.
115#
116include $(UTSBASE)/sparc/Makefile.targ
117
118#
119#       Defines for local commands.
120#
121WARLOCK         = warlock
122WLCC            = wlcc
123TOUCH           = touch
124TEST            = test
125
126warlock: $(WARLOCK_OK) $(WARLOCK_OUT)
127
128$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/rdsv3.wlcmd warlock_ddi.files
129	$(WARLOCK) -c $(WLCMD_DIR)/rdsv3.wlcmd $(WARLOCK_OUT) \
130		-l ../warlock/ddi_dki_impl.ll
131	$(TOUCH) $@
132
133%.ll: $(UTSBASE)/common/io/ib/clients/rdsv3/%.c \
134	$(UTSBASE)/common/sys/ib/clients/rdsv3/ib.h \
135	$(UTSBASE)/common/sys/ib/clients/rdsv3/info.h \
136	$(UTSBASE)/common/sys/ib/clients/rdsv3/loop.h \
137	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdma.h \
138	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdma_transport.h \
139	$(UTSBASE)/common/sys/ib/clients/rdsv3/rds.h \
140	$(UTSBASE)/common/sys/ib/clients/rdsv3/rds_rdma.h \
141	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_atomic.h \
142	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_debug.h \
143	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_impl.h \
144	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_ofed_types.h \
145	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_sc.h
146	$(WLCC)  $(CPPFLAGS) -DDEBUG -Dinline=  -o $@ $<
147
148warlock_ddi.files:
149	@cd ../warlock; pwd; $(MAKE) warlock
150