xref: /titanic_41/usr/src/uts/sun4u/montecarlo/scsb/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
103831d35Sstevel#
203831d35Sstevel# CDDL HEADER START
303831d35Sstevel#
403831d35Sstevel# The contents of this file are subject to the terms of the
503831d35Sstevel# Common Development and Distribution License (the "License").
603831d35Sstevel# You may not use this file except in compliance with the License.
703831d35Sstevel#
803831d35Sstevel# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
903831d35Sstevel# or http://www.opensolaris.org/os/licensing.
1003831d35Sstevel# See the License for the specific language governing permissions
1103831d35Sstevel# and limitations under the License.
1203831d35Sstevel#
1303831d35Sstevel# When distributing Covered Code, include this CDDL HEADER in each
1403831d35Sstevel# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1503831d35Sstevel# If applicable, add the following below this CDDL HEADER, with the
1603831d35Sstevel# fields enclosed by brackets "[]" replaced with your own identifying
1703831d35Sstevel# information: Portions Copyright [yyyy] [name of copyright owner]
1803831d35Sstevel#
1903831d35Sstevel# CDDL HEADER END
2003831d35Sstevel#
2103831d35Sstevel
2203831d35Sstevel#
2303831d35Sstevel# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2403831d35Sstevel# Use is subject to license terms.
2503831d35Sstevel#
26*7014882cSRichard Lowe
2703831d35Sstevel#
2803831d35Sstevel#	This makefile drives the production of the scsb driver kernel module
2903831d35Sstevel#
3003831d35Sstevel#	sun4u implementation architecture dependent
3103831d35Sstevel#
3203831d35Sstevel
3303831d35Sstevel#
3403831d35Sstevel#	Path to the base of the uts directory tree (usually /usr/src/uts).
3503831d35Sstevel#
3603831d35SstevelUTSBASE	  = ../../..
3703831d35Sstevel
3803831d35Sstevel#
3903831d35Sstevel#	Define the module and object file sets.
4003831d35Sstevel#
4103831d35SstevelMODULE		= scsb
4203831d35SstevelOBJECTS		= $(SCSB_OBJS:%=$(OBJS_DIR)/%)
4303831d35SstevelLINTS		= $(SCSB_OBJS:%.o=$(LINTS_DIR)/%.ln)
4403831d35SstevelROOTMODULE	= $(ROOT_MONTECARLO_DRV_DIR)/$(MODULE)
4503831d35SstevelCONF_SRCDIR	= $(UTSBASE)/sun4u/montecarlo/io
4603831d35Sstevel
4703831d35Sstevel#
4803831d35Sstevel#	Include common rules.
4903831d35Sstevel#
5003831d35Sstevelinclude $(UTSBASE)/sun4u/montecarlo/Makefile.montecarlo
5103831d35Sstevel
5203831d35Sstevel#
5303831d35Sstevel#	Define targets
5403831d35Sstevel#
5503831d35SstevelALL_TARGET	= $(BINARY) $(SRC_CONFFILE)
5603831d35SstevelLINT_TARGET	= $(MODULE).lint
5703831d35SstevelINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
5803831d35Sstevel
5903831d35Sstevel#
6003831d35Sstevel# lint pass one enforcement
6103831d35Sstevel#
6203831d35SstevelCFLAGS += $(CCVERBOSE) -DNORDICA_CP1500
63*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch
64*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable
65*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function
66*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
67*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized
6803831d35Sstevel
6903831d35Sstevel#
7003831d35Sstevel# Turn on doubleword alignment for 64 bit registers
7103831d35Sstevel#
7203831d35SstevelCFLAGS += -dalign
7303831d35Sstevel
7403831d35Sstevel# Add our depedencies to LDFLAGS
7503831d35Sstevel#
7603831d35SstevelLDFLAGS += -dy -Nmisc/hpcsvc -Nmisc/i2c_svc
7703831d35Sstevel
7803831d35Sstevel#
7903831d35Sstevel#	Default build targets.
8003831d35Sstevel#
8103831d35Sstevel.KEEP_STATE:
8203831d35Sstevel
8303831d35Ssteveldef:		$(DEF_DEPS)
8403831d35Sstevel
8503831d35Sstevelall:		$(ALL_DEPS)
8603831d35Sstevel
8703831d35Sstevelclean:		$(CLEAN_DEPS)
8803831d35Sstevel
8903831d35Sstevelclobber:	$(CLOBBER_DEPS)
9003831d35Sstevel
9103831d35Sstevellint:		$(LINT_DEPS)
9203831d35Sstevel
9303831d35Sstevelmodlintlib:	$(MODLINTLIB_DEPS)
9403831d35Sstevel
9503831d35Sstevelclean.lint:	$(CLEAN_LINT_DEPS)
9603831d35Sstevel
9703831d35Sstevelinstall:	$(INSTALL_DEPS)
9803831d35Sstevel
9903831d35SstevelLINT_LIB_DIR    = $(MONTECARLO_LINT_LIB_DIR)
10003831d35Sstevel#
10103831d35Sstevel#	Include common targets.
10203831d35Sstevel#
10303831d35Sstevelinclude $(UTSBASE)/sun4u/montecarlo/Makefile.targ
10403831d35Sstevel
10503831d35Sstevel#	Defines for local commands.
10603831d35Sstevel#
10703831d35SstevelWLCC		= wlcc
10803831d35SstevelTOUCH		= touch
10903831d35SstevelWARLOCK		= warlock
11003831d35Sstevel
11103831d35Sstevel#
11203831d35Sstevel#	Warlock targets
11303831d35Sstevel#
11403831d35Sstevel
11503831d35SstevelSCSB_FILES = $(SCSB_OBJS:%.o=%.ll)
11603831d35Sstevel
11703831d35Sstevelwarlock: $(MODULE).ok
11803831d35Sstevel
11903831d35Sstevel%.ok:	$(SCSB_FILES)
12003831d35Sstevel	$(TOUCH) $@
12103831d35Sstevel
12203831d35Sstevel%.ll:	$(UTSBASE)/sun4u/montecarlo/io/%.c
12303831d35Sstevel	$(WLCC) $(CFLAGS) $(CPPFLAGS) -DDEBUG -o $@ $<
124