xref: /titanic_50/usr/src/cmd/sgs/rtld/sparcv9/Makefile (revision 80148899834a4078a2bd348504aa2d6de9752837)
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 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27# Object lists are organized into primary (most frequently used code) and
28# secondary lists (less frequently used code, ie. a.out support).
29
30P_COMOBJS=	debugdata.o \
31		analyze.o	elf.o		external.o	globals.o \
32		malloc.o	paths.o		setup.o		util.o \
33		dlfcns.o	config_elf.o	locale.o	tsort.o \
34		remove.o	move.o		tls.o		cap.o
35
36S_COMOBJS=	debug.o		audit.o		object.o
37
38G_MACHOBJS=	doreloc.o
39
40P_MACHOBJS=	sparc_elf.o	_setup.o
41
42CP_MACHOBJS=	common_sparc.o
43
44S_MACHOBJS=
45
46P_ASOBJS=	boot.o		boot_elf.o	caller.o
47
48S_ASOBJS=
49
50CRTSRCS=	../../../../lib/common/sparcv9
51CRTI=		pics/crti.o
52CRTN=		pics/crtn.o
53CRTS=		$(CRTI)		$(CRTN)
54
55CHKSRCS=	$(SRCBASE)/uts/common/krtld/reloc.h
56
57BASEPLAT =	sparc
58
59include		$(SRC)/Makefile.master
60
61# We build sparc objects with cc by default
62MAPFILE-ORDER =		../common/mapfile-order-devpro
63$(__GNUC64)MAPFILE-ORDER =	../common/mapfile-order-gcc
64
65include		$(SRC)/cmd/sgs/rtld/Makefile.com
66include		$(SRC)/lib/Makefile.lib.64
67
68# Add any machine specific flags.
69
70CPPFLAGS +=	-I../../../../uts/sparc/krtld
71CFLAGS +=	-xregs=no%appl
72ASFLAGS +=	-s -K pic -D__sparcv9 -D_ELF64 $(sparcv9_XARCH)
73ADBGENFLAGS +=	-mlp64
74ADBGENCFLAGS +=	-erroff=%all
75ADBSUB=		$(ADBSUB64)
76CPPFLAGS +=	-D_ELF64
77LINTFLAGS64 +=	$(VAR_LINTFLAGS64)
78SONAME=		$(VAR_RTLD_V9_SONAME)
79
80MAPFILES +=	../common/mapfile-64-vers
81
82SGSMSGTARG +=	$(SGSMSGSPARC) $(SGSMSGSPARC64) $(SGSMSG64)
83
84LDLIB =		-L ../../libld/$(MACH64)
85RTLDLIB =	-L ../../librtld/$(MACH64)
86
87CPICLIB =	$(CPICLIB64)
88LDDBGLIBDIR =	$(LDDBGLIBDIR64)
89CONVLIBDIR =	$(CONVLIBDIR64)
90
91
92.KEEP_STATE:
93
94all:		$(RTLD)
95
96install:	all $(ROOTDYNLIB64)
97
98lint:		$(LINTOUT64)
99
100adbmacros:	adb .WAIT $(ADBSCRIPTS)
101
102adbinstall:	adbmacros .WAIT $(ROOTADB64)
103
104pics/%.o:	../sparc/%.c
105		$(COMPILE.c) -o $@ $<
106		$(POST_PROCESS_O)
107
108include		$(SRC)/cmd/sgs/rtld/Makefile.targ
109include		../../Makefile.sub.64
110