xref: /titanic_41/usr/src/cmd/sgs/rtld/sparcv9/Makefile (revision ba2e4443695ee6a6f420a35cd4fc3d3346d22932)
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		external.o	globals.o \
34		malloc.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
62include		$(SRC)/Makefile.master
63
64# We build sparc objects with cc by default
65MAPFILE-ORDER =		../common/mapfile-order-devpro
66$(__GNUC64)MAPFILE-ORDER =	../common/mapfile-order-gcc
67
68include		$(SRC)/cmd/sgs/rtld/Makefile.com
69include		$(SRC)/lib/Makefile.lib.64
70
71# Add any machine specific flags.
72
73CPPFLAGS +=	-I../../../../uts/sparc/krtld
74CFLAGS +=	-xregs=no%appl
75ASFLAGS +=	-s -K pic -D__sparcv9 -D_ELF64 $(sparcv9_XARCH)
76ADBGENFLAGS +=	-mlp64
77ADBGENCFLAGS +=	-erroff=%all
78ADBSUB=		$(ADBSUB64)
79CPPFLAGS +=	-D_ELF64
80LINTFLAGS64 +=	$(VAR_LINTFLAGS64)
81SONAME=		$(VAR_RTLD_V9_SONAME)
82
83MAPFILES +=	../common/mapfile-64-vers
84
85SGSMSGTARG +=	$(SGSMSGSPARC) $(SGSMSGSPARC64) $(SGSMSG64)
86
87LDLIB =		-L ../../libld/$(MACH64)
88RTLDLIB =	-L ../../librtld/$(MACH64)
89
90CPICLIB =	$(CPICLIB64)
91LDDBGLIBDIR =	$(LDDBGLIBDIR64)
92CONVLIBDIR =	$(CONVLIBDIR64)
93
94
95.KEEP_STATE:
96
97all:		$(RTLD)
98
99install:	all $(ROOTDYNLIB64)
100
101lint:		$(LINTOUT64)
102
103adbmacros:	adb .WAIT $(ADBSCRIPTS)
104
105adbinstall:	adbmacros .WAIT $(ROOTADB64)
106
107pics/%.o:	../sparc/%.c
108		$(COMPILE.c) -o $@ $< $(WARNFLAGS)
109		$(POST_PROCESS_O)
110
111include		$(SRC)/cmd/sgs/rtld/Makefile.targ
112include		../../Makefile.sub.64
113