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