dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / sgs / libld / Makefile.com
blob8794f1cd1f43523bd8357405d8cae990dfb8f192
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
23 # Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24 # Use is subject to license terms.
27 LIBRARY =       libld.a
28 VERS =          .4
30 COMOBJS =       debug.o         globals.o       util.o
32 COMOBJS32 =     args32.o        entry32.o       exit32.o        groups32.o \
33                 ldentry32.o     ldlibs32.o      ldmachdep32.o   ldmain32.o \
34                 libs32.o        files32.o       map32.o         map_core32.o \
35                 map_support32.o map_v232.o      order32.o       outfile32.o \
36                 place32.o       relocate32.o    resolve32.o     sections32.o \
37                 sunwmove32.o    support32.o     syms32.o        update32.o \
38                 unwind32.o      version32.o     wrap32.o
40 COMOBJS64 =     args64.o        entry64.o       exit64.o        groups64.o \
41                 ldentry64.o     ldlibs64.o      ldmachdep64.o   ldmain64.o \
42                 libs64.o        files64.o       map64.o         map_core64.o \
43                 map_support64.o map_v264.o      order64.o       outfile64.o \
44                 place64.o       relocate64.o    resolve64.o     sections64.o \
45                 sunwmove64.o    support64.o     syms64.o        update64.o \
46                 unwind64.o      version64.o     wrap64.o
48 TOOLOBJS =      alist.o         assfail.o       findprime.o     string_table.o \
49                 strhash.o
50 AVLOBJ =        avl.o
52 # Relocation engine objects.
53 G_MACHOBJS32 =  doreloc_sparc_32.o doreloc_x86_32.o
54 G_MACHOBJS64 =  doreloc_sparc_64.o doreloc_x86_64.o
56 # Target specific objects (sparc/sparcv9)
57 L_SPARC_MACHOBJS32 =    machrel.sparc32.o       machsym.sparc32.o
58 L_SPARC_MACHOBJS64 =    machrel.sparc64.o       machsym.sparc64.o
60 # Target specific objects (i386/amd64)
61 E_X86_TOOLOBJS =        leb128.o
62 L_X86_MACHOBJS32 =      machrel.intel32.o
63 L_X86_MACHOBJS64 =      machrel.amd64.o
66 # All target specific objects rolled together
67 E_TOOLOBJS =    $(E_SPARC_TOOLOBJS) \
68         $(E_X86_TOOLOBJS)
69 L_MACHOBJS32 =  $(L_SPARC_MACHOBJS32) \
70         $(L_X86_MACHOBJS32)
71 L_MACHOBJS64 =  $(L_SPARC_MACHOBJS64) \
72         $(L_X86_MACHOBJS64)
76 BLTOBJ =        msg.o
77 ELFCAPOBJ =     elfcap.o
79 OBJECTS =       $(BLTOBJ) $(G_MACHOBJS32) $(G_MACHOBJS64) \
80                 $(L_MACHOBJS32) $(L_MACHOBJS64) \
81                 $(COMOBJS) $(COMOBJS32) $(COMOBJS64) \
82                 $(TOOLOBJS) $(E_TOOLOBJS) $(AVLOBJ) $(ELFCAPOBJ)
84 include         $(SRC)/lib/Makefile.lib
85 include         $(SRC)/cmd/sgs/Makefile.com
87 SRCDIR =        ../common
89 CERRWARN += -Wno-unused-value
90 CERRWARN += -Wno-parentheses
91 CERRWARN += -Wno-uninitialized
92 CERRWARN += -Wno-switch
93 CERRWARN += -Wno-char-subscripts
94 CERRWARN += -Wno-type-limits
96 # Location of the shared relocation engines maintained under usr/src/uts.
98 KRTLD_I386 = $(SRCTOP)/arch/x86/kernel/krtld/32
99 KRTLD_AMD64 = $(SRCTOP)/arch/x86/kernel/krtld/64
100 KRTLD_SPARC = $(SRCBASE)/uts/$(VAR_PLAT_sparc)/krtld
103 CPPFLAGS +=     -DUSE_LIBLD_MALLOC -I$(SRCBASE)/lib/libc/inc \
104                     -I$(SRCBASE)/uts/common/krtld -I$(SRCBASE)/uts/sparc \
105                     $(VAR_LIBLD_CPPFLAGS)
106 LDLIBS +=       $(CONVLIBDIR) $(CONV_LIB) $(LDDBGLIBDIR) $(LDDBG_LIB) \
107                     $(ELFLIBDIR) -lelf $(DLLIB) -lc
109 DYNFLAGS +=     $(VERSREF) $(CC_USE_PROTO) '-R$$ORIGIN'
111 native:=        DYNFLAGS        += $(CONVLIBDIR)
113 BLTDEFS =       msg.h
114 BLTDATA =       msg.c
115 BLTMESG =       $(SGSMSGDIR)/libld
117 BLTFILES =      $(BLTDEFS) $(BLTDATA) $(BLTMESG)
119 # Due to cross linking support, every copy of libld contains every message.
120 # However, we keep target specific messages in their own separate files for
121 # organizational reasons.
123 SGSMSGCOM =     ../common/libld.msg
124 SGSMSGSPARC =   ../common/libld.sparc.msg
125 SGSMSGINTEL =   ../common/libld.intel.msg
126 SGSMSGTARG =    $(SGSMSGCOM) $(SGSMSGSPARC) $(SGSMSGINTEL)
127 SGSMSGALL =     $(SGSMSGCOM) $(SGSMSGSPARC) $(SGSMSGINTEL)
129 SGSMSGFLAGS1 =  $(SGSMSGFLAGS) -m $(BLTMESG)
130 SGSMSGFLAGS2 =  $(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n libld_msg
132 CHKSRCS =       $(SRCTOP)/include/krtld/reloc.h \
133                 $(COMOBJS32:%32.o=../common/%.c) \
134                 $(L_MACHOBJS32:%32.o=../common/%.c) \
135                 $(L_MACHOBJS64:%64.o=../common/%.c) \
136                 $(KRTLD_I386)/doreloc.c \
137                 $(KRTLD_AMD64)/doreloc.c \
138                 $(KRTLD_SPARC)/doreloc.c
140 SRCS =          ../common/llib-lld
141 LIBSRCS =       $(TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \
142                 $(E_TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \
143                 $(COMOBJS:%.o=../common/%.c) \
144                 $(AVLOBJS:%.o=$(VAR_AVLDIR)/%.c) \
145                 $(BLTDATA)
147 CLEANFILES +=   $(BLTFILES)
148 CLOBBERFILES += $(DYNLIB) $(LIBLINKS)
150 ROOTFS_DYNLIB = $(DYNLIB:%=$(ROOTFS_LIBDIR)/%)