xref: /titanic_52/usr/src/cmd/mdb/sun4u/v9/kmdb/Makefile (revision 48bc00d6814e04ff3edb32cafe7d1bc580baff68)
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#
217c478bd9Sstevel@tonic-gate#
22*48bc00d6Sjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
25*48bc00d6Sjmcp
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gateall: $(PROG)
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gate%.o: ../../../sparc/mdb/%.c
307c478bd9Sstevel@tonic-gate	$(COMPILE.c) $<
317c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/mdb/%.c
347c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
357c478bd9Sstevel@tonic-gate
367c478bd9Sstevel@tonic-gatekaif.fth: ../../../sparc/v9/kmdb/kaif_regs.h
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gateROOT_MISC_DIR		= $(ROOT)/platform/sun4u/kernel/misc
397c478bd9Sstevel@tonic-gateROOT_MISC_DIR_64	= $(ROOT_MISC_DIR)/$(SUBDIR64)
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gateROOTMISC		= $(ROOT_MISC_DIR)/$(PROG)
427c478bd9Sstevel@tonic-gateROOTMISC64		= $(ROOT_MISC_DIR_64)/$(PROG)
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gateinclude ../../../../Makefile.cmd
457c478bd9Sstevel@tonic-gateinclude ../../../../Makefile.cmd.64
467c478bd9Sstevel@tonic-gateinclude ../../../sparc/Makefile.sparcv9
477c478bd9Sstevel@tonic-gateinclude ../../../sparc/Makefile.kmdb.64
487c478bd9Sstevel@tonic-gateinclude ../../../Makefile.kmdb
497c478bd9Sstevel@tonic-gate
50dc0093f4SeschrockSTANDLIBS += $(ROOT)/usr/lib/sparcv9/libstanddisasm.so
51dc0093f4Seschrock
527c478bd9Sstevel@tonic-gateKMDB_FPTEST = \
537c478bd9Sstevel@tonic-gate	$(FINDFP) -x kaif_resume -x kaif_trap_common $@
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gate#
567c478bd9Sstevel@tonic-gate# Uncomment the following line to enable trap accounting.  A DTLB translation
577c478bd9Sstevel@tonic-gate# will be added for the trap table, and each handler installed by KMDB will use
587c478bd9Sstevel@tonic-gate# its padding to keep a trap count.  See kaif_handlers.s.
597c478bd9Sstevel@tonic-gate#
607c478bd9Sstevel@tonic-gate#TRAPCOUNT = -DKMDB_TRAPCOUNT
617c478bd9Sstevel@tonic-gate
627c478bd9Sstevel@tonic-gateCPPFLAGS += -I../../../sparc/mdb -I.. -I$(SRC)/uts/sun4 -I$(SRC)/uts/sun4u $(TRAPCOUNT)
637c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/cmd/mdb/sparc/v9 -I$(SRC)/cmd/mdb/sparc/v9/kmdb
647c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/cmd/mdb/sparc
657c478bd9Sstevel@tonic-gateASFLAGS += -I$(SRC)/uts/sun4 -I$(SRC)/uts/sun4u $(TRAPCOUNT)
667c478bd9Sstevel@tonic-gateASFLAGS += -I$(SRC)/cmd/mdb/sparc
677c478bd9Sstevel@tonic-gateASFLAGS += -I$(SRC)/cmd/mdb/sparc/v9 -I$(SRC)/cmd/mdb/sparc/v9/kmdb
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gateinstall: all $(ROOTMISC64) kaif.fth
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gate#
727c478bd9Sstevel@tonic-gate# lint rules
737c478bd9Sstevel@tonic-gate#
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gate.PARALLEL: lintkmdb lintprom lintkctl
767c478bd9Sstevel@tonic-gate
777c478bd9Sstevel@tonic-gatelint: lintkmdb lintprom lintkctl
787c478bd9Sstevel@tonic-gate	$(LINT) $(ALLLINTFLAGS) $(KMDBOBJS:%.o=%.ln) $(PROMOBJS:%.o=%.ln)
797c478bd9Sstevel@tonic-gate
807c478bd9Sstevel@tonic-gatelintkmdb: $(KMDBOBJS:%.o=%.ln)
817c478bd9Sstevel@tonic-gate	$(LINT) $(LINTFLAGS) $(KMDBOBJS:%.o=%.ln)
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gatelintprom: $(PROMOBJS:%.o=%.ln)
847c478bd9Sstevel@tonic-gate	$(LINT) $(LINTFLAGS) $(PROMOBJS:%.o=%.ln)
857c478bd9Sstevel@tonic-gate
867c478bd9Sstevel@tonic-gatelintkctl: $(KCTLOBJS:%.o=%.ln)
877c478bd9Sstevel@tonic-gate	$(LINT) $(ALLLINTFLAGS) $(KCTLOBJS:%.o=%.ln)
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gatekaif_off.h: ../../../sparc/kmdb/kaif_off.in
907c478bd9Sstevel@tonic-gate	$(OFFSETS_CREATE) <../../../sparc/kmdb/kaif_off.in >$@
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gatekmdb_context_off.h: ../../../sparc/kmdb/kmdb_context_off.in
937c478bd9Sstevel@tonic-gate	$(OFFSETS_CREATE) <../../../sparc/kmdb/kmdb_context_off.in >$@
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gate#
967c478bd9Sstevel@tonic-gate# Dynamic rules for object construction
977c478bd9Sstevel@tonic-gate#
987c478bd9Sstevel@tonic-gate%.o: ../../../common/kmdb/%.c
997c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1007c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1017c478bd9Sstevel@tonic-gate
1027c478bd9Sstevel@tonic-gate%.o: ../../../common/kmdb/kctl/%.c
1037c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1047c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1057c478bd9Sstevel@tonic-gate
1067c478bd9Sstevel@tonic-gate%.o: ../../../common/kmdb/kctl/%.s
1077c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1087c478bd9Sstevel@tonic-gate
1097c478bd9Sstevel@tonic-gate%.o: ../../../common/mdb/%.c
1107c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1117c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1127c478bd9Sstevel@tonic-gate
1137c478bd9Sstevel@tonic-gate%.o: ../../../sparc/kmdb/%.c
1147c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1157c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1167c478bd9Sstevel@tonic-gate
1177c478bd9Sstevel@tonic-gate%.o: ../../../sparc/kmdb/%.s
1187c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1197c478bd9Sstevel@tonic-gate
1207c478bd9Sstevel@tonic-gate%.o: ../../../sparc/kmdb/kctl/%.c
1217c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1227c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1237c478bd9Sstevel@tonic-gate
1247c478bd9Sstevel@tonic-gate%.o: ../../../sparc/kmdb/kctl/%.s
1257c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1267c478bd9Sstevel@tonic-gate
1277c478bd9Sstevel@tonic-gate%.o: ../../../sparc/mdb/%.c
1287c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1297c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1307c478bd9Sstevel@tonic-gate
1317c478bd9Sstevel@tonic-gate%.o: ../../../sparc/v9/kmdb/%.c
1327c478bd9Sstevel@tonic-gate	$(COMPILE.c) -o $@ $<
1337c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1347c478bd9Sstevel@tonic-gate
1357c478bd9Sstevel@tonic-gate%.o: ../../../sparc/v9/kmdb/%.s
1367c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1377c478bd9Sstevel@tonic-gate
1387c478bd9Sstevel@tonic-gate%.o: ../../../sparc/v9/kmdb/kctl/%.s
1397c478bd9Sstevel@tonic-gate	$(COMPILE.s) -o $@ $<
1407c478bd9Sstevel@tonic-gate
1417c478bd9Sstevel@tonic-gate%.o: $(SRC)/common/net/util/%.c
1427c478bd9Sstevel@tonic-gate	$(COMPILE.c) $<
1437c478bd9Sstevel@tonic-gate	$(CTFCONVERT_O)
1447c478bd9Sstevel@tonic-gate
1457c478bd9Sstevel@tonic-gate#
1467c478bd9Sstevel@tonic-gate# Lint
1477c478bd9Sstevel@tonic-gate#
1487c478bd9Sstevel@tonic-gate
1497c478bd9Sstevel@tonic-gate%.ln: ../../../common/kmdb/%.c
1507c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
1517c478bd9Sstevel@tonic-gate
1527c478bd9Sstevel@tonic-gate%.ln: ../../../common/kmdb/kctl/%.c
1537c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
1547c478bd9Sstevel@tonic-gate
1557c478bd9Sstevel@tonic-gate%.ln: ../../../common/kmdb/kctl/%.s
1567c478bd9Sstevel@tonic-gate	$(LINT.s) -c $<
1577c478bd9Sstevel@tonic-gate
1587c478bd9Sstevel@tonic-gate%.ln: ../../../common/mdb/%.c
1597c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
1607c478bd9Sstevel@tonic-gate
1617c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/kmdb/%.c
1627c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
1637c478bd9Sstevel@tonic-gate
1647c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/kmdb/%.s
1657c478bd9Sstevel@tonic-gate	$(LINT.s) -c $<
1667c478bd9Sstevel@tonic-gate
1677c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/kmdb/kctl/%.c
1687c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
1697c478bd9Sstevel@tonic-gate
1707c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/kmdb/kctl/%.s
1717c478bd9Sstevel@tonic-gate	$(LINT.s) -c $<
1727c478bd9Sstevel@tonic-gate
1737c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/mdb/%.c
1747c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
1757c478bd9Sstevel@tonic-gate
1767c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/v9/kmdb/%.c
1777c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
1787c478bd9Sstevel@tonic-gate
1797c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/v9/kmdb/%.s
1807c478bd9Sstevel@tonic-gate	$(LINT.s) -c $<
1817c478bd9Sstevel@tonic-gate
1827c478bd9Sstevel@tonic-gate%.ln: ../../../sparc/v9/kmdb/kctl/%.s
1837c478bd9Sstevel@tonic-gate	$(LINT.s) -c $<
1847c478bd9Sstevel@tonic-gate
1857c478bd9Sstevel@tonic-gate%.ln: $(SRC)/common/net/util/%.c
1867c478bd9Sstevel@tonic-gate	$(LINT.c) -c $<
1877c478bd9Sstevel@tonic-gate
1887c478bd9Sstevel@tonic-gate#
1897c478bd9Sstevel@tonic-gate# Installation targets
1907c478bd9Sstevel@tonic-gate#
1917c478bd9Sstevel@tonic-gate
1927c478bd9Sstevel@tonic-gate$(ROOT_MISC_DIR) $(ROOT_MISC_DIR_64):
193*48bc00d6Sjmcp	-$(INS.dir)
1947c478bd9Sstevel@tonic-gate
1957c478bd9Sstevel@tonic-gate$(ROOT_MISC_DIR)/%: 	% $(ROOT_MISC_DIR)
1967c478bd9Sstevel@tonic-gate	$(INS.file)
1977c478bd9Sstevel@tonic-gate
1987c478bd9Sstevel@tonic-gate$(ROOT_MISC_DIR_64)/%:	% $(ROOT_MISC_DIR_64)
1997c478bd9Sstevel@tonic-gate	$(INS.file)
200