xref: /titanic_52/usr/src/cmd/sgs/rtld/sparcv9/Makefile (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 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	sunwmove.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
84SGSMSGTARG +=	$(SGSMSGSPARC) $(SGSMSGSPARC64) $(SGSMSG64)
85
86LDLIB =		-L ../../libld/$(MACH64)
87RTLDLIB =	-L ../../librtld/$(MACH64)
88
89CPICLIB =	$(CPICLIB64)
90LDDBGLIBDIR =	$(LDDBGLIBDIR64)
91CONVLIBDIR =	$(CONVLIBDIR64)
92
93
94.KEEP_STATE:
95
96all:		$(RTLD)
97
98install:	all $(ROOTDYNLIB64)
99
100lint:		$(LINTOUT64)
101
102adbmacros:	adb .WAIT $(ADBSCRIPTS)
103
104adbinstall:	adbmacros .WAIT $(ROOTADB64)
105
106pics/%.o:	../sparc/%.c
107		$(COMPILE.c) -o $@ $< $(WARNFLAGS)
108		$(POST_PROCESS_O)
109
110pics/%.o:	$(SRCBASE)/uts/sparc/krtld/%.c
111		$(COMPILE.c) -o $@ $<  $(WARNFLAGS)
112		$(POST_PROCESS_O)
113
114
115include		$(SRC)/cmd/sgs/rtld/Makefile.targ
116include		../../Makefile.sub.64
117