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