xref: /titanic_41/usr/src/uts/sparc/rdsv3/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
1c0dd49bdSEiji Ota#
2c0dd49bdSEiji Ota# CDDL HEADER START
3c0dd49bdSEiji Ota#
4c0dd49bdSEiji Ota# The contents of this file are subject to the terms of the
5c0dd49bdSEiji Ota# Common Development and Distribution License (the "License").
6c0dd49bdSEiji Ota# You may not use this file except in compliance with the License.
7c0dd49bdSEiji Ota#
8c0dd49bdSEiji Ota# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c0dd49bdSEiji Ota# or http://www.opensolaris.org/os/licensing.
10c0dd49bdSEiji Ota# See the License for the specific language governing permissions
11c0dd49bdSEiji Ota# and limitations under the License.
12c0dd49bdSEiji Ota#
13c0dd49bdSEiji Ota# When distributing Covered Code, include this CDDL HEADER in each
14c0dd49bdSEiji Ota# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c0dd49bdSEiji Ota# If applicable, add the following below this CDDL HEADER, with the
16c0dd49bdSEiji Ota# fields enclosed by brackets "[]" replaced with your own identifying
17c0dd49bdSEiji Ota# information: Portions Copyright [yyyy] [name of copyright owner]
18c0dd49bdSEiji Ota#
19c0dd49bdSEiji Ota# CDDL HEADER END
20c0dd49bdSEiji Ota#
21c0dd49bdSEiji Ota#
22c0dd49bdSEiji Ota# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
23c0dd49bdSEiji Ota#
24c0dd49bdSEiji Ota#	This makefile drives the production of the rds driver
25c0dd49bdSEiji Ota#	kernel module.
26c0dd49bdSEiji Ota#
27c0dd49bdSEiji Ota#	sparc architecture dependent
28c0dd49bdSEiji Ota#
29c0dd49bdSEiji Ota
30c0dd49bdSEiji Ota#
31c0dd49bdSEiji Ota#	Path to the base of the uts directory tree (usually /usr/src/uts).
32c0dd49bdSEiji Ota#
33c0dd49bdSEiji OtaUTSBASE	= ../..
34c0dd49bdSEiji Ota
35c0dd49bdSEiji Ota#
36c0dd49bdSEiji Ota#	Define the module and object file sets.
37c0dd49bdSEiji Ota#
38c0dd49bdSEiji OtaMODULE		= rdsv3
39c0dd49bdSEiji OtaOBJECTS		= $(RDSV3_OBJS:%=$(OBJS_DIR)/%)
40c0dd49bdSEiji OtaLINTS		= $(RDSV3_OBJS:%.o=$(LINTS_DIR)/%.ln)
41c0dd49bdSEiji OtaROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
42c0dd49bdSEiji OtaCONF_SRCDIR	= $(UTSBASE)/common/io/ib/clients/rdsv3
43c0dd49bdSEiji OtaWARLOCK_OUT     = $(RDSV3_OBJS:%.o=%.ll)
44c0dd49bdSEiji OtaWARLOCK_OK	= $(MODULE).ok
45c0dd49bdSEiji OtaWLCMD_DIR	= $(UTSBASE)/common/io/warlock
46c0dd49bdSEiji Ota
47c0dd49bdSEiji Ota#
48c0dd49bdSEiji Ota#	Include common rules.
49c0dd49bdSEiji Ota#
50c0dd49bdSEiji Otainclude $(UTSBASE)/sparc/Makefile.sparc
51c0dd49bdSEiji Ota
52c0dd49bdSEiji Ota#
53c0dd49bdSEiji Ota#	Define targets
54c0dd49bdSEiji Ota#
55c0dd49bdSEiji OtaALL_TARGET	= $(BINARY) $(SRC_CONFILE)
56c0dd49bdSEiji OtaLINT_TARGET	= $(MODULE).lint
57c0dd49bdSEiji OtaINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
58c0dd49bdSEiji Ota
59c0dd49bdSEiji Ota#
60c0dd49bdSEiji Ota# lint pass one enforcement and OS version
61c0dd49bdSEiji Ota#
62c0dd49bdSEiji OtaCFLAGS += $(CCVERBOSE)
63c0dd49bdSEiji Ota
64*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-label
65*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-variable
66*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-function
67*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
68*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
69*7014882cSRichard Lowe
70c0dd49bdSEiji Ota#
71c0dd49bdSEiji Ota# Disable these lint checks since some errors suppressed here are
72c0dd49bdSEiji Ota# in the OFED code, but we'd like to keep it as is as much as possible.
73c0dd49bdSEiji Ota# Note. maintainers should endeavor to investigate and remove these for
74c0dd49bdSEiji Ota# maximum lint coverage, but please do not carry these forward to new
75c0dd49bdSEiji Ota# Makefiles blindly.
76c0dd49bdSEiji Ota#
77c0dd49bdSEiji OtaLINTTAGS        += -erroff=E_STATIC_UNUSED
78c0dd49bdSEiji OtaLINTTAGS        += -erroff=E_CONSTANT_CONDITION
79c0dd49bdSEiji OtaLINTTAGS	+= -erroff=E_FUNC_VAR_UNUSED
80c0dd49bdSEiji OtaLINTTAGS	+= -erroff=E_SUSPICIOUS_COMPARISON
81c0dd49bdSEiji OtaLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
82c0dd49bdSEiji OtaLINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
83c0dd49bdSEiji OtaLINTTAGS	+= -erroff=E_FUNC_SET_NOT_USED
84c0dd49bdSEiji OtaLINTTAGS	+= -erroff=E_FUNC_USED_VAR_ARG2
85c0dd49bdSEiji OtaLINTTAGS	+= -erroff=E_INCONS_ARG_USED2
86c0dd49bdSEiji Ota
87c0dd49bdSEiji OtaLDFLAGS += -dy -Nfs/sockfs -Nmisc/ksocket -Ndrv/ip -Nmisc/ibtl -Nmisc/ibcm -Nmisc/sol_ofs
88c0dd49bdSEiji Ota
89c0dd49bdSEiji Ota#
90c0dd49bdSEiji Ota#	Default build targets.
91c0dd49bdSEiji Ota#
92c0dd49bdSEiji Ota.KEEP_STATE:
93c0dd49bdSEiji Ota
94c0dd49bdSEiji Otadef:		$(DEF_DEPS)
95c0dd49bdSEiji Ota
96c0dd49bdSEiji Otaall:		$(ALL_DEPS)
97c0dd49bdSEiji Ota
98c0dd49bdSEiji Otaclean:		$(CLEAN_DEPS)
99c0dd49bdSEiji Ota
100c0dd49bdSEiji Otaclobber:	$(CLOBBER_DEPS)
101c0dd49bdSEiji Ota
102c0dd49bdSEiji Otalint:		$(LINT_DEPS)
103c0dd49bdSEiji Ota
104c0dd49bdSEiji Otamodlintlib:	$(MODLINTLIB_DEPS) lint64
105c0dd49bdSEiji Ota
106c0dd49bdSEiji Otaclean.lint:	$(CLEAN_LINT_DEPS)
107c0dd49bdSEiji Ota
108c0dd49bdSEiji Otainstall:	$(INSTALL_DEPS)
109c0dd49bdSEiji Ota
110c0dd49bdSEiji Ota$(ROOTLINK):	$(ROOT_STRMOD_DIR) $(ROOTMODULE)
111c0dd49bdSEiji Ota	-$(RM) $@; ln $(ROOTMODULE) $@
112c0dd49bdSEiji Ota
113c0dd49bdSEiji Ota#
114c0dd49bdSEiji Ota#	Include common targets.
115c0dd49bdSEiji Ota#
116c0dd49bdSEiji Otainclude $(UTSBASE)/sparc/Makefile.targ
117c0dd49bdSEiji Ota
118c0dd49bdSEiji Ota#
119c0dd49bdSEiji Ota#       Defines for local commands.
120c0dd49bdSEiji Ota#
121c0dd49bdSEiji OtaWARLOCK         = warlock
122c0dd49bdSEiji OtaWLCC            = wlcc
123c0dd49bdSEiji OtaTOUCH           = touch
124c0dd49bdSEiji OtaTEST            = test
125c0dd49bdSEiji Ota
126c0dd49bdSEiji Otawarlock: $(WARLOCK_OK) $(WARLOCK_OUT)
127c0dd49bdSEiji Ota
128c0dd49bdSEiji Ota$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/rdsv3.wlcmd warlock_ddi.files
129c0dd49bdSEiji Ota	$(WARLOCK) -c $(WLCMD_DIR)/rdsv3.wlcmd $(WARLOCK_OUT) \
130c0dd49bdSEiji Ota		-l ../warlock/ddi_dki_impl.ll
131c0dd49bdSEiji Ota	$(TOUCH) $@
132c0dd49bdSEiji Ota
133c0dd49bdSEiji Ota%.ll: $(UTSBASE)/common/io/ib/clients/rdsv3/%.c \
134c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/ib.h \
135c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/info.h \
136c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/loop.h \
137c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdma.h \
138c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdma_transport.h \
139c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/rds.h \
140c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/rds_rdma.h \
141c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_atomic.h \
142c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_debug.h \
143c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_impl.h \
144c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_ofed_types.h \
145c0dd49bdSEiji Ota	$(UTSBASE)/common/sys/ib/clients/rdsv3/rdsv3_sc.h
146c0dd49bdSEiji Ota	$(WLCC)  $(CPPFLAGS) -DDEBUG -Dinline=  -o $@ $<
147c0dd49bdSEiji Ota
148c0dd49bdSEiji Otawarlock_ddi.files:
149c0dd49bdSEiji Ota	@cd ../warlock; pwd; $(MAKE) warlock
150