Makefile revision 3138:7bbdcbfa4cd5
150476Speter#
29958Sache# CDDL HEADER START
352379Sache#
452379Sache# The contents of this file are subject to the terms of the
59958Sache# Common Development and Distribution License (the "License").
6118459Smtm# You may not use this file except in compliance with the License.
7118459Smtm#
8108428Sache# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
986073Sache# or http://www.opensolaris.org/os/licensing.
1077981Sache# See the License for the specific language governing permissions
1177981Sache# and limitations under the License.
1277981Sache#
1377981Sache# When distributing Covered Code, include this CDDL HEADER in each
1477981Sache# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1577981Sache# If applicable, add the following below this CDDL HEADER, with the
1677981Sache# fields enclosed by brackets "[]" replaced with your own identifying
1777981Sache# information: Portions Copyright [yyyy] [name of copyright owner]
1877981Sache#
1977981Sache# CDDL HEADER END
2087043Sache#
2177981Sache#
2277981Sache# uts/sparc/ecpp/Makefile
23117259Sache# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2477981Sache# Use is subject to license terms.
2588473Sphantom#
2688473Sphantom#ident	"%Z%%M%	%I%	%E% SMI"
2777981Sache#
2888473Sphantom#	This Makefile drives the production of ecpp
2977981Sache#	kernel module.
3077981Sache#	
31105965Sache#
3277981Sache
3377981Sache#
3477981Sache#	Path to the base of the uts directory tree (usually /usr/src/uts).
3593885Sphantom#
3677981SacheUTSBASE	= ../..
3789077Sache
38115922Sache#
3988473Sphantom#	Define the module and object file sets.
4077981Sache#
4188473SphantomMODULE		= ecpp
4277981SacheOBJECTS		= $(ECPP_OBJS:%=$(OBJS_DIR)/%)
4377981SacheLINTS		= $(ECPP_OBJS:%.o=$(LINTS_DIR)/%.ln)
44105445SacheROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
45105445SacheCONF_SRCDIR	= $(UTSBASE)/common/io
4677981SacheWARLOCK_OUT	= $(ECPP_OBJS:%.o=%.ll)
4777981SacheWARLOCK_OK	= $(MODULE).ok
4888314SacheWLCMD_DIR       = $(UTSBASE)/common/io/warlock
4988473Sphantom
5088473Sphantom#
51118174Sache#	Include common rules.
52122151Sdavidxu#
5352379Sacheinclude $(UTSBASE)/sparc/Makefile.sparc
5452379Sache
5552379Sache#
5652379Sache#	Define targets
57108428Sache#
5855012SacheALL_TARGET	= $(BINARY) $(SRC_CONFILE)
5988473SphantomLINT_TARGET	= $(MODULE).lint
6088473SphantomINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
6188473Sphantom
6288473Sphantom#
6388473Sphantom# lint pass one enforcement
6488473Sphantom#
6588473SphantomCFLAGS += $(CCVERBOSE)
6652379Sache
6752379Sache# Turn this on once compiler understands v9 in it's backend
6852379Sache#INLINES		+= $(UTSBASE)/sun/io/ecpp.il
6952379Sache
7052379Sache#
7152379Sache# For now, disable these lint checks; maintainers should endeavor
7252379Sache# to investigate and remove these for maximum lint coverage.
7352379Sache# Please do not carry these forward to new Makefiles.
7452379Sache#
7552379SacheLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
76100872SruLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
7752379SacheLINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
7852379Sache
7988473Sphantom#	Default build targets.
8077981Sache#
8177981Sache.KEEP_STATE:
8252379Sache
8352379Sachedef:		$(DEF_DEPS)
8477981Sache
8577981Sacheall:		$(ALL_DEPS)
8677981Sache
8777981Sacheclean:		$(CLEAN_DEPS)
8852379Sache		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
8952379Sache
9077981Sacheclobber:	$(CLOBBER_DEPS)
9177981Sache		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
9277981Sache
9377981Sachemodlintlib:	$(MODLINTLIB_DEPS) lint64
9452379Sache
9552379Sacheclean.lint:	$(CLEAN_LINT_DEPS)
9677981Sache
9777981Sacheinstall:	$(INSTALL_DEPS)
9877981Sache
9977981Sache#
10052379Sache#	Include common targets.
10152379Sache#
10277981Sacheinclude $(UTSBASE)/sparc/Makefile.targ
10352379Sache
10452379Sache#
10552379Sache#	Defines for local commands.
10677981Sache#
10777981SacheWARLOCK		= warlock
10877981SacheWLCC		= wlcc
10977981SacheTOUCH		= touch
11052379SacheSCCS		= sccs
11152379SacheTEST		= test
11277981Sache
11377981Sache#
11477981Sache#	lock_lint rules
11577981Sache#
11678006Sachewarlock: $(WARLOCK_OK)
11778006Sache
11852379Sache%.wlcmd:
11952379Sache	cd $(WLCMD_DIR); $(TEST) -f $@  || $(SCCS) get $@
12077981Sache
12177981Sache$(WARLOCK_OK): $(WARLOCK_OUT) ecpp.wlcmd warlock_ddi.files
12277981Sache	$(WARLOCK) -c $(WLCMD_DIR)/ecpp.wlcmd $(WARLOCK_OUT) \
12377981Sache		-l ../warlock/ddi_dki_impl.ll
12478006Sache	$(TOUCH) $@
12578006Sache
12652379Sache
12778006Sache%.ll: $(UTSBASE)/common/io/%.c $(UTSBASE)/common/sys/ecppvar.h \
128118651Sache		$(UTSBASE)/common/sys/ecppio.h
12978006Sache	$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
130118651Sache
13188474Sphantomwarlock_ddi.files:
132118651Sache	cd ../warlock; pwd; $(MAKE) warlock
13388474Sphantom