xref: /titanic_52/usr/src/uts/sparc/nv_sata/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
18d483882Smlf# CDDL HEADER START
28d483882Smlf#
38d483882Smlf# The contents of this file are subject to the terms of the
48d483882Smlf# Common Development and Distribution License (the "License").
58d483882Smlf# You may not use this file except in compliance with the License.
68d483882Smlf#
78d483882Smlf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
88d483882Smlf# or http://www.opensolaris.org/os/licensing.
98d483882Smlf# See the License for the specific language governing permissions
108d483882Smlf# and limitations under the License.
118d483882Smlf#
128d483882Smlf# When distributing Covered Code, include this CDDL HEADER in each
138d483882Smlf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
148d483882Smlf# If applicable, add the following below this CDDL HEADER, with the
158d483882Smlf# fields enclosed by brackets "[]" replaced with your own identifying
168d483882Smlf# information: Portions Copyright [yyyy] [name of copyright owner]
178d483882Smlf#
188d483882Smlf# CDDL HEADER END
198d483882Smlf#
208d483882Smlf
218d483882Smlf#
228d483882Smlf# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
238d483882Smlf# Use is subject to license terms.
248d483882Smlf#
25*7014882cSRichard Lowe
268d483882Smlf#
278d483882Smlf#
288d483882Smlf#	Path to the base of the uts directory tree (usually /usr/src/uts).
298d483882Smlf#
308d483882SmlfUTSBASE	= ../..
318d483882Smlf
328d483882Smlf#
338d483882Smlf#	Define the module and object file sets.
348d483882Smlf#
358d483882SmlfMODULE		= nv_sata
368d483882SmlfOBJECTS		= $(NV_SATA_OBJS:%=$(OBJS_DIR)/%)
378d483882SmlfLINTS		= $(NV_SATA_OBJS:%.o=$(LINTS_DIR)/%.ln)
388d483882SmlfWARLOCK_OUT     = $(NV_SATA_OBJS:%.o=%.ll)
398d483882SmlfWARLOCK_OK      = $(MODULE).ok
408d483882SmlfROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
418d483882SmlfCONF_SRCDIR     = $(UTSBASE)/common/io/sata/adapters/nv_sata
428d483882SmlfWLCMD_DIR       = $(UTSBASE)/common/io/warlock
438d483882Smlf
448d483882Smlf#
458d483882Smlf#	Include common rules.
468d483882Smlf#
478d483882Smlfinclude $(UTSBASE)/sparc/Makefile.sparc
488d483882Smlf
498d483882Smlf#
508d483882Smlf#	Define targets
518d483882Smlf#
528d483882SmlfALL_TARGET	= $(BINARY)
538d483882SmlfLINT_TARGET	= $(MODULE).lint
548d483882SmlfINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
558d483882Smlf
568d483882Smlf#
578d483882Smlf#	Overrides.
588d483882Smlf#
598d483882SmlfDEBUG_FLGS	=
608d483882SmlfDEBUG_DEFS	+= $(DEBUG_FLGS)
618d483882Smlf
628d483882Smlf#
638d483882Smlf# lint pass one enforcement
648d483882Smlf#
658d483882SmlfCFLAGS += $(CCVERBOSE)
668d483882Smlf
678d483882Smlf#
688d483882Smlf#	Default build targets.
698d483882Smlf#
708d483882Smlf.KEEP_STATE:
718d483882Smlf
728d483882Smlfdef:		$(DEF_DEPS)
738d483882Smlf
748d483882Smlfall:		$(ALL_DEPS)
758d483882Smlf
768d483882Smlfclean:		$(CLEAN_DEPS)
778d483882Smlf		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
788d483882Smlf
798d483882Smlfclobber:	$(CLOBBER_DEPS)
808d483882Smlf		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
818d483882Smlf
828d483882Smlflint:		$(LINT_DEPS)
838d483882Smlf
848d483882Smlfmodlintlib:	$(MODLINTLIB_DEPS)
858d483882Smlf
868d483882Smlfclean.lint:	$(CLEAN_LINT_DEPS)
878d483882Smlf
888d483882Smlfinstall:	$(INSTALL_DEPS)
898d483882Smlf
90*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
91*7014882cSRichard Lowe
928d483882Smlf#
938d483882Smlf#	Include common targets.
948d483882Smlf#
958d483882Smlfinclude $(UTSBASE)/sparc/Makefile.targ
968d483882Smlf
978d483882Smlf
988d483882Smlf#
998d483882Smlf#	Defines for local commands.
1008d483882Smlf#
1018d483882SmlfWARLOCK		= warlock
1028d483882SmlfWLCC		= wlcc
1038d483882SmlfTOUCH		= touch
1048d483882SmlfTEST		= test
1058d483882Smlf
1068d483882SmlfSD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
1078d483882SmlfSATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
1088d483882SmlfSCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
1098d483882SmlfCMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
1108d483882Smlf
1118d483882Smlfwarlock: $(WARLOCK_OK)
1128d483882Smlf
1138d483882Smlf$(WARLOCK_OK): $(WLCMD_DIR)/nv_sata.wlcmd $(WARLOCK_OUT)  warlock_ddi.files \
1148d483882Smlf	sata.files scsi.files sd.files cmlb.files
1158d483882Smlf	$(WARLOCK) -c $(WLCMD_DIR)/nv_sata.wlcmd $(WARLOCK_OUT) \
1168d483882Smlf	$(SD_FILES) \
1178d483882Smlf	$(SCSI_FILES) \
1188d483882Smlf	$(CMLB_FILES) \
1198d483882Smlf        $(SATA_FILES) \
1208d483882Smlf	-l ../warlock/ddi_dki_impl.ll
1218d483882Smlf	$(TOUCH) $@
1228d483882Smlf
1238d483882Smlf%.ll: $(UTSBASE)/common/io/sata/adapters/nv_sata/%.c
1248d483882Smlf	$(WLCC) $(CPPFLAGS) -D DEBUG -D __sparcv9 -o $@ $<
1258d483882Smlf
1268d483882Smlfsata.files:
1278d483882Smlf	@cd ../sata; pwd; $(MAKE) warlock
1288d483882Smlf
1298d483882Smlfscsi.files:
1308d483882Smlf	@cd ../scsi; pwd; $(MAKE) warlock
1318d483882Smlf
1328d483882Smlfsd.files:
1338d483882Smlf	@cd ../sd; pwd; $(MAKE) warlock_alone
1348d483882Smlf
1358d483882Smlfcmlb.files:
1368d483882Smlf	@cd ../cmlb; pwd; $(MAKE) warlock
1378d483882Smlf
1388d483882Smlf
1398d483882Smlfwarlock_ddi.files:
1408d483882Smlf	@cd ../warlock; pwd; $(MAKE) warlock
141