xref: /titanic_51/usr/src/uts/intel/sol_ofs/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
1c39526b7SPramod Gunjikar#
2c39526b7SPramod Gunjikar# CDDL HEADER START
3c39526b7SPramod Gunjikar#
4c39526b7SPramod Gunjikar# The contents of this file are subject to the terms of the
5c39526b7SPramod Gunjikar# Common Development and Distribution License (the "License").
6c39526b7SPramod Gunjikar# You may not use this file except in compliance with the License.
7c39526b7SPramod Gunjikar#
8c39526b7SPramod Gunjikar# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c39526b7SPramod Gunjikar# or http://www.opensolaris.org/os/licensing.
10c39526b7SPramod Gunjikar# See the License for the specific language governing permissions
11c39526b7SPramod Gunjikar# and limitations under the License.
12c39526b7SPramod Gunjikar#
13c39526b7SPramod Gunjikar# When distributing Covered Code, include this CDDL HEADER in each
14c39526b7SPramod Gunjikar# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c39526b7SPramod Gunjikar# If applicable, add the following below this CDDL HEADER, with the
16c39526b7SPramod Gunjikar# fields enclosed by brackets "[]" replaced with your own identifying
17c39526b7SPramod Gunjikar# information: Portions Copyright [yyyy] [name of copyright owner]
18c39526b7SPramod Gunjikar#
19c39526b7SPramod Gunjikar# CDDL HEADER END
20c39526b7SPramod Gunjikar#
21c39526b7SPramod Gunjikar#
22c39526b7SPramod Gunjikar# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
23c39526b7SPramod Gunjikar#
24c39526b7SPramod Gunjikar#
25c39526b7SPramod Gunjikar
26c39526b7SPramod Gunjikar#
27c39526b7SPramod Gunjikar#	Path to the base of the uts directory tree (usually /usr/src/uts).
28c39526b7SPramod Gunjikar#
29c39526b7SPramod GunjikarUTSBASE	= ../..
30c39526b7SPramod Gunjikar
31c39526b7SPramod Gunjikar#
32c39526b7SPramod Gunjikar#	Define the module and object file sets.
33c39526b7SPramod Gunjikar#
34c39526b7SPramod GunjikarMODULE		= sol_ofs
35c39526b7SPramod GunjikarOBJECTS		= $(SOL_OFS_OBJS:%=$(OBJS_DIR)/%)
36c39526b7SPramod GunjikarLINTS		= $(SOL_OFS_OBJS:%.o=$(LINTS_DIR)/%.ln)
37c39526b7SPramod GunjikarROOTMODULE	= $(ROOT_MISC_DIR)/$(MODULE)
38c39526b7SPramod GunjikarLDFLAGS		+= -dy -Nmisc/ibtl -Nmisc/ibcm
39c39526b7SPramod GunjikarWARLOCK_OUT	= $(SOL_OFS:%.o=%.ll)
40c39526b7SPramod GunjikarWARLOCK_OK	= $(MODULE).ok
41c39526b7SPramod GunjikarWLCMD_DIR	= $(UTSBASE)/common/io/warlock
42c39526b7SPramod Gunjikar#
43c39526b7SPramod Gunjikar#	Include common rules.
44c39526b7SPramod Gunjikar#
45c39526b7SPramod Gunjikarinclude $(UTSBASE)/intel/Makefile.intel
46c39526b7SPramod Gunjikar
47c39526b7SPramod Gunjikar#
48c39526b7SPramod Gunjikar#	Define targets
49c39526b7SPramod Gunjikar#
50c39526b7SPramod GunjikarALL_TARGET	= $(BINARY)
51c39526b7SPramod GunjikarLINT_TARGET	= $(MODULE).lint
52c39526b7SPramod GunjikarINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
53c39526b7SPramod Gunjikar
54c39526b7SPramod Gunjikar#
55c39526b7SPramod Gunjikar# For now, disable these lint checks; maintainers should endeavor
56c39526b7SPramod Gunjikar# to investigate and remove these for maximum lint coverage.
57c39526b7SPramod Gunjikar# Please do not carry these forward to new Makefiles.
58c39526b7SPramod Gunjikar#
59c39526b7SPramod GunjikarLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
60c39526b7SPramod GunjikarLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
61c39526b7SPramod GunjikarLINTTAGS	+= -erroff=E_STATIC_UNUSED
62c39526b7SPramod GunjikarLINTTAGS	+= -erroff=E_CONST_TRUNCATED_BY_ASSIGN
63c39526b7SPramod Gunjikar
64*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
65*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
66*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-type-limits
67*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-variable
68*7014882cSRichard Lowe
69c39526b7SPramod Gunjikar#
70c39526b7SPramod Gunjikar#	Default build targets.
71c39526b7SPramod Gunjikar#
72c39526b7SPramod Gunjikar.KEEP_STATE:
73c39526b7SPramod Gunjikar
74c39526b7SPramod Gunjikardef:		$(DEF_DEPS)
75c39526b7SPramod Gunjikar
76c39526b7SPramod Gunjikarall:		$(ALL_DEPS)
77c39526b7SPramod Gunjikar
78c39526b7SPramod Gunjikarclean:		$(CLEAN_DEPS)
79c39526b7SPramod Gunjikar		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
80c39526b7SPramod Gunjikar
81c39526b7SPramod Gunjikarclobber:	$(CLOBBER_DEPS)
82c39526b7SPramod Gunjikar		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
83c39526b7SPramod Gunjikar
84c39526b7SPramod Gunjikarlint:		$(LINT_DEPS)
85c39526b7SPramod Gunjikar
86c39526b7SPramod Gunjikarmodlintlib:	$(MODLINTLIB_DEPS)
87c39526b7SPramod Gunjikar
88c39526b7SPramod Gunjikarclean.lint:	$(CLEAN_LINT_DEPS)
89c39526b7SPramod Gunjikar
90c39526b7SPramod Gunjikarinstall:	$(INSTALL_DEPS)
91c39526b7SPramod Gunjikar
92c39526b7SPramod Gunjikar#
93c39526b7SPramod Gunjikar#	Include common targets.
94c39526b7SPramod Gunjikar#
95c39526b7SPramod Gunjikarinclude $(UTSBASE)/intel/Makefile.targ
96c39526b7SPramod Gunjikar
97c39526b7SPramod Gunjikar#
98c39526b7SPramod Gunjikar#       Defines for local commands.
99c39526b7SPramod Gunjikar#
100c39526b7SPramod GunjikarWARLOCK         = warlock
101c39526b7SPramod GunjikarWLCC            = wlcc
102c39526b7SPramod GunjikarTOUCH           = touch
103c39526b7SPramod GunjikarTEST            = test
104c39526b7SPramod Gunjikar
105c39526b7SPramod Gunjikarwarlock: $(WARLOCK_OK)
106c39526b7SPramod Gunjikar
107c39526b7SPramod Gunjikar$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/sol_ofs.wlcmd warlock_ddi.files
108c39526b7SPramod Gunjikar	$(WARLOCK) -c $(WLCMD_DIR)/sol_ofs.wlcmd $(WARLOCK_OUT) \
109c39526b7SPramod Gunjikar		-l ../warlock/ddi_dki_impl.ll
110c39526b7SPramod Gunjikar	$(TOUCH) $@
111c39526b7SPramod Gunjikar
112c39526b7SPramod Gunjikar%.ll: $(UTSBASE)/common/io/ib/clients/of/sol_ofs/%.c \
113c39526b7SPramod Gunjikar	$(UTSBASE)/common/sys/ib/clients/of/sol_ofs/sol_uverbs.h
114c39526b7SPramod Gunjikar	$(WLCC)  $(CPPFLAGS) -DDEBUG -o $@ $<
115c39526b7SPramod Gunjikar
116c39526b7SPramod Gunjikarwarlock_ddi.files:
117c39526b7SPramod Gunjikar	@cd ../warlock; pwd; $(MAKE) warlock
118