xref: /titanic_44/usr/src/cmd/trapstat/capabilities/Makefile.targ (revision 1e49577a7fcde812700ded04431b49d67cc57d6d)
1*1e49577aSRod Evans#
2*1e49577aSRod Evans# CDDL HEADER START
3*1e49577aSRod Evans#
4*1e49577aSRod Evans# The contents of this file are subject to the terms of the
5*1e49577aSRod Evans# Common Development and Distribution License (the "License").
6*1e49577aSRod Evans# You may not use this file except in compliance with the License.
7*1e49577aSRod Evans#
8*1e49577aSRod Evans# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*1e49577aSRod Evans# or http://www.opensolaris.org/os/licensing.
10*1e49577aSRod Evans# See the License for the specific language governing permissions
11*1e49577aSRod Evans# and limitations under the License.
12*1e49577aSRod Evans#
13*1e49577aSRod Evans# When distributing Covered Code, include this CDDL HEADER in each
14*1e49577aSRod Evans# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*1e49577aSRod Evans# If applicable, add the following below this CDDL HEADER, with the
16*1e49577aSRod Evans# fields enclosed by brackets "[]" replaced with your own identifying
17*1e49577aSRod Evans# information: Portions Copyright [yyyy] [name of copyright owner]
18*1e49577aSRod Evans#
19*1e49577aSRod Evans# CDDL HEADER END
20*1e49577aSRod Evans#
21*1e49577aSRod Evans
22*1e49577aSRod Evans#
23*1e49577aSRod Evans# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24*1e49577aSRod Evans#
25*1e49577aSRod Evans
26*1e49577aSRod Evans#
27*1e49577aSRod Evans# trapstat provides two families of trap tables for SPARC platforms, one for
28*1e49577aSRod Evans# sun4u, and one for sun4v.  Previous implementations provided these families by
29*1e49577aSRod Evans# invoking a platform specific binary (/usr/platform/$PLATFORM/sbin/trapstat).
30*1e49577aSRod Evans# trapstat itself was linked to /usr/lib/platexec, a shell script used to
31*1e49577aSRod Evans# discover the platform name, and exec the associated platform specific binary.
32*1e49577aSRod Evans#
33*1e49577aSRod Evans# The two trapstat trap tables are now encapsulated behind a symbol capabilities
34*1e49577aSRod Evans# routine get_trap_entry().  An instance of this routine is provided for sun4u,
35*1e49577aSRod Evans# and sun4v, and are identified with a machine hardware name via using
36*1e49577aSRod Evans# ../common/mapfile-cap.
37*1e49577aSRod Evans#
38*1e49577aSRod Evans# These object capabilities relocatable objects are then translated into symbol
39*1e49577aSRod Evans# capabilities relocatable objects, pics/symcap.o.
40*1e49577aSRod Evans#
41*1e49577aSRod Evans# The sun4u and sun4v families of symbol capabilities object are eventually
42*1e49577aSRod Evans# included in the final build of trapstat.
43*1e49577aSRod Evans
44*1e49577aSRod Evans$(SYMCAP):	$(OBJCAP)
45*1e49577aSRod Evans$(OBJCAP):	$(OBJECTS)
46*1e49577aSRod Evans
47*1e49577aSRod Evans# Combine all pic objects into one relocatable object.  Assign any capabilities
48*1e49577aSRod Evans# to this object, and define the interface.
49*1e49577aSRod Evans
50*1e49577aSRod Evansobjcap.o:	$(OBJECTS) $(MAPFILE-CAP)
51*1e49577aSRod Evans		$(LD) -r -o $@ $(MAPOPT-CAP) -Breduce $(OBJECTS)
52*1e49577aSRod Evans
53*1e49577aSRod Evans# Convert the combined object capabilities object into a symbol capabilities
54*1e49577aSRod Evans# object.
55*1e49577aSRod Evans
56*1e49577aSRod Evanssymcap.o:	$(OBJCAP)
57*1e49577aSRod Evans		$(LD) -r -o $@ -z symbolcap $(OBJCAP)
58*1e49577aSRod Evans
59*1e49577aSRod Evans# Create original object.
60*1e49577aSRod Evans
61*1e49577aSRod Evans%.o:		../sun4/%.c
62*1e49577aSRod Evans		$(COMPILE.c) -o $@ $<
63*1e49577aSRod Evans		$(POST_PROCESS_O)
64*1e49577aSRod Evans
65*1e49577aSRod Evansclean:
66*1e49577aSRod Evans		$(RM) $(OBJECTS)
67*1e49577aSRod Evans
68*1e49577aSRod Evanslint:
69*1e49577aSRod Evans
70*1e49577aSRod Evansinclude		$(SRC)/cmd/Makefile.targ
71