xref: /titanic_50/usr/src/uts/sparc/ibp/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
11cfa752fSRamaswamy Tummala#
21cfa752fSRamaswamy Tummala# CDDL HEADER START
31cfa752fSRamaswamy Tummala#
41cfa752fSRamaswamy Tummala# The contents of this file are subject to the terms of the
51cfa752fSRamaswamy Tummala# Common Development and Distribution License (the "License").
61cfa752fSRamaswamy Tummala# You may not use this file except in compliance with the License.
71cfa752fSRamaswamy Tummala#
81cfa752fSRamaswamy Tummala# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
91cfa752fSRamaswamy Tummala# or http://www.opensolaris.org/os/licensing.
101cfa752fSRamaswamy Tummala# See the License for the specific language governing permissions
111cfa752fSRamaswamy Tummala# and limitations under the License.
121cfa752fSRamaswamy Tummala#
131cfa752fSRamaswamy Tummala# When distributing Covered Code, include this CDDL HEADER in each
141cfa752fSRamaswamy Tummala# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
151cfa752fSRamaswamy Tummala# If applicable, add the following below this CDDL HEADER, with the
161cfa752fSRamaswamy Tummala# fields enclosed by brackets "[]" replaced with your own identifying
171cfa752fSRamaswamy Tummala# information: Portions Copyright [yyyy] [name of copyright owner]
181cfa752fSRamaswamy Tummala#
191cfa752fSRamaswamy Tummala# CDDL HEADER END
201cfa752fSRamaswamy Tummala#
211cfa752fSRamaswamy Tummala#
221cfa752fSRamaswamy Tummala# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
231cfa752fSRamaswamy Tummala#
241cfa752fSRamaswamy Tummala#
251cfa752fSRamaswamy Tummala
261cfa752fSRamaswamy Tummala#
271cfa752fSRamaswamy Tummala#	Path to the base of the uts directory tree (usually /usr/src/uts).
281cfa752fSRamaswamy Tummala#
291cfa752fSRamaswamy TummalaUTSBASE	= ../..
301cfa752fSRamaswamy Tummala
311cfa752fSRamaswamy Tummala#
321cfa752fSRamaswamy Tummala#	Define the module and object file sets.
331cfa752fSRamaswamy Tummala#
341cfa752fSRamaswamy TummalaMODULE		= ibp
351cfa752fSRamaswamy TummalaOBJECTS		= $(IBD_OBJS:%=$(OBJS_DIR)/%)
361cfa752fSRamaswamy TummalaLINTS		= $(IBD_OBJS:%.o=$(LINTS_DIR)/%.ln)
371cfa752fSRamaswamy TummalaROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
381cfa752fSRamaswamy TummalaCONF_SRCDIR	= $(UTSBASE)/common/io/ib/clients/ibd
391cfa752fSRamaswamy TummalaLDFLAGS		+= -dy -Nmisc/mac -Nmisc/ibtl -Nmisc/ibcm -Nmisc/ibmf -Ndrv/ip \
40b27516f5Sagiri		-Nmisc/dls -Ndrv/dld
411cfa752fSRamaswamy TummalaWARLOCK_OUT     = $(IBD_OBJS:%.o=%.ll)
421cfa752fSRamaswamy TummalaWARLOCK_OK	= $(MODULE).ok
431cfa752fSRamaswamy TummalaWLCMD_DIR	= $(UTSBASE)/common/io/warlock
441cfa752fSRamaswamy Tummala#
451cfa752fSRamaswamy Tummala#	Include common rules.
461cfa752fSRamaswamy Tummala#
471cfa752fSRamaswamy Tummalainclude $(UTSBASE)/sparc/Makefile.sparc
481cfa752fSRamaswamy Tummala
491cfa752fSRamaswamy Tummala#
501cfa752fSRamaswamy Tummala#	Define targets
511cfa752fSRamaswamy Tummala#
521cfa752fSRamaswamy TummalaALL_TARGET	= $(BINARY) $(SRC_CONFFILE)
531cfa752fSRamaswamy TummalaLINT_TARGET	= $(MODULE).lint
541cfa752fSRamaswamy TummalaINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
551cfa752fSRamaswamy Tummala
561cfa752fSRamaswamy Tummala#
571cfa752fSRamaswamy Tummala#	Overrides
581cfa752fSRamaswamy Tummala#
591cfa752fSRamaswamy TummalaALL_BUILDS	= $(ALL_BUILDSONLY64)
601cfa752fSRamaswamy TummalaDEF_BUILDS	= $(DEF_BUILDSONLY64)
611cfa752fSRamaswamy TummalaCLEANLINTFILES	+= $(LINT32_FILES)
621cfa752fSRamaswamy Tummala
631cfa752fSRamaswamy Tummala#
641cfa752fSRamaswamy Tummala# lint pass one enforcement
651cfa752fSRamaswamy Tummala#
661cfa752fSRamaswamy TummalaCFLAGS += $(CCVERBOSE)
671cfa752fSRamaswamy Tummala
681cfa752fSRamaswamy Tummala#
691cfa752fSRamaswamy Tummala# For now, disable these lint checks; maintainers should endeavor
701cfa752fSRamaswamy Tummala# to investigate and remove these for maximum lint coverage.
711cfa752fSRamaswamy Tummala# Please do not carry these forward to new Makefiles.
721cfa752fSRamaswamy Tummala#
731cfa752fSRamaswamy TummalaLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
741cfa752fSRamaswamy TummalaLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
751cfa752fSRamaswamy Tummala
76*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
77*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-switch
78*7014882cSRichard Lowe
791cfa752fSRamaswamy Tummala#
801cfa752fSRamaswamy Tummala#	Default build targets.
811cfa752fSRamaswamy Tummala#
821cfa752fSRamaswamy Tummala.KEEP_STATE:
831cfa752fSRamaswamy Tummala
841cfa752fSRamaswamy Tummaladef:		$(DEF_DEPS)
851cfa752fSRamaswamy Tummala
861cfa752fSRamaswamy Tummalaall:		$(ALL_DEPS)
871cfa752fSRamaswamy Tummala
881cfa752fSRamaswamy Tummalaclean:		$(CLEAN_DEPS)
891cfa752fSRamaswamy Tummala		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
901cfa752fSRamaswamy Tummala
911cfa752fSRamaswamy Tummalaclobber:	$(CLOBBER_DEPS)
921cfa752fSRamaswamy Tummala		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
931cfa752fSRamaswamy Tummala
941cfa752fSRamaswamy Tummalalint:		$(LINT_DEPS)
951cfa752fSRamaswamy Tummala
961cfa752fSRamaswamy Tummalamodlintlib:	$(MODLINTLIB_DEPS) lint32
971cfa752fSRamaswamy Tummala
981cfa752fSRamaswamy Tummalaclean.lint:	$(CLEAN_LINT_DEPS)
991cfa752fSRamaswamy Tummala
1001cfa752fSRamaswamy Tummalainstall:	$(INSTALL_DEPS)
1011cfa752fSRamaswamy Tummala
1021cfa752fSRamaswamy Tummala#
1031cfa752fSRamaswamy Tummala#	Include common targets.
1041cfa752fSRamaswamy Tummala#
1051cfa752fSRamaswamy Tummalainclude $(UTSBASE)/sparc/Makefile.targ
1061cfa752fSRamaswamy Tummala
1071cfa752fSRamaswamy Tummala#
1081cfa752fSRamaswamy Tummala#       Defines for local commands.
1091cfa752fSRamaswamy Tummala#
1101cfa752fSRamaswamy TummalaWARLOCK         = warlock
1111cfa752fSRamaswamy TummalaWLCC            = wlcc
1121cfa752fSRamaswamy TummalaTOUCH           = touch
1131cfa752fSRamaswamy TummalaTEST            = test
1141cfa752fSRamaswamy Tummala
1151cfa752fSRamaswamy Tummalawarlock: $(WARLOCK_OK) $(WARLOCK_OUT)
1161cfa752fSRamaswamy Tummala
1171cfa752fSRamaswamy Tummala$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/ibd.wlcmd warlock_ddi.files
1181cfa752fSRamaswamy Tummala	$(WARLOCK) -c $(WLCMD_DIR)/ibd.wlcmd $(WARLOCK_OUT) \
1191cfa752fSRamaswamy Tummala		-l ../warlock/ddi_dki_impl.ll
1201cfa752fSRamaswamy Tummala	$(TOUCH) $@
1211cfa752fSRamaswamy Tummala
1221cfa752fSRamaswamy Tummala%.ll: $(UTSBASE)/common/io/ib/clients/ibd/%.c \
1231cfa752fSRamaswamy Tummala	$(UTSBASE)/common/sys/ib/clients/ibd/ibd.h
1241cfa752fSRamaswamy Tummala	$(WLCC)  $(CPPFLAGS) -DDEBUG -o $@ $<
1251cfa752fSRamaswamy Tummala
1261cfa752fSRamaswamy Tummalawarlock_ddi.files:
1271cfa752fSRamaswamy Tummala	@cd ../warlock; pwd; $(MAKE) warlock
128