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