xref: /illumos-gate/usr/src/cmd/sgs/rtld/amd64/Makefile (revision 7c478bd9)
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 2005 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=	amd64_elf.o	_setup.o	zero.o  \
44		dlamd64getunwind.o
45
46CP_MACHOBJS=	dtrace_data.o
47
48S_MACHOBJS=
49
50P_ASOBJS=	boot.o		boot_elf.o	caller.o
51
52S_ASOBJS=
53
54CRTSRCS=	../../../../lib/common/amd64
55CRTI=		pics/crti.o
56CRTN=		pics/crtn.o
57CRTS=		$(CRTI)		$(CRTN)
58
59BASEPLAT=	amd64
60
61include		$(SRC)/Makefile.master
62
63# We build 64-bit objects with gcc by default
64MAPFILE-ORDER =			../common/mapfile-order-devpro
65$(__GNUC64)MAPFILE-ORDER =	../common/mapfile-order-gcc
66
67MAPFILE-PLAT =		 mapfile-amd64-vers
68
69include		$(SRC)/cmd/sgs/rtld/Makefile.com
70include		$(SRC)/lib/Makefile.lib.64
71
72
73# Add any machine specific flags.
74
75CPPFLAGS +=	-I../../../../uts/intel/amd64/krtld -DELF_TARGET_AMD64
76CFLAGS +=	-xregs=no%appl
77ASFLAGS +=	-D__amd64 -D_ELF64 $(amd64_ASFLAGS)
78ADBGENFLAGS +=	-mlp64
79ADBGENCFLAGS +=	-erroff=%all
80ADBSUB=		$(ADBSUB64)
81CPPFLAGS +=	-D_ELF64
82LINTFLAGS64 +=	$(VAR_LINTFLAGS64)
83SONAME=		/lib/amd64/ld.so.1
84
85SGSMSGTARG +=	$(SGSMSGINTEL) $(SGSMSGINTEL64) $(SGSMSG64)
86
87DYNFLAGS +=	-zdtrace=dtrace_data
88
89LDLIB =		-L ../../libld/$(MACH64)
90RTLDLIB =	-L ../../librtld/$(MACH64)
91
92CPICLIB =	$(CPICLIB64)
93LDDBGLIBDIR =	$(LDDBGLIBDIR64)
94CONVLIBDIR =	$(CONVLIBDIR64)
95
96
97.KEEP_STATE:
98
99all:		$(RTLD)
100
101install:	all $(ROOTDYNLIB64)
102
103lint:		$(LINTOUT64)
104
105adbmacros:	adb .WAIT $(ADBSCRIPTS)
106
107adbinstall:	adbmacros .WAIT $(ROOTADB64)
108
109
110pics/%.o:	$(SRCBASE)/uts/intel/amd64/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