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