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 (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
24# Copyright 2016 RackTop Systems.
25# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
26#
27
28LIBRARY =	liblddbg.a
29VERS =		.4
30
31COMOBJS =	args.o		audit.o		basic.o		debug.o \
32		syminfo.o	tls.o
33
34COMOBJS32 =	bindings32.o	cap32.o		dlfcns32.o	dynamic32.o \
35		elf32.o		entry32.o	files32.o	got32.o \
36		libs32.o	map32.o		move32.o	phdr32.o \
37		relocate32.o	sections32.o	segments32.o	shdr32.o \
38		statistics32.o	support32.o	syms32.o	unused32.o \
39		util32.o	version32.o
40
41COMOBJS64 =	bindings64.o	cap64.o		dlfcns64.o	dynamic64.o \
42		elf64.o		entry64.o	files64.o	got64.o \
43		libs64.o	map64.o		move64.o	phdr64.o \
44		relocate64.o	sections64.o	segments64.o	shdr64.o \
45		statistics64.o	support64.o	syms64.o	unused64.o \
46		util64.o	version64.o
47
48BLTOBJ =	msg.o
49
50SGSCOMMONOBJ =	alist.o
51
52OBJECTS =	$(BLTOBJ) $(COMOBJS) $(COMOBJS32) $(COMOBJS64) $(SGSCOMMONOBJ)
53
54
55include		$(SRC)/lib/Makefile.lib
56include		$(SRC)/lib/Makefile.rootfs
57include		$(SRC)/cmd/sgs/Makefile.com
58
59LIBS =		$(DYNLIB)
60
61COMPATLINKS =	usr/lib/$(DYNLIB)
62COMPATLINKS64 =	usr/lib/$(MACH64)/$(DYNLIB)
63
64SRCDIR =	$(SGSHOME)/liblddbg
65MAPFILEDIR =	$(SRCDIR)/common
66
67CERRWARN +=	-_gcc=-Wno-unused-value
68CERRWARN +=	$(CNOWARN_UNINIT)
69CERRWARN +=	-_gcc=-Wno-parentheses
70
71CPPFLAGS +=	-I$(SRC)/lib/libc/inc
72DYNFLAGS +=	$(VERSREF) '-R$$ORIGIN'
73LDLIBS +=	$(CONVLIBDIR) -lconv -lc
74
75BLTDEFS =	msg.h
76BLTDATA =	msg.c
77BLTMESG =	$(SGSMSGDIR)/liblddbg
78
79BLTFILES =	$(BLTDEFS) $(BLTDATA) $(BLTMESG)
80
81SGSMSGCOM =	$(SRCDIR)/common/liblddbg.msg
82SGSMSGALL =	$(SGSMSGCOM)
83SGSMSGTARG =	$(SGSMSGCOM)
84SGSMSGFLAGS +=	-h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n liblddbg_msg
85
86CHKSRCS =	$(COMOBJS32:%32.o=$(SRCDIR)/common/%.c)
87
88LIBSRCS =	$(COMOBJS:%.o=$(SRCDIR)/common/%.c) \
89		$(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) $(BLTDATA)
90
91CLEANFILES +=	$(BLTFILES)
92CLOBBERFILES +=	$(DYNLIB) $(LIBLINKS)
93
94