xref: /titanic_41/usr/src/cmd/sgs/libconv/Makefile.com (revision 47cd5876b2168926dea28a62f1857b167da29d6c)
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 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27LIBRARY =	libconv.a
28
29COMOBJS32 =	cap32.o			dynamic32.o \
30		elf32.o			globals32.o \
31		phdr32.o		\
32		relocate_i38632.o	relocate_amd6432.o \
33		relocate_sparc32.o	sections32.o \
34		symbols32.o		symbols_sparc32.o \
35		syminfo32.o
36
37COMOBJS64 =	cap64.o			dynamic64.o \
38		elf64.o			globals64.o \
39		phdr64.o		\
40		relocate_i38664.o	relocate_amd6464.o \
41		relocate_sparc64.o	sections64.o \
42		symbols64.o		symbols_sparc64.o \
43		syminfo64.o
44
45COMOBJS=	arch.o			c_literal.o \
46		config.o		corenote.o \
47		data.o			deftag.o \
48		demangle.o		dl.o \
49		dwarf.o			dwarf_ehe.o \
50		group.o			lddstub.o \
51		segments.o		version.o
52
53COMOBJS_NOMSG =	tokens.o
54
55COMOBJS_NOMSG32 = \
56		relocate32.o
57COMOBJS_NOMSG64 = \
58		relocate64.o
59
60ELFCAP_OBJS=	elfcap.o
61
62ASOBJS=		vernote.o
63
64OBJECTS =	$(COMOBJS) $(COMOBJS32) $(COMOBJS64) $(COMOBJS_NOMSG) \
65		$(COMOBJS_NOMSG32) $(COMOBJS_NOMSG64) $(ELFCAP_OBJS) $(ASOBJS)
66
67ELFCAP=		$(SRC)/common/elfcap
68
69#
70# This library is unusual since it's a static archive of PIC objects.
71# Since static archives should never contain CTF data (regardless of
72# whether the object code is position-independent), we disable CTF.
73#
74NOCTFOBJS =	$(OBJECTS)
75CTFMERGE_LIB =	:
76
77include 	$(SRC)/lib/Makefile.lib
78include 	$(SRC)/cmd/sgs/Makefile.com
79
80CTFCONVERT_O=
81
82README_REVISION=../../packages/common/readme_revision
83ONLDREADME=	../../packages/common/SUNWonld-README
84
85PICS=		$(OBJECTS:%=pics/%)
86
87CPPFLAGS +=	-I$(SRCBASE)/lib/libc/inc -I$(ELFCAP) \
88		-I$(SRC)/common/sgsrtcid $(VAR_LIBCONV_CPPFLAGS)
89
90ARFLAGS=	cr
91
92AS_CPPFLAGS=	-P -D_ASM $(CPPFLAGS)
93
94BLTDATA=	$(COMOBJS:%.o=%_msg.h) \
95		    $(COMOBJS32:%.o=%_msg.h) $(COMOBJS64:%.o=%_msg.h)
96
97SRCS=		../common/llib-lconv
98LINTSRCS=	$(COMOBJS:%.o=../common/%.c) \
99		    $(COMOBJS_NOMSG:%.o=../common/%.c) \
100		    $(ELFCOM_OBJS:%.o=$(ELFCAP)/%.c) ../common/lintsup.c
101LINTSRCS32 =	$(COMOBJS32:%32.o=../common/%.c)
102LINTSRCS64 =	$(COMOBJS64:%64.o=../common/%.c)
103
104# INTERNAL_RELEASE_BUILD is defined by standard full builds (nightly),
105# but not for sgs builds we do for development. The result of these
106# two lines is that dev builds pass -d to the readme_revision script,
107# generating a more detailed version string for the linker components
108# that includes the workspace, user, CR, and date. Official builds get
109# a simpler uncluttered version string.
110VERNOTE_DEBUG= -d
111$(INTERNAL_RELEASE_BUILD)VERNOTE_DEBUG=
112
113SGSMSGTARG=	$(COMOBJS:%.o=../common/%.msg) \
114		    $(COMOBJS32:%32.o=../common/%.msg) \
115		    $(COMOBJS64:%64.o=../common/%.msg)
116
117LINTFLAGS +=	-u
118LINTFLAGS64 +=	-u
119
120CLEANFILES +=	$(BLTDATA) $(LINTOUTS) bld_vernote vernote.s
121CLOBBERFILES +=	$(LINTLIBS)
122