xref: /titanic_51/usr/src/cmd/sgs/rtld/sparcv9/Makefile (revision 3e0c804466b61d42dc6a3e1cb114c11681ef181a)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
55aefb655Srie# Common Development and Distribution License (the "License").
65aefb655Srie# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
215aefb655Srie
227c478bd9Sstevel@tonic-gate#
23cd3e9333SAli Bahrami# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gate# Object lists are organized into primary (most frequently used code) and
277c478bd9Sstevel@tonic-gate# secondary lists (less frequently used code, ie. a.out support).
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateP_COMOBJS=	debugdata.o \
3010a4fa49Srie		analyze.o	elf.o		external.o	globals.o \
3110a4fa49Srie		malloc.o	paths.o		setup.o		util.o \
327c478bd9Sstevel@tonic-gate		dlfcns.o	config_elf.o	locale.o	tsort.o \
3356deab07SRod Evans		remove.o	move.o		tls.o		cap.o
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateS_COMOBJS=	debug.o		audit.o		object.o
367c478bd9Sstevel@tonic-gate
377c478bd9Sstevel@tonic-gateG_MACHOBJS=	doreloc.o
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateP_MACHOBJS=	sparc_elf.o	_setup.o
407c478bd9Sstevel@tonic-gate
41e127a3e7SrafCP_MACHOBJS=	common_sparc.o
427c478bd9Sstevel@tonic-gate
437c478bd9Sstevel@tonic-gateS_MACHOBJS=
447c478bd9Sstevel@tonic-gate
4556deab07SRod EvansP_ASOBJS=	boot.o		boot_elf.o	caller.o
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gateS_ASOBJS=
487c478bd9Sstevel@tonic-gate
49*3e0c8044SRichard LoweCRTSRCS=	../../../../lib/crt/sparc
507c478bd9Sstevel@tonic-gateCRTI=		pics/crti.o
517c478bd9Sstevel@tonic-gateCRTN=		pics/crtn.o
527c478bd9Sstevel@tonic-gateCRTS=		$(CRTI)		$(CRTN)
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gateCHKSRCS=	$(SRCBASE)/uts/common/krtld/reloc.h
557c478bd9Sstevel@tonic-gate
567c478bd9Sstevel@tonic-gateBASEPLAT =	sparc
577c478bd9Sstevel@tonic-gate
5880ab886dSwesolowsinclude		$(SRC)/Makefile.master
597c478bd9Sstevel@tonic-gate
607c478bd9Sstevel@tonic-gate# We build sparc objects with cc by default
617c478bd9Sstevel@tonic-gateMAPFILE-ORDER =		../common/mapfile-order-devpro
6280ab886dSwesolows$(__GNUC64)MAPFILE-ORDER =	../common/mapfile-order-gcc
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gateinclude		$(SRC)/cmd/sgs/rtld/Makefile.com
657c478bd9Sstevel@tonic-gateinclude		$(SRC)/lib/Makefile.lib.64
667c478bd9Sstevel@tonic-gate
677c478bd9Sstevel@tonic-gate# Add any machine specific flags.
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gateCPPFLAGS +=	-I../../../../uts/sparc/krtld
707c478bd9Sstevel@tonic-gateCFLAGS +=	-xregs=no%appl
717c478bd9Sstevel@tonic-gateASFLAGS +=	-s -K pic -D__sparcv9 -D_ELF64 $(sparcv9_XARCH)
727c478bd9Sstevel@tonic-gateADBGENFLAGS +=	-mlp64
737c478bd9Sstevel@tonic-gateADBGENCFLAGS +=	-erroff=%all
747c478bd9Sstevel@tonic-gateADBSUB=		$(ADBSUB64)
757c478bd9Sstevel@tonic-gateCPPFLAGS +=	-D_ELF64
767c478bd9Sstevel@tonic-gateLINTFLAGS64 +=	$(VAR_LINTFLAGS64)
7720c1c355SRod EvansSONAME=		/lib/sparcv9/ld.so.1
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gateSGSMSGTARG +=	$(SGSMSGSPARC) $(SGSMSGSPARC64) $(SGSMSG64)
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gateLDLIB =		-L ../../libld/$(MACH64)
827c478bd9Sstevel@tonic-gateRTLDLIB =	-L ../../librtld/$(MACH64)
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gateCPICLIB =	$(CPICLIB64)
857c478bd9Sstevel@tonic-gateLDDBGLIBDIR =	$(LDDBGLIBDIR64)
867c478bd9Sstevel@tonic-gateCONVLIBDIR =	$(CONVLIBDIR64)
877c478bd9Sstevel@tonic-gate
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate.KEEP_STATE:
907c478bd9Sstevel@tonic-gate
917c478bd9Sstevel@tonic-gateall:		$(RTLD)
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gateinstall:	all $(ROOTDYNLIB64)
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gatelint:		$(LINTOUT64)
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gateadbmacros:	adb .WAIT $(ADBSCRIPTS)
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gateadbinstall:	adbmacros .WAIT $(ROOTADB64)
1007c478bd9Sstevel@tonic-gate
1017c478bd9Sstevel@tonic-gatepics/%.o:	../sparc/%.c
102635216b6SRod Evans		$(COMPILE.c) -o $@ $<
1037c478bd9Sstevel@tonic-gate		$(POST_PROCESS_O)
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gateinclude		$(SRC)/cmd/sgs/rtld/Makefile.targ
1067c478bd9Sstevel@tonic-gateinclude		../../Makefile.sub.64
107