xref: /titanic_51/usr/src/uts/sparc/daplt/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
19e39c5baSBill Taylor#
29e39c5baSBill Taylor# CDDL HEADER START
39e39c5baSBill Taylor#
49e39c5baSBill Taylor# The contents of this file are subject to the terms of the
59e39c5baSBill Taylor# Common Development and Distribution License (the "License").
69e39c5baSBill Taylor# You may not use this file except in compliance with the License.
79e39c5baSBill Taylor#
89e39c5baSBill Taylor# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
99e39c5baSBill Taylor# or http://www.opensolaris.org/os/licensing.
109e39c5baSBill Taylor# See the License for the specific language governing permissions
119e39c5baSBill Taylor# and limitations under the License.
129e39c5baSBill Taylor#
139e39c5baSBill Taylor# When distributing Covered Code, include this CDDL HEADER in each
149e39c5baSBill Taylor# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
159e39c5baSBill Taylor# If applicable, add the following below this CDDL HEADER, with the
169e39c5baSBill Taylor# fields enclosed by brackets "[]" replaced with your own identifying
179e39c5baSBill Taylor# information: Portions Copyright [yyyy] [name of copyright owner]
189e39c5baSBill Taylor#
199e39c5baSBill Taylor# CDDL HEADER END
209e39c5baSBill Taylor#
219e39c5baSBill Taylor
229e39c5baSBill Taylor#
239e39c5baSBill Taylor# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
249e39c5baSBill Taylor# Use is subject to license terms.
259e39c5baSBill Taylor#
269e39c5baSBill Taylor#
279e39c5baSBill Taylor
289e39c5baSBill Taylor#
299e39c5baSBill Taylor#	Path to the base of the uts directory tree (usually /usr/src/uts).
309e39c5baSBill Taylor#
319e39c5baSBill TaylorUTSBASE = ../..
329e39c5baSBill Taylor
339e39c5baSBill Taylor#
349e39c5baSBill Taylor#	Define the module and object file sets.
359e39c5baSBill Taylor#
369e39c5baSBill TaylorMODULE		= daplt
379e39c5baSBill TaylorOBJECTS		= $(DAPLT_OBJS:%=$(OBJS_DIR)/%)
389e39c5baSBill TaylorLINTS		= $(DAPLT_OBJS:%.o=$(LINTS_DIR)/%.ln)
399e39c5baSBill TaylorROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
409e39c5baSBill TaylorCONF_SRCDIR	= $(UTSBASE)/common/io/ib/clients/daplt
419e39c5baSBill TaylorLDFLAGS		+= -dy -Nmisc/ibtl -Nmisc/ibcm
429e39c5baSBill TaylorWARLOCK_OUT     = $(DAPLT_OBJS:%.o=%.ll)
439e39c5baSBill TaylorWARLOCK_OK	= $(MODULE).ok
449e39c5baSBill TaylorWLCMD_DIR	= $(UTSBASE)/common/io/warlock
459e39c5baSBill Taylor
469e39c5baSBill Taylor#
479e39c5baSBill Taylor#	Include common rules.
489e39c5baSBill Taylor#
499e39c5baSBill Taylorinclude $(UTSBASE)/sparc/Makefile.sparc
509e39c5baSBill Taylor
519e39c5baSBill Taylor#
529e39c5baSBill Taylor#	Define targets
539e39c5baSBill Taylor#
549e39c5baSBill TaylorALL_TARGET	= $(BINARY) $(SRC_CONFILE)
559e39c5baSBill TaylorLINT_TARGET	= $(MODULE).lint
569e39c5baSBill TaylorINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
579e39c5baSBill Taylor
589e39c5baSBill Taylor#
599e39c5baSBill Taylor# path for header files
609e39c5baSBill Taylor#
619e39c5baSBill TaylorINCLUDE_PATH += -I$(UTSBASE)/common/sys/ib/clients/daplt
629e39c5baSBill Taylor
639e39c5baSBill Taylor#
649e39c5baSBill Taylor# lint pass one enforcement
659e39c5baSBill Taylor#
669e39c5baSBill TaylorCFLAGS += $(CCVERBOSE)
679e39c5baSBill Taylor
689e39c5baSBill Taylor#
699e39c5baSBill Taylor#       Overrides.
709e39c5baSBill Taylor#
719e39c5baSBill TaylorALL_BUILDS      = $(ALL_BUILDSONLY64)
729e39c5baSBill TaylorDEF_BUILDS      = $(DEF_BUILDSONLY64)
739e39c5baSBill Taylor
749e39c5baSBill Taylor#
759e39c5baSBill Taylor# For now, disable these lint checks; maintainers should endeavor
769e39c5baSBill Taylor# to investigate and remove these for maximum lint coverage.
779e39c5baSBill Taylor# Please do not carry these forward to new Makefiles.
789e39c5baSBill Taylor#
799e39c5baSBill TaylorLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
809e39c5baSBill TaylorLINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
819e39c5baSBill TaylorLINTTAGS	+= -erroff=E_STATIC_UNUSED
829e39c5baSBill Taylor
83*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
84*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-variable
85*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-function
86*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
87*7014882cSRichard Lowe
889e39c5baSBill Taylor#
899e39c5baSBill Taylor#	Default build targets.
909e39c5baSBill Taylor#
919e39c5baSBill Taylor.KEEP_STATE:
929e39c5baSBill Taylor
939e39c5baSBill Taylordef:		$(DEF_DEPS)
949e39c5baSBill Taylor
959e39c5baSBill Taylorall:		$(ALL_DEPS)
969e39c5baSBill Taylor
979e39c5baSBill Taylorclean:		$(CLEAN_DEPS)
989e39c5baSBill Taylor		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
999e39c5baSBill Taylor
1009e39c5baSBill Taylorclobber:	$(CLOBBER_DEPS)
1019e39c5baSBill Taylor		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
1029e39c5baSBill Taylor
1039e39c5baSBill Taylorlint:		$(LINT_DEPS)
1049e39c5baSBill Taylor
1059e39c5baSBill Taylormodlintlib:	$(MODLINTLIB_DEPS)
1069e39c5baSBill Taylor
1079e39c5baSBill Taylorclean.lint:	$(CLEAN_LINT_DEPS)
1089e39c5baSBill Taylor
1099e39c5baSBill Taylorinstall:	$(INSTALL_DEPS)
1109e39c5baSBill Taylor
1119e39c5baSBill Taylor#
1129e39c5baSBill Taylor#	Include common targets.
1139e39c5baSBill Taylor#
1149e39c5baSBill Taylorinclude $(UTSBASE)/sparc/Makefile.targ
1159e39c5baSBill Taylor
1169e39c5baSBill Taylor#
1179e39c5baSBill Taylor#       Defines for local commands.
1189e39c5baSBill Taylor#
1199e39c5baSBill TaylorWARLOCK         = warlock
1209e39c5baSBill TaylorWLCC            = wlcc
1219e39c5baSBill TaylorTOUCH           = touch
1229e39c5baSBill TaylorTEST            = test
1239e39c5baSBill Taylor
1249e39c5baSBill TaylorDAPL_FILES = $(DAPL_OBJS:%.o= -l ../daplt/%.ll)
1259e39c5baSBill Taylor
1269e39c5baSBill Taylorwarlock: $(WARLOCK_OK) $(WARLOCK_OUT)
1279e39c5baSBill Taylor
1289e39c5baSBill Taylor$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/daplt.wlcmd warlock_ddi.files
1299e39c5baSBill Taylor	$(WARLOCK) -c $(WLCMD_DIR)/daplt.wlcmd $(WARLOCK_OUT) \
1309e39c5baSBill Taylor		-l $(UTSBASE)/sparc/warlock/ddi_dki_impl.ll
1319e39c5baSBill Taylor	$(TOUCH) $@
1329e39c5baSBill Taylor
1339e39c5baSBill Taylor%.ll: $(UTSBASE)/common/io/ib/clients/daplt/%.c \
1349e39c5baSBill Taylor	$(UTSBASE)/common/sys/ib/clients/daplt/daplt.h \
1359e39c5baSBill Taylor	$(UTSBASE)/common/sys/ib/clients/daplt/daplt_if.h
1369e39c5baSBill Taylor	$(WLCC)  $(CPPFLAGS) -DDEBUG -o $@ $<
1379e39c5baSBill Taylor
1389e39c5baSBill Taylorwarlock_ddi.files:
1399e39c5baSBill Taylor	@cd $(UTSBASE)/sparc/warlock; pwd; $(MAKE) warlock
140