xref: /titanic_51/usr/src/cmd/sgs/liblddbg/Makefile.com (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29LIBRARY=	liblddbg.a
30VERS=		.4
31
32COMOBJS=	args.o		bindings.o	cap.o		debug.o	\
33		dynamic.o	entry.o		elf.o		files.o \
34		libs.o		map.o		phdr.o \
35		relocate.o	sections.o	segments.o	shdr.o \
36		support.o	syms.o		audit.o		util.o \
37		version.o	got.o		move.o		statistics.o \
38		tls.o		unused.o
39COMOBJS64=	files64.o	map64.o		relocate64.o	sections64.o \
40		segments64.o	syms64.o	audit64.o	got64.o \
41		move64.o	version64.o	statistics64.o	tls64.o \
42		unused64.o	cap64.o
43BLTOBJ=		msg.o
44
45OBJECTS=	$(BLTOBJ)  $(COMOBJS)  $(COMOBJS64)
46
47include		$(SRC)/lib/Makefile.lib
48include		$(SRC)/cmd/sgs/Makefile.com
49
50MAPFILES=	../common/mapfile-vers
51MAPOPTS=	$(MAPFILES:%=-M%)
52
53
54CPPFLAGS +=	-I$(SRCBASE)/lib/libc/inc $(VAR_LIBLDDBG_CPPFLAGS)
55DYNFLAGS +=	$(VERSREF) $(CONVLIBDIR) $(ZLAZYLOAD)
56LDLIBS +=	-lconv -lc
57LINTFLAGS +=	-u $(CONVLIBDIR) -D_REENTRANT
58LINTFLAGS64 +=	-u $(CONVLIBDIR64) -D_REENTRANT -erroff=E_CAST_INT_TO_SMALL_INT
59
60
61# A bug in pmake causes redundancy when '+=' is conditionally assigned, so
62# '=' is used with extra variables.
63# $(DYNLIB) :=  DYNFLAGS += -Yl,$(SGSPROTO)
64#
65XXXFLAGS=
66$(DYNLIB) :=    XXXFLAGS= $(USE_PROTO) $(MAPOPTS)
67DYNFLAGS +=     $(XXXFLAGS)
68
69native :=	MAPOPTS=
70native :=	DYNFLAGS	+= $(CONVLIBDIR)
71
72BLTDEFS=	msg.h
73BLTDATA=	msg.c
74BLTMESG=	$(SGSMSGDIR)/liblddbg
75
76BLTFILES=	$(BLTDEFS) $(BLTDATA) $(BLTMESG)
77
78SGSMSGCOM=	../common/liblddbg.msg
79SGSMSGTARG=	$(SGSMSGCOM)
80SGSMSGALL=	$(SGSMSGCOM)
81
82SGSMSGFLAGS +=	-h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n liblddbg_msg
83
84SRCS=		../common/llib-llddbg
85LIBSRCS=	$(COMOBJS:%.o=../common/%.c)  $(BLTDATA)
86LIBSRCS64=	$(COMOBJS64:%64.o=%.c)
87LINTSRCS=	$(LIBSRCS) ../common/lintsup.c
88
89CLEANFILES +=	$(LINTOUTS) $(LINTLIBS) $(BLTFILES)
90CLOBBERFILES +=	$(DYNLIB)  $(LINTLIBS) $(LIBLINKS)
91
92ROOTFS_DYNLIB=	$(DYNLIB:%=$(ROOTFS_LIBDIR)/%)
93