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