17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5dc0093f4Seschrock# Common Development and Distribution License (the "License"). 6dc0093f4Seschrock# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 211ae08745Sheppo 227c478bd9Sstevel@tonic-gate# 2348bc00d6Sjmcp# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 257c478bd9Sstevel@tonic-gate# 2648bc00d6Sjmcp 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gateall: $(PROG) 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate%.o: ../../../sparc/mdb/%.c 317c478bd9Sstevel@tonic-gate $(COMPILE.c) $< 327c478bd9Sstevel@tonic-gate $(CTFCONVERT_O) 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/mdb/%.c 357c478bd9Sstevel@tonic-gate $(LINT.c) -c $< 367c478bd9Sstevel@tonic-gate 377c478bd9Sstevel@tonic-gatekaif.fth: ../../../sparc/v9/kmdb/kaif_regs.h 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gateROOT_MISC_DIR = $(ROOT)/platform/sun4v/kernel/misc 407c478bd9Sstevel@tonic-gateROOT_MISC_DIR_64 = $(ROOT_MISC_DIR)/$(SUBDIR64) 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gateROOTMISC = $(ROOT_MISC_DIR)/$(PROG) 437c478bd9Sstevel@tonic-gateROOTMISC64 = $(ROOT_MISC_DIR_64)/$(PROG) 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gateinclude ../../../../Makefile.cmd 467c478bd9Sstevel@tonic-gateinclude ../../../../Makefile.cmd.64 477c478bd9Sstevel@tonic-gateinclude ../../../sparc/Makefile.sparcv9 487c478bd9Sstevel@tonic-gateinclude ../../../sparc/Makefile.kmdb.64 497c478bd9Sstevel@tonic-gateinclude ../../../Makefile.kmdb 507c478bd9Sstevel@tonic-gate 51dc0093f4SeschrockSTANDLIBS += $(ROOT)/usr/lib/sparcv9/libstanddisasm.so 52dc0093f4Seschrock 537c478bd9Sstevel@tonic-gateKMDB_FPTEST = \ 547c478bd9Sstevel@tonic-gate $(FINDFP) -x kaif_resume -x kaif_trap_common $@ 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate# 577c478bd9Sstevel@tonic-gate# Uncomment the following line to enable trap accounting. A DTLB translation 587c478bd9Sstevel@tonic-gate# will be added for the trap table, and each handler installed by KMDB will use 597c478bd9Sstevel@tonic-gate# its padding to keep a trap count. See kaif_handlers.s. 607c478bd9Sstevel@tonic-gate# 611ae08745Sheppo# NOTE: not currently supported by the sun4v fast miss handlers. See 621ae08745Sheppo# ../../../sparc/v9/kmdb/kaif_handlers.s to verify before use. 631ae08745Sheppo# 647c478bd9Sstevel@tonic-gate#TRAPCOUNT = -DKMDB_TRAPCOUNT 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gateCPPFLAGS += -I../../../sparc/mdb -I.. -I$(SRC)/uts/sun4 -I$(SRC)/uts/sun4v 677c478bd9Sstevel@tonic-gateCPPFLAGS += $(TRAPCOUNT) 687c478bd9Sstevel@tonic-gateCPPFLAGS += -Dsun4v 697c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/cmd/mdb/sparc 707c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/cmd/mdb/sparc/v9 -I$(SRC)/cmd/mdb/sparc/v9/kmdb 714051d170SsvemuriASFLAGS += -xarch=v9v -I$(SRC)/uts/sun4 -I$(SRC)/uts/sun4v $(TRAPCOUNT) 727c478bd9Sstevel@tonic-gateASFLAGS += -Dsun4v 737c478bd9Sstevel@tonic-gateASFLAGS += -I$(SRC)/cmd/mdb/sparc 747c478bd9Sstevel@tonic-gateASFLAGS += -I$(SRC)/cmd/mdb/sparc/v9 -I$(SRC)/cmd/mdb/sparc/v9/kmdb 75*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gateinstall: all $(ROOTMISC64) kaif.fth 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate# 807c478bd9Sstevel@tonic-gate# lint rules 817c478bd9Sstevel@tonic-gate# 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate.PARALLEL: lintkmdb lintprom lintkctl 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gatelint: lintkmdb lintprom lintkctl 867c478bd9Sstevel@tonic-gate $(LINT) $(ALLLINTFLAGS) $(KMDBOBJS:%.o=%.ln) $(PROMOBJS:%.o=%.ln) 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gatelintkmdb: $(KMDBOBJS:%.o=%.ln) 897c478bd9Sstevel@tonic-gate $(LINT) $(LINTFLAGS) $(KMDBOBJS:%.o=%.ln) 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gatelintprom: $(PROMOBJS:%.o=%.ln) 927c478bd9Sstevel@tonic-gate $(LINT) $(LINTFLAGS) $(PROMOBJS:%.o=%.ln) 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gatelintkctl: $(KCTLOBJS:%.o=%.ln) 957c478bd9Sstevel@tonic-gate $(LINT) $(ALLLINTFLAGS) $(KCTLOBJS:%.o=%.ln) 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gatekaif_off.h: ../../../sparc/kmdb/kaif_off.in 987c478bd9Sstevel@tonic-gate $(OFFSETS_CREATE) <../../../sparc/kmdb/kaif_off.in >$@ 997c478bd9Sstevel@tonic-gate 1007c478bd9Sstevel@tonic-gatekmdb_context_off.h: ../../../sparc/kmdb/kmdb_context_off.in 1017c478bd9Sstevel@tonic-gate $(OFFSETS_CREATE) <../../../sparc/kmdb/kmdb_context_off.in >$@ 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate# 1047c478bd9Sstevel@tonic-gate# Dynamic rules for object construction 1057c478bd9Sstevel@tonic-gate# 1067c478bd9Sstevel@tonic-gate%.o: ../../../common/kmdb/%.c 1077c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1087c478bd9Sstevel@tonic-gate $(CTFCONVERT_O) 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate%.o: ../../../common/kmdb/kctl/%.c 1117c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1127c478bd9Sstevel@tonic-gate $(CTFCONVERT_O) 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gate%.o: ../../../common/kmdb/kctl/%.s 1157c478bd9Sstevel@tonic-gate $(COMPILE.s) -o $@ $< 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate%.o: ../../../common/mdb/%.c 1187c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1197c478bd9Sstevel@tonic-gate $(CTFCONVERT_O) 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gate%.o: ../../../sparc/kmdb/%.c 1227c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1237c478bd9Sstevel@tonic-gate $(CTFCONVERT_O) 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gate%.o: ../../../sparc/kmdb/%.s 1267c478bd9Sstevel@tonic-gate $(COMPILE.s) -o $@ $< 1277c478bd9Sstevel@tonic-gate 1287c478bd9Sstevel@tonic-gate%.o: ../../../sparc/kmdb/kctl/%.c 1297c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1307c478bd9Sstevel@tonic-gate $(CTFCONVERT_O) 1317c478bd9Sstevel@tonic-gate 1327c478bd9Sstevel@tonic-gate%.o: ../../../sparc/kmdb/kctl/%.s 1337c478bd9Sstevel@tonic-gate $(COMPILE.s) -o $@ $< 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate%.o: ../../../sparc/mdb/%.c 1367c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1377c478bd9Sstevel@tonic-gate $(CTFCONVERT_O) 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gate%.o: ../../../sparc/v9/kmdb/%.c 1407c478bd9Sstevel@tonic-gate $(COMPILE.c) -o $@ $< 1417c478bd9Sstevel@tonic-gate $(CTFCONVERT_O) 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gate%.o: ../../../sparc/v9/kmdb/%.s 1447c478bd9Sstevel@tonic-gate $(COMPILE.s) -o $@ $< 1457c478bd9Sstevel@tonic-gate 1467c478bd9Sstevel@tonic-gate%.o: ../../../sparc/v9/kmdb/kctl/%.s 1477c478bd9Sstevel@tonic-gate $(COMPILE.s) -o $@ $< 1487c478bd9Sstevel@tonic-gate 1497c478bd9Sstevel@tonic-gate%.o: $(SRC)/common/net/util/%.c 1507c478bd9Sstevel@tonic-gate $(COMPILE.c) $< 1517c478bd9Sstevel@tonic-gate $(CTFCONVERT_O) 1527c478bd9Sstevel@tonic-gate 1531ae08745Sheppo%.o: ../../../../../uts/sun4v/ml/%.s 1541ae08745Sheppo $(COMPILE.s) -o $@ $< 1551ae08745Sheppo 1567c478bd9Sstevel@tonic-gate# 1577c478bd9Sstevel@tonic-gate# Lint 1587c478bd9Sstevel@tonic-gate# 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate%.ln: ../../../common/kmdb/%.c 1617c478bd9Sstevel@tonic-gate $(LINT.c) -c $< 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gate%.ln: ../../../common/kmdb/kctl/%.c 1647c478bd9Sstevel@tonic-gate $(LINT.c) -c $< 1657c478bd9Sstevel@tonic-gate 1667c478bd9Sstevel@tonic-gate%.ln: ../../../common/kmdb/kctl/%.s 1677c478bd9Sstevel@tonic-gate $(LINT.s) -c $< 1687c478bd9Sstevel@tonic-gate 1697c478bd9Sstevel@tonic-gate%.ln: ../../../common/mdb/%.c 1707c478bd9Sstevel@tonic-gate $(LINT.c) -c $< 1717c478bd9Sstevel@tonic-gate 1727c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/kmdb/%.c 1737c478bd9Sstevel@tonic-gate $(LINT.c) -c $< 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/kmdb/%.s 1767c478bd9Sstevel@tonic-gate $(LINT.s) -c $< 1777c478bd9Sstevel@tonic-gate 1787c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/kmdb/kctl/%.c 1797c478bd9Sstevel@tonic-gate $(LINT.c) -c $< 1807c478bd9Sstevel@tonic-gate 1817c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/kmdb/kctl/%.s 1827c478bd9Sstevel@tonic-gate $(LINT.s) -c $< 1837c478bd9Sstevel@tonic-gate 1847c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/mdb/%.c 1857c478bd9Sstevel@tonic-gate $(LINT.c) -c $< 1867c478bd9Sstevel@tonic-gate 1877c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/v9/kmdb/%.c 1887c478bd9Sstevel@tonic-gate $(LINT.c) -c $< 1897c478bd9Sstevel@tonic-gate 1907c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/v9/kmdb/%.s 1917c478bd9Sstevel@tonic-gate $(LINT.s) -c $< 1927c478bd9Sstevel@tonic-gate 1937c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/v9/kmdb/kctl/%.s 1947c478bd9Sstevel@tonic-gate $(LINT.s) -c $< 1957c478bd9Sstevel@tonic-gate 1967c478bd9Sstevel@tonic-gate%.ln: $(SRC)/common/net/util/%.c 1977c478bd9Sstevel@tonic-gate $(LINT.c) -c $< 1987c478bd9Sstevel@tonic-gate 1991ae08745Sheppo%.ln: ../../../../../uts/sun4v/ml/%.s 2001ae08745Sheppo $(LINT.s) -c $< 2011ae08745Sheppo 2027c478bd9Sstevel@tonic-gate# 2037c478bd9Sstevel@tonic-gate# Installation targets 2047c478bd9Sstevel@tonic-gate# 2057c478bd9Sstevel@tonic-gate 2067c478bd9Sstevel@tonic-gate$(ROOT_MISC_DIR) $(ROOT_MISC_DIR_64): 20748bc00d6Sjmcp -$(INS.dir) 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gate$(ROOT_MISC_DIR)/%: % $(ROOT_MISC_DIR) 2107c478bd9Sstevel@tonic-gate $(INS.file) 2117c478bd9Sstevel@tonic-gate 2127c478bd9Sstevel@tonic-gate$(ROOT_MISC_DIR_64)/%: % $(ROOT_MISC_DIR_64) 2137c478bd9Sstevel@tonic-gate $(INS.file) 214