xref: /illumos-gate/usr/src/cmd/sgs/liblddbg/Makefile.com (revision fb3b6bbf2c922827ddf076fbf2172d96c58a71de)
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#
26
27LIBRARY =	liblddbg.a
28VERS =		.4
29
30COMOBJS =	args.o		audit.o		basic.o		debug.o \
31		syminfo.o	tls.o
32
33COMOBJS32 =	bindings32.o	cap32.o		dlfcns32.o	dynamic32.o \
34		elf32.o		entry32.o	files32.o	got32.o \
35		libs32.o	map32.o		move32.o	phdr32.o \
36		relocate32.o	sections32.o	segments32.o	shdr32.o \
37		statistics32.o	support32.o	syms32.o	unused32.o \
38		util32.o	version32.o
39
40COMOBJS64 =	bindings64.o	cap64.o		dlfcns64.o	dynamic64.o \
41		elf64.o		entry64.o	files64.o	got64.o \
42		libs64.o	map64.o		move64.o	phdr64.o \
43		relocate64.o	sections64.o	segments64.o	shdr64.o \
44		statistics64.o	support64.o	syms64.o	unused64.o \
45		util64.o	version64.o
46
47BLTOBJ =	msg.o
48
49TOOLOBJ =	alist.o
50
51OBJECTS =	$(BLTOBJ) $(COMOBJS) $(COMOBJS32) $(COMOBJS64) $(TOOLOBJ)
52
53
54include		$(SRC)/lib/Makefile.lib
55include		$(SRC)/cmd/sgs/Makefile.com
56
57SRCDIR =	../common
58
59LINTFLAGS +=	-u -D_REENTRANT
60LINTFLAGS64 +=	-u -D_REENTRANT
61
62CERRWARN +=	-_gcc=-Wno-unused-value
63CERRWARN +=	-_gcc=-Wno-uninitialized
64CERRWARN +=	-_gcc=-Wno-parentheses
65
66CPPFLAGS +=	-I$(SRCBASE)/lib/libc/inc
67DYNFLAGS +=	$(VERSREF) $(CC_USE_PROTO) '-R$$ORIGIN'
68LDLIBS +=	$(CONVLIBDIR) $(CONV_LIB) -lc
69
70native :=	DYNFLAGS	+= $(CONVLIBDIR)
71native :=	CPPFLAGS	+= -DNATIVE_BUILD
72
73BLTDEFS =	msg.h
74BLTDATA =	msg.c
75BLTMESG =	$(SGSMSGDIR)/liblddbg
76
77BLTFILES =	$(BLTDEFS) $(BLTDATA) $(BLTMESG)
78
79SGSMSGCOM =	../common/liblddbg.msg
80SGSMSGALL =	$(SGSMSGCOM)
81SGSMSGTARG =	$(SGSMSGCOM)
82SGSMSGFLAGS +=	-h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n liblddbg_msg
83
84CHKSRCS =	$(COMOBJS32:%32.o=../common/%.c)
85
86SRCS =		../common/llib-llddbg
87LIBSRCS =	$(COMOBJS:%.o=../common/%.c) \
88		$(TOOLOBJ:%.o=$(SGSTOOLS)/common/%.c) $(BLTDATA)
89
90LINTSRCS =	$(LIBSRCS) ../common/lintsup.c
91LINTSRCS32 =	$(COMOBJS32:%32.o=../common/%.c)
92LINTSRCS64 =	$(COMOBJS64:%64.o=../common/%.c)
93
94CLEANFILES +=	$(LINTOUTS) $(BLTFILES)
95CLOBBERFILES +=	$(DYNLIB) $(LINTLIBS) $(LIBLINKS)
96
97ROOTFS_DYNLIB =	$(DYNLIB:%=$(ROOTFS_LIBDIR)/%)
98