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