Makefile revision dc0093f44ee4fac928e006850f8ed53f68277af5
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# CDDL HEADER START
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# The contents of this file are subject to the terms of the
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# Common Development and Distribution License (the "License").
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# You may not use this file except in compliance with the License.
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# or http://www.opensolaris.org/os/licensing.
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# See the License for the specific language governing permissions
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# and limitations under the License.
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
d981ca645597116d227a48bf37cc5edc061c854dBob Halley#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# CDDL HEADER END
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#
854d0238dbc2908490197984b3b9d558008a53dfMark Andrews# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
854d0238dbc2908490197984b3b9d558008a53dfMark Andrews# Use is subject to license terms.
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#ident "%Z%%M% %I% %E% SMI"
d981ca645597116d227a48bf37cc5edc061c854dBob Halley#
0e8cf9a887c70f96ac448b06c069d90b830215ccMark Andrews
0e8cf9a887c70f96ac448b06c069d90b830215ccMark Andrewsall: $(PROG)
0e8cf9a887c70f96ac448b06c069d90b830215ccMark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews%.o: ../../../sparc/mdb/%.c
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(COMPILE.c) $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(CTFCONVERT_O)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
d981ca645597116d227a48bf37cc5edc061c854dBob Halley%.ln: ../../../sparc/mdb/%.c
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(LINT.c) -c $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewskaif.fth: ../../../sparc/v9/kmdb/kaif_regs.h
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
5dcb42f5bbd41da02a0b32a11a1912f7b90686a8Andreas GustafssonROOT_MISC_DIR = $(ROOT)/platform/sun4u/kernel/misc
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark AndrewsROOT_MISC_DIR_64 = $(ROOT_MISC_DIR)/$(SUBDIR64)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark AndrewsROOTMISC = $(ROOT_MISC_DIR)/$(PROG)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark AndrewsROOTMISC64 = $(ROOT_MISC_DIR_64)/$(PROG)
5dcb42f5bbd41da02a0b32a11a1912f7b90686a8Andreas Gustafsson
5dcb42f5bbd41da02a0b32a11a1912f7b90686a8Andreas Gustafssoninclude ../../../../Makefile.cmd
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewsinclude ../../../../Makefile.cmd.64
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewsinclude ../../../sparc/Makefile.sparcv9
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewsinclude ../../../sparc/Makefile.kmdb.64
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewsinclude ../../../Makefile.kmdb
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark AndrewsSTANDLIBS += $(ROOT)/usr/lib/sparcv9/libstanddisasm.so
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonKMDB_FPTEST = \
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson $(FINDFP) -x kaif_resume -x kaif_trap_common $@
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# Uncomment the following line to enable trap accounting. A DTLB translation
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# will be added for the trap table, and each handler installed by KMDB will use
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# its padding to keep a trap count. See kaif_handlers.s.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#TRAPCOUNT = -DKMDB_TRAPCOUNT
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark AndrewsCPPFLAGS += -I../../../sparc/mdb -I.. -I$(SRC)/uts/sun4 -I$(SRC)/uts/sun4u $(TRAPCOUNT)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark AndrewsCPPFLAGS += -I$(SRC)/cmd/mdb/sparc/v9 -I$(SRC)/cmd/mdb/sparc/v9/kmdb
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark AndrewsCPPFLAGS += -I$(SRC)/cmd/mdb/sparc
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark AndrewsASFLAGS += -I$(SRC)/uts/sun4 -I$(SRC)/uts/sun4u $(TRAPCOUNT)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark AndrewsASFLAGS += -I$(SRC)/cmd/mdb/sparc
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark AndrewsASFLAGS += -I$(SRC)/cmd/mdb/sparc/v9 -I$(SRC)/cmd/mdb/sparc/v9/kmdb
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewsinstall: all $(ROOTMISC64) kaif.fth
d981ca645597116d227a48bf37cc5edc061c854dBob Halley
0e8cf9a887c70f96ac448b06c069d90b830215ccMark Andrews#
0e8cf9a887c70f96ac448b06c069d90b830215ccMark Andrews# lint rules
0e8cf9a887c70f96ac448b06c069d90b830215ccMark Andrews#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews.PARALLEL: lintkmdb lintprom lintkctl
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewslint: lintkmdb lintprom lintkctl
d981ca645597116d227a48bf37cc5edc061c854dBob Halley $(LINT) $(ALLLINTFLAGS) $(KMDBOBJS:%.o=%.ln) $(PROMOBJS:%.o=%.ln)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewslintkmdb: $(KMDBOBJS:%.o=%.ln)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(LINT) $(LINTFLAGS) $(KMDBOBJS:%.o=%.ln)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewslintprom: $(PROMOBJS:%.o=%.ln)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(LINT) $(LINTFLAGS) $(PROMOBJS:%.o=%.ln)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewslintkctl: $(KCTLOBJS:%.o=%.ln)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(LINT) $(ALLLINTFLAGS) $(KCTLOBJS:%.o=%.ln)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewskaif_off.h: ../../../sparc/kmdb/kaif_off.in
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(OFFSETS_CREATE) <../../../sparc/kmdb/kaif_off.in >$@
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrewskmdb_context_off.h: ../../../sparc/kmdb/kmdb_context_off.in
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(OFFSETS_CREATE) <../../../sparc/kmdb/kmdb_context_off.in >$@
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews# Dynamic rules for object construction
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews#
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews%.o: ../../../common/kmdb/%.c
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(COMPILE.c) -o $@ $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(CTFCONVERT_O)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews%.o: ../../../common/kmdb/kctl/%.c
d981ca645597116d227a48bf37cc5edc061c854dBob Halley $(COMPILE.c) -o $@ $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(CTFCONVERT_O)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews%.o: ../../../common/kmdb/kctl/%.s
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(COMPILE.s) -o $@ $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews%.o: ../../../common/mdb/%.c
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(COMPILE.c) -o $@ $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(CTFCONVERT_O)
d981ca645597116d227a48bf37cc5edc061c854dBob Halley
0e8cf9a887c70f96ac448b06c069d90b830215ccMark Andrews%.o: ../../../sparc/kmdb/%.c
0e8cf9a887c70f96ac448b06c069d90b830215ccMark Andrews $(COMPILE.c) -o $@ $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(CTFCONVERT_O)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews%.o: ../../../sparc/kmdb/%.s
d981ca645597116d227a48bf37cc5edc061c854dBob Halley $(COMPILE.s) -o $@ $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews%.o: ../../../sparc/kmdb/kctl/%.c
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(COMPILE.c) -o $@ $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(CTFCONVERT_O)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews%.o: ../../../sparc/kmdb/kctl/%.s
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(COMPILE.s) -o $@ $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews%.o: ../../../sparc/mdb/%.c
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(COMPILE.c) -o $@ $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(CTFCONVERT_O)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews%.o: ../../../sparc/v9/kmdb/%.c
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews $(COMPILE.c) -o $@ $<
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews $(CTFCONVERT_O)
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews
1c3191528684f3dd93ebb122298c2f8ebfc6d397Mark Andrews%.o: ../../../sparc/v9/kmdb/%.s
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews $(COMPILE.s) -o $@ $<
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews%.o: ../../../sparc/v9/kmdb/kctl/%.s
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews $(COMPILE.s) -o $@ $<
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews
94a3bcd132e515b4baa0884ba9dd0f361d2e17bcMark Andrews%.o: $(SRC)/common/net/util/%.c
d981ca645597116d227a48bf37cc5edc061c854dBob Halley $(COMPILE.c) $<
d981ca645597116d227a48bf37cc5edc061c854dBob Halley $(CTFCONVERT_O)
d981ca645597116d227a48bf37cc5edc061c854dBob Halley
d981ca645597116d227a48bf37cc5edc061c854dBob Halley#
d981ca645597116d227a48bf37cc5edc061c854dBob Halley# Lint
d981ca645597116d227a48bf37cc5edc061c854dBob Halley#
d981ca645597116d227a48bf37cc5edc061c854dBob Halley
d981ca645597116d227a48bf37cc5edc061c854dBob Halley%.ln: ../../../common/kmdb/%.c
d981ca645597116d227a48bf37cc5edc061c854dBob Halley $(LINT.c) -c $<
d981ca645597116d227a48bf37cc5edc061c854dBob Halley
d981ca645597116d227a48bf37cc5edc061c854dBob Halley%.ln: ../../../common/kmdb/kctl/%.c
d981ca645597116d227a48bf37cc5edc061c854dBob Halley $(LINT.c) -c $<
d981ca645597116d227a48bf37cc5edc061c854dBob Halley
854d0238dbc2908490197984b3b9d558008a53dfMark Andrews%.ln: ../../../common/kmdb/kctl/%.s
$(LINT.s) -c $<
%.ln: ../../../common/mdb/%.c
$(LINT.c) -c $<
%.ln: ../../../sparc/kmdb/%.c
$(LINT.c) -c $<
%.ln: ../../../sparc/kmdb/%.s
$(LINT.s) -c $<
%.ln: ../../../sparc/kmdb/kctl/%.c
$(LINT.c) -c $<
%.ln: ../../../sparc/kmdb/kctl/%.s
$(LINT.s) -c $<
%.ln: ../../../sparc/mdb/%.c
$(LINT.c) -c $<
%.ln: ../../../sparc/v9/kmdb/%.c
$(LINT.c) -c $<
%.ln: ../../../sparc/v9/kmdb/%.s
$(LINT.s) -c $<
%.ln: ../../../sparc/v9/kmdb/kctl/%.s
$(LINT.s) -c $<
%.ln: $(SRC)/common/net/util/%.c
$(LINT.c) -c $<
#
# Installation targets
#
$(ROOT_MISC_DIR) $(ROOT_MISC_DIR_64):
-$(INS.dir.root.sys)
$(ROOT_MISC_DIR)/%: % $(ROOT_MISC_DIR)
$(INS.file)
$(ROOT_MISC_DIR_64)/%: % $(ROOT_MISC_DIR_64)
$(INS.file)