xref: /titanic_52/usr/src/cmd/sgs/liblddbg/Makefile.com (revision ba4e3c84e6b9390bbf7df80b5f1d11dec34cc525)
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 2006 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		audit.o		debug.o		syminfo.o \
33		tls.o
34
35COMOBJS32 =	bindings32.o	cap32.o		dynamic32.o	elf32.o \
36		entry32.o	files32.o	got32.o 	libs32.o \
37		map32.o		move32.o	phdr32.o	relocate32.o \
38		sections32.o	segments32.o	shdr32.o	statistics32.o \
39		support32.o	syms32.o	unused32.o	util32.o \
40		version32.o
41
42COMOBJS64 =	bindings64.o	cap64.o		dynamic64.o	elf64.o \
43		entry64.o	files64.o	got64.o		libs64.o \
44		map64.o		move64.o	phdr64.o	relocate64.o \
45		sections64.o	segments64.o	shdr64.o	statistics64.o \
46		support64.o	syms64.o	unused64.o	util64.o \
47		version64.o
48
49BLTOBJ =	msg.o
50
51TOOLOBJ =	alist.o
52
53OBJECTS =	$(BLTOBJ) $(COMOBJS) $(COMOBJS32) $(COMOBJS64) $(TOOLOBJ)
54
55
56include		$(SRC)/lib/Makefile.lib
57include		$(SRC)/cmd/sgs/Makefile.com
58
59MAPFILES +=	../common/mapfile-vers
60MAPOPTS =	$(MAPFILES:%=-M%)
61
62LINTFLAGS +=	-u -D_REENTRANT
63LINTFLAGS64 +=	-u -D_REENTRANT
64
65CPPFLAGS +=	-I$(SRCBASE)/lib/libc/inc $(VAR_LIBLDDBG_CPPFLAGS)
66DYNFLAGS +=	$(VERSREF) $(MAPOPTS) $(ZLAZYLOAD) '-R$$ORIGIN'
67LDLIBS +=	$(CONVLIBDIR) $(CONV_LIB) -lc
68
69# A bug in pmake causes redundancy when '+=' is conditionally assigned, so
70# '=' is used with extra variables.
71# $(DYNLIB) :=  DYNFLAGS += $(USE_PROTO)
72#
73XXXFLAGS=
74$(DYNLIB) :=	XXXFLAGS= $(USE_PROTO)
75DYNFLAGS +=     $(XXXFLAGS)
76
77native :=	MAPOPTS=
78native :=	DYNFLAGS	+= $(CONVLIBDIR)
79
80BLTDEFS =	msg.h
81BLTDATA =	msg.c
82BLTMESG =	$(SGSMSGDIR)/liblddbg
83
84BLTFILES =	$(BLTDEFS) $(BLTDATA) $(BLTMESG)
85
86SGSMSGCOM =	../common/liblddbg.msg
87SGSMSGALL =	$(SGSMSGCOM)
88SGSMSGTARG =	$(SGSMSGCOM)
89SGSMSGFLAGS +=	-h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n liblddbg_msg
90
91CHKSRCS =	$(COMOBJS32:%32.o=../common/%.c)
92
93SRCS =		../common/llib-llddbg
94LIBSRCS =	$(COMOBJS:%.o=../common/%.c) \
95		$(TOOLOBJ:%.o=$(SGSTOOLS)/common/%.c) $(BLTDATA)
96
97LINTSRCS =	$(LIBSRCS) ../common/lintsup.c
98LINTSRCS32 =	$(COMOBJS32:%32.o=../common/%.c)
99LINTSRCS64 =	$(COMOBJS64:%64.o=../common/%.c)
100
101CLEANFILES +=	$(LINTOUTS) $(BLTFILES)
102CLOBBERFILES +=	$(DYNLIB) $(LINTLIBS) $(LIBLINKS)
103
104ROOTFS_DYNLIB =	$(DYNLIB:%=$(ROOTFS_LIBDIR)/%)
105