1#
2#
3#  Copyright (C) 2000,2003,2004,2006 Silicon Graphics, Inc.  All Rights Reserved.
4#
5#  This program is free software; you can redistribute it and/or modify it
6#  under the terms of version 2.1 of the GNU Lesser General Public License 
7#  as published by the Free Software Foundation.
8#
9#  This program is distributed in the hope that it would be useful, but
10#  WITHOUT ANY WARRANTY; without even the implied warranty of
11#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
12#
13#  Further, this software is distributed without any warranty that it is
14#  free of the rightful claim of any third person regarding infringement 
15#  or the like.  Any license provided herein, whether implied or 
16#  otherwise, applies only to this software file.  Patent licenses, if
17#  any, provided herein do not apply to combinations of this program with 
18#  other software, or any other product whatsoever.  
19#
20#  You should have received a copy of the GNU Lesser General Public 
21#  License along with this program; if not, write the Free Software 
22#  Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
23#  USA.
24#
25#  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
26#  Mountain View, CA 94043, or:
27#
28#  http://www.sgi.com
29#
30#  For further information regarding this notice, see:
31#
32#  http://oss.sgi.com/projects/GenInfo/NoticeExplan
33#
34#
35
36#
37#  Makefile for libdwarf
38#  This is made very simple so it should work with
39#  any 'make'.
40#
41
42srcdir =	@srcdir@
43VPATH =		@srcdir@
44
45prefix =	@prefix@
46exec_prefix =	@exec_prefix@
47bindir =	$(exec_prefix)/bin
48libdir =	$(exec_prefix)/lib
49
50INSTALL =	@INSTALL@
51INSTALL_PROGRAM = @INSTALL_PROGRAM@
52INSTALL_DATA =	@INSTALL_DATA@
53SHELL =		/bin/sh
54CC =		@CC@
55AR =		@AR@
56#ARFLAGS =	@ARFLAGS@
57RM =		rm
58RANLIB =	@RANLIB@
59DEFS =		@DEFS@
60LIBS =		@LIBS@
61INCLUDES =	-I. -I$(srcdir)
62CFLAGS =	@CFLAGS@ $(INCLUDES)
63# For more checking add -DWANT_LIBBDWARF_MALLOC_CHECK=1 to CFLAGS
64LDFLAGS =	@LDFLAGS@
65
66
67BUILD_BASE = .
68
69OBJS= dwarf_abbrev.o \
70        dwarf_alloc.o \
71        dwarf_arange.o \
72        dwarf_die_deliv.o \
73        dwarf_error.o \
74        dwarf_form.o \
75        dwarf_frame.o \
76        dwarf_frame2.o \
77        dwarf_frame3.o \
78        dwarf_funcs.o \
79        dwarf_global.o \
80        dwarf_init_finish.o  \
81        dwarf_line.o \
82        dwarf_line2.o \
83        dwarf_loc.o \
84        dwarf_query.o \
85        dwarf_string.o \
86        dwarf_stubs.o \
87        dwarf_pubtypes.o \
88        dwarf_types.o \
89        dwarf_util.o \
90        dwarf_leb.o \
91        dwarf_vars.o \
92        dwarf_weaks.o    \
93        dwarf_addr_finder.o \
94	dwarf_sort_line.o \
95	dwarf_print_lines.o \
96	dwarf_macro.o \
97	malloc_check.o \
98        pro_alloc.o \
99        pro_arange.o \
100        pro_die.o \
101	pro_encode_nm.o \
102        pro_error.o \
103        pro_expr.o \
104        pro_finish.o \
105        pro_forms.o \
106        pro_funcs.o \
107        pro_frame.o \
108        pro_init.o \
109        pro_line.o \
110        pro_reloc.o \
111        pro_reloc_stream.o \
112        pro_reloc_symbolic.o \
113        pro_pubnames.o \
114        pro_section.o \
115        pro_types.o \
116        pro_vars.o \
117	pro_macinfo.o \
118        pro_weaks.o
119        
120
121all: @build_shared@ @build_nonshared@
122
123libdwarf.a:	$(OBJS)
124	$(AR) $(ARFLAGS) $@ $(OBJS) 
125
126libdwarf.so:	$(OBJS)
127	$(CC) $(CFLAGS) -shared $(OBJS) -o $@
128
129none:
130	echo "do nothing"
131
132#
133# The following are very SGI-centric
134# psroff is just a troff formatter.
135# the .mm files are in ATT/USL/USG mm form.
136#
137
138psbld:		libdwarf2.1.ps libdwarf2p.1.ps dwarf.v2.ps index.v2.ps mips_extensions.ps
139
140# pr expands tabs to spaces: this avoids problems with tab
141# interpretation
142
143libdwarf2.1.ps:  $(BUILD_BASE)/libdwarf2.1.mm
144		pr -t -e $(BUILD_BASE)/libdwarf2.1.mm \
145		  | tbl | psroff -t -mm >libdwarf2.1.ps
146
147libdwarf2p.1.ps:  $(BUILD_BASE)/libdwarf2p.1.mm
148		pr -t -e  $(BUILD_BASE)/libdwarf2p.1.mm \
149		  | tbl | psroff -t -mm >libdwarf2p.1.ps
150
151# At present, the newIndex is not usable: we have no tools
152# to build a new index page at the moment.
153
154dwarf.v2.ps:	$(BUILD_BASE)/dwarf.v2.mm
155		pic $(BUILD_BASE)/dwarf.v2.mm \
156		  | tbl | psroff -t -mm >dwarf.v2.ps 2> newIndex
157		-cp dwarf.v2.ps $(BUILD_BASE)
158		-cp newIndex $(BUILD_BASE)
159
160# the index is only useful till the document changes: it is
161# not autmatically correct. It was prepared by tools internal
162# to USL/Novell
163
164index.v2.ps:  index.v2.mm
165		pic index.v2.mm | tbl | psroff -t -mm >index.v2.ps
166
167
168mips_extensions.ps: mips_extensions.mm
169		pr -t -e mips_extensions.mm | tbl | \
170                 psroff -t -mm >mips_extensions.ps
171
172clean:
173		rm -f *.o libdwarf.a 
174
175distclean:	clean
176		rm -f config.status config.log config.cache config.h
177
178shar:
179		@echo "shar not set up yet"
180dist:
181		@echo "dist not set up yet"
182