xref: /illumos-gate/usr/src/tools/ctf/dwarf/Makefile.com (revision 9b9d39d2a32ff806d2431dbcc50968ef1e6d46b2)
1#
2# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
3# Use is subject to license terms.
4#
5# Copyright 2011, Richard Lowe.
6#
7# Copyright (c) 2018, Joyent, Inc.
8
9include ../../Makefile.ctf
10
11LIBRARY=	libdwarf.a
12VERS=		.1
13
14OBJECTS=dwarf_abbrev.o		\
15	dwarf_alloc.o		\
16	dwarf_arange.o		\
17	dwarf_debuglink.o	\
18	dwarf_die_deliv.o	\
19	dwarf_dnames.o		\
20	dwarf_dsc.o		\
21	dwarf_elf_access.o	\
22	dwarf_elf_load_headers.o \
23	dwarf_elf_rel_detector.o \
24	dwarf_elfread.o		\
25	dwarf_error.o		\
26	dwarf_form.o		\
27	dwarf_frame.o		\
28	dwarf_frame2.o		\
29	dwarf_funcs.o		\
30	dwarf_gdbindex.o	\
31	dwarf_generic_init.o	\
32	dwarf_global.o		\
33	dwarf_groups.o		\
34	dwarf_harmless.o	\
35	dwarf_init_finish.o	\
36	dwarf_leb.o		\
37	dwarf_line.o		\
38	dwarf_loc.o		\
39	dwarf_locationop_read.o \
40	dwarf_loclists.o	\
41	dwarf_machoread.o	\
42	dwarf_macro.o		\
43	dwarf_macro5.o		\
44	dwarf_names.o		\
45	dwarf_object_detector.o	\
46	dwarf_object_read_common.o \
47	dwarf_original_elf_init.o	\
48	dwarf_peread.o		\
49	dwarf_print_lines.o	\
50	dwarf_pubtypes.o	\
51	dwarf_query.o		\
52	dwarf_ranges.o		\
53	dwarf_rnglists.o	\
54	dwarf_str_offsets.o	\
55	dwarf_stringsection.o	\
56	dwarf_stubs.o		\
57	dwarf_tied.o		\
58	dwarf_tsearchhash.o	\
59	dwarf_types.o		\
60	dwarf_util.o		\
61	dwarf_vars.o		\
62	dwarf_weaks.o		\
63	dwarf_xu_index.o	\
64	dwarfstring.o		\
65	dwgetopt.o		\
66	gennames.o		\
67	malloc_check.o		\
68	pro_alloc.o		\
69	pro_arange.o		\
70	pro_die.o		\
71	pro_dnames.o		\
72	pro_encode_nm.o		\
73	pro_error.o		\
74	pro_expr.o		\
75	pro_finish.o		\
76	pro_forms.o		\
77	pro_frame.o		\
78	pro_funcs.o		\
79	pro_init.o		\
80	pro_line.o		\
81	pro_log_extra_flag_strings.o \
82	pro_macinfo.o		\
83	pro_pubnames.o		\
84	pro_reloc_stream.o	\
85	pro_reloc_symbolic.o	\
86	pro_reloc.o		\
87	pro_section.o		\
88	pro_types.o		\
89	pro_vars.o		\
90	pro_weaks.o
91
92include $(SRC)/lib/Makefile.lib
93include $(SRC)/tools/Makefile.tools
94
95FILEMODE =	0755
96SRCDIR =	$(SRC)/lib/libdwarf/common/
97SRCS =		$(PICS:%.o=$(SRCDIR)/%.c)
98
99CPPFLAGS +=	-I$(SRCDIR) -DELF_TARGET_ALL=1
100CERRWARN +=	-_gcc=-Wno-unused
101CERRWARN +=	-_gcc=-Wno-implicit-function-declaration
102
103# libdwarf not clean
104SMATCH=off
105
106DYNFLAGS += '-R$$ORIGIN/../../lib/$(MACH)'
107LDLIBS = -lelf -lc -lz
108NATIVE_LIBS += libelf.so libc.so libz.so
109
110.KEEP_STATE:
111.PARALLEL:
112
113all:	$(DYNLIB)
114
115install: all $(ROOTONBLDLIBMACH)/libdwarf.so.1 $(ROOTONBLDLIBMACH)/libdwarf.so
116
117$(ROOTONBLDLIBMACH)/%: %
118	$(INS.file)
119
120$(ROOTONBLDLIBMACH)/$(LIBLINKS): $(ROOTONBLDLIBMACH)/$(LIBLINKS)$(VERS)
121	$(INS.liblink)
122
123FRC:
124
125# We can't provide CTF information for libdwarf, as the CTF tools themselves
126# depond upon it, and so aren't built yet.
127$(DYNLIB) := CTFMERGE_POST= :
128CTFCONVERT_O= :
129
130include $(SRC)/lib/Makefile.targ
131