Makefile revision 4ebb14b236958cfe1ef4ff3b7a50216d9e51f997
45312f52ff3a3d4c137447be4c7556500c2f8bf2Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# CDDL HEADER START
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# The contents of this file are subject to the terms of the
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# Common Development and Distribution License (the "License").
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# You may not use this file except in compliance with the License.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# or http://www.opensolaris.org/os/licensing.
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen# See the License for the specific language governing permissions
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen# and limitations under the License.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# When distributing Covered Code, include this CDDL HEADER in each
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
252db51b6c0a605163326b3ea5d09e9936ca3b29Timo Sirainen# If applicable, add the following below this CDDL HEADER, with the
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# fields enclosed by brackets "[]" replaced with your own identifying
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# information: Portions Copyright [yyyy] [name of copyright owner]
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
34435ce4a468dc13b23db69dbdd09fe20be88816Timo Sirainen# CDDL HEADER END
34435ce4a468dc13b23db69dbdd09fe20be88816Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# uts/sparc/ecpp/Makefile
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# Use is subject to license terms.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#ident "%Z%%M% %I% %E% SMI"
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# This Makefile drives the production of ecpp
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# kernel module.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen#
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen#
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen# Path to the base of the uts directory tree (usually /usr/src/uts).
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenUTSBASE = ../..
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# Define the module and object file sets.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenMODULE = ecpp
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenOBJECTS = $(ECPP_OBJS:%=$(OBJS_DIR)/%)
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenLINTS = $(ECPP_OBJS:%.o=$(LINTS_DIR)/%.ln)
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenCONF_SRCDIR = $(UTSBASE)/common/io
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenWARLOCK_OUT = $(ECPP_OBJS:%.o=%.ll)
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenWARLOCK_OK = $(MODULE).ok
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenWLCMD_DIR = $(UTSBASE)/common/io/warlock
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# Include common rules.
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen#
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Siraineninclude $(UTSBASE)/sparc/Makefile.sparc
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# Define targets
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenALL_TARGET = $(BINARY) $(SRC_CONFILE)
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenLINT_TARGET = $(MODULE).lint
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
a94936bafd127680184da114c6a177b37ff656e5Timo Sirainen# lint pass one enforcement
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenCFLAGS += $(CCVERBOSE)
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# Turn this on once compiler understands v9 in it's backend
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#INLINES += $(UTSBASE)/sun/io/ecpp.il
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
a94936bafd127680184da114c6a177b37ff656e5Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# For now, disable these lint checks; maintainers should endeavor
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# to investigate and remove these for maximum lint coverage.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# Please do not carry these forward to new Makefiles.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo SirainenLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo SirainenLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# Default build targets.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen.KEEP_STATE:
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainendef: $(DEF_DEPS)
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainenall: $(ALL_DEPS)
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainenclean: $(CLEAN_DEPS)
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainenclobber: $(CLOBBER_DEPS)
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
fe363b433b8038a69b55169da9dca27892ad7d18Timo Sirainen
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainenmodlintlib: $(MODLINTLIB_DEPS) lint64
4fdf60e22b5340fe35f083b9ea5eb3fd1cf2e742Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainenclean.lint: $(CLEAN_LINT_DEPS)
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Siraineninstall: $(INSTALL_DEPS)
252db51b6c0a605163326b3ea5d09e9936ca3b29Timo Sirainen
a94936bafd127680184da114c6a177b37ff656e5Timo Sirainen#
a94936bafd127680184da114c6a177b37ff656e5Timo Sirainen# Include common targets.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Siraineninclude $(UTSBASE)/sparc/Makefile.targ
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
597dba3488c648ffb375ee4a552bd52ac4346979Timo Sirainen#
74f810327aca91b3375d3fc963bce8076785b1cbTimo Sirainen# Defines for local commands.
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenWARLOCK = warlock
a94936bafd127680184da114c6a177b37ff656e5Timo SirainenWLCC = wlcc
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenTOUCH = touch
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenSCCS = sccs
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo SirainenTEST = test
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen# lock_lint rules
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen#
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainenwarlock: $(WARLOCK_OK)
34435ce4a468dc13b23db69dbdd09fe20be88816Timo Sirainen
f8512649cd4db427a8dc5dc8f45c8e379ffd4d76Timo Sirainen%.wlcmd:
f8512649cd4db427a8dc5dc8f45c8e379ffd4d76Timo Sirainen cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
f8512649cd4db427a8dc5dc8f45c8e379ffd4d76Timo Sirainen
f8512649cd4db427a8dc5dc8f45c8e379ffd4d76Timo Sirainen$(WARLOCK_OK): $(WARLOCK_OUT) ecpp.wlcmd warlock_ddi.files
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen $(WARLOCK) -c $(WLCMD_DIR)/ecpp.wlcmd $(WARLOCK_OUT) \
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen -l ../warlock/ddi_dki_impl.ll
f8512649cd4db427a8dc5dc8f45c8e379ffd4d76Timo Sirainen $(TOUCH) $@
f8512649cd4db427a8dc5dc8f45c8e379ffd4d76Timo Sirainen
f8512649cd4db427a8dc5dc8f45c8e379ffd4d76Timo Sirainen
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen%.ll: $(UTSBASE)/common/io/%.c $(UTSBASE)/common/sys/ecppvar.h \
f8512649cd4db427a8dc5dc8f45c8e379ffd4d76Timo Sirainen $(UTSBASE)/common/sys/ecppio.h
63a2f941c1ad029061129ba6384d1d2a02382220Timo Sirainen $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
f8512649cd4db427a8dc5dc8f45c8e379ffd4d76Timo Sirainen
63a2f941c1ad029061129ba6384d1d2a02382220Timo Sirainenwarlock_ddi.files:
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen cd ../warlock; pwd; $(MAKE) warlock
ea37a9aedfc3a6ff5f4ea10bc4eff4ca23f62a15Timo Sirainen