xref: /titanic_51/usr/src/uts/intel/si3124/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
166f9d5cbSmlf#
266f9d5cbSmlf# CDDL HEADER START
366f9d5cbSmlf#
466f9d5cbSmlf# The contents of this file are subject to the terms of the
566f9d5cbSmlf# Common Development and Distribution License (the "License").
666f9d5cbSmlf# You may not use this file except in compliance with the License.
766f9d5cbSmlf#
866f9d5cbSmlf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
966f9d5cbSmlf# or http://www.opensolaris.org/os/licensing.
1066f9d5cbSmlf# See the License for the specific language governing permissions
1166f9d5cbSmlf# and limitations under the License.
1266f9d5cbSmlf#
1366f9d5cbSmlf# When distributing Covered Code, include this CDDL HEADER in each
1466f9d5cbSmlf# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1566f9d5cbSmlf# If applicable, add the following below this CDDL HEADER, with the
1666f9d5cbSmlf# fields enclosed by brackets "[]" replaced with your own identifying
1766f9d5cbSmlf# information: Portions Copyright [yyyy] [name of copyright owner]
1866f9d5cbSmlf#
1966f9d5cbSmlf# CDDL HEADER END
2066f9d5cbSmlf#
2166f9d5cbSmlf
2266f9d5cbSmlf#
230cfc6e4aSxun ni - Sun Microsystems - Beijing China# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2466f9d5cbSmlf# Use is subject to license terms.
2566f9d5cbSmlf#
2666f9d5cbSmlf#
2766f9d5cbSmlf
2866f9d5cbSmlf#
2966f9d5cbSmlf#	This makefile drives the production of the
3066f9d5cbSmlf#	"platform/i86pc/kernel/drv/si3124" kernel module.
3166f9d5cbSmlf#
3266f9d5cbSmlf#	intel architecture dependent
3366f9d5cbSmlf#
3466f9d5cbSmlf
3566f9d5cbSmlf#
3666f9d5cbSmlf#	Path to the base of the uts directory tree (usually /usr/src/uts).
3766f9d5cbSmlf#
3866f9d5cbSmlfUTSBASE	= ../..
3966f9d5cbSmlf
4066f9d5cbSmlf#
4166f9d5cbSmlf#	Define the module and object file sets.
4266f9d5cbSmlf#
4366f9d5cbSmlfMODULE		= si3124
4466f9d5cbSmlfOBJECTS		= $(SI3124_OBJS:%=$(OBJS_DIR)/%)
4566f9d5cbSmlfLINTS		= $(SI3124_OBJS:%.o=$(LINTS_DIR)/%.ln)
4666f9d5cbSmlfROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
4766f9d5cbSmlfCONF_SRCDIR     = $(UTSBASE)/common/io/sata/adapters/si3124
484ebb14b2SfritsWARLOCK_OUT     = $(SI3124_OBJS:%.o=%.ll)
494ebb14b2SfritsWARLOCK_OK      = $(MODULE).ok
504ebb14b2SfritsWLCMD_DIR	= $(UTSBASE)/common/io/warlock
5166f9d5cbSmlf
5266f9d5cbSmlf#
5366f9d5cbSmlf#	Include common rules.
5466f9d5cbSmlf#
5566f9d5cbSmlfinclude $(UTSBASE)/intel/Makefile.intel
5666f9d5cbSmlf
5766f9d5cbSmlf#
5866f9d5cbSmlf#	Define targets
5966f9d5cbSmlf#
6066f9d5cbSmlfALL_TARGET	= $(BINARY)
6166f9d5cbSmlfLINT_TARGET	= $(MODULE).lint
6266f9d5cbSmlfINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
6366f9d5cbSmlf
6466f9d5cbSmlf#
6566f9d5cbSmlf#	Overrides.
6666f9d5cbSmlf#
6766f9d5cbSmlfDEBUG_FLGS	=
6866f9d5cbSmlfDEBUG_DEFS	+= $(DEBUG_FLGS)
6966f9d5cbSmlf
70*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
71*7014882cSRichard Lowe
7266f9d5cbSmlf#
7366f9d5cbSmlf# lint pass one enforcement
7466f9d5cbSmlf#
7566f9d5cbSmlfCFLAGS += $(CCVERBOSE)
7666f9d5cbSmlf
7766f9d5cbSmlf#
7866f9d5cbSmlf#
7966f9d5cbSmlf# we depend on the sata module
8066f9d5cbSmlfLDFLAGS += -dy -N misc/sata
8166f9d5cbSmlf
8266f9d5cbSmlf#
8366f9d5cbSmlf#	Default build targets.
8466f9d5cbSmlf#
8566f9d5cbSmlf.KEEP_STATE:
8666f9d5cbSmlf
8766f9d5cbSmlfdef:		$(DEF_DEPS)
8866f9d5cbSmlf
8966f9d5cbSmlfall:		$(ALL_DEPS)
9066f9d5cbSmlf
9166f9d5cbSmlfclean:		$(CLEAN_DEPS)
924ebb14b2Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
9366f9d5cbSmlf
9466f9d5cbSmlfclobber:	$(CLOBBER_DEPS)
954ebb14b2Sfrits		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
9666f9d5cbSmlf
9766f9d5cbSmlflint:		$(LINT_DEPS)
9866f9d5cbSmlf
9966f9d5cbSmlfmodlintlib:	$(MODLINTLIB_DEPS)
10066f9d5cbSmlf
10166f9d5cbSmlfclean.lint:	$(CLEAN_LINT_DEPS)
10266f9d5cbSmlf
10366f9d5cbSmlfinstall:	$(INSTALL_DEPS)
10466f9d5cbSmlf
10566f9d5cbSmlf#
10666f9d5cbSmlf#	Include common targets.
10766f9d5cbSmlf#
10866f9d5cbSmlfinclude $(UTSBASE)/intel/Makefile.targ
1094ebb14b2Sfrits
1104ebb14b2Sfrits
1114ebb14b2Sfrits#
1124ebb14b2Sfrits#	Defines for local commands.
1134ebb14b2Sfrits#
1144ebb14b2SfritsWARLOCK		= warlock
1154ebb14b2SfritsWLCC		= wlcc
1164ebb14b2SfritsTOUCH		= touch
1174ebb14b2SfritsTEST		= test
1184ebb14b2Sfrits
1194ebb14b2SfritsSI3124_FILES   = $(MODULE).ll
1204ebb14b2SfritsSD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
1214ebb14b2SfritsSATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
1224ebb14b2SfritsSCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
1234e942d8cSshidokhtCMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
1244ebb14b2Sfrits
1254ebb14b2Sfritswarlock: $(WARLOCK_OK)
1264ebb14b2Sfrits
127bf56214cSstevel$(WARLOCK_OK): $(WLCMD_DIR)/si3124.wlcmd $(WARLOCK_OUT) warlock_ddi.files \
1284e942d8cSshidokht	sata.files scsi.files sd.files cmlb.files
1294ebb14b2Sfrits	$(WARLOCK) -c $(WLCMD_DIR)/si3124.wlcmd $(WARLOCK_OUT) \
1304ebb14b2Sfrits	$(SD_FILES) \
1314ebb14b2Sfrits	$(SCSI_FILES) \
1324e942d8cSshidokht	$(CMLB_FILES) \
1334ebb14b2Sfrits        $(SATA_FILES) \
1344ebb14b2Sfrits	-l ../warlock/ddi_dki_impl.ll
1354ebb14b2Sfrits	$(TOUCH) $@
1364ebb14b2Sfrits
1374ebb14b2Sfrits%.ll: $(UTSBASE)/common/io/sata/adapters/si3124/%.c
1384ebb14b2Sfrits	$(WLCC) $(CPPFLAGS) -D DEBUG -o $@ $<
1394ebb14b2Sfrits
1404ebb14b2Sfritssata.files:
1414ebb14b2Sfrits	@cd ../sata; pwd; $(MAKE) warlock
1424ebb14b2Sfrits
1434ebb14b2Sfritsscsi.files:
1444ebb14b2Sfrits	@cd ../scsi; pwd; $(MAKE) warlock
1454ebb14b2Sfrits
1464ebb14b2Sfritssd.files:
1474ebb14b2Sfrits	@cd ../sd; pwd; $(MAKE) warlock_alone
1484ebb14b2Sfrits
1494e942d8cSshidokhtcmlb.files:
1504e942d8cSshidokht	@cd ../cmlb; pwd; $(MAKE) warlock
1514e942d8cSshidokht
1524ebb14b2Sfritswarlock_ddi.files:
1534ebb14b2Sfrits	@cd ../warlock; pwd; $(MAKE) warlock
154