Blame libdwarf/Makefile.in

Packit cdaae3
#
Packit cdaae3
#
Packit cdaae3
#  Copyright (C) 2000,2003,2004,2006 Silicon Graphics, Inc.  All Rights Reserved.
Packit cdaae3
#  Portions Copyright (C) 2010 David B Anderson.  All Rights Reserved.
Packit cdaae3
#
Packit cdaae3
#  This program is free software; you can redistribute it and/or modify it
Packit cdaae3
#  under the terms of version 2.1 of the GNU Lesser General Public License 
Packit cdaae3
#  as published by the Free Software Foundation.
Packit cdaae3
#
Packit cdaae3
#  This program is distributed in the hope that it would be useful, but
Packit cdaae3
#  WITHOUT ANY WARRANTY; without even the implied warranty of
Packit cdaae3
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
Packit cdaae3
#
Packit cdaae3
#  Further, this software is distributed without any warranty that it is
Packit cdaae3
#  free of the rightful claim of any third person regarding infringement 
Packit cdaae3
#  or the like.  Any license provided herein, whether implied or 
Packit cdaae3
#  otherwise, applies only to this software file.  Patent licenses, if
Packit cdaae3
#  any, provided herein do not apply to combinations of this program with 
Packit cdaae3
#  other software, or any other product whatsoever.  
Packit cdaae3
#
Packit cdaae3
#  You should have received a copy of the GNU Lesser General Public 
Packit cdaae3
#  License along with this program; if not, write the Free Software 
Packit cdaae3
#  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
Packit cdaae3
#  USA.
Packit cdaae3
Packit cdaae3
#
Packit cdaae3
#  Makefile for libdwarf
Packit cdaae3
#  This is made very simple so it should work with
Packit cdaae3
#  any 'make'.
Packit cdaae3
#
Packit cdaae3
Packit cdaae3
srcdir =	@srcdir@
Packit cdaae3
VPATH =		@srcdir@
Packit cdaae3
Packit cdaae3
prefix =	@prefix@
Packit cdaae3
exec_prefix =	@exec_prefix@
Packit cdaae3
bindir =	$(exec_prefix)/bin
Packit cdaae3
libdir =	$(exec_prefix)/lib
Packit cdaae3
Packit cdaae3
INSTALL =	@INSTALL@
Packit cdaae3
INSTALL_PROGRAM = @INSTALL_PROGRAM@
Packit cdaae3
INSTALL_DATA =	@INSTALL_DATA@
Packit cdaae3
SHELL =		/bin/sh
Packit cdaae3
CC =		@CC@
Packit cdaae3
HOSTCC =	@CC@
Packit cdaae3
AR =		@AR@
Packit cdaae3
# For use with BSD ar (MacOSX ar) edit the ARFLAGS to be -s
Packit cdaae3
#ARFLAGS =	@ARFLAGS@
Packit cdaae3
RM =		rm
Packit cdaae3
RANLIB =	@RANLIB@
Packit cdaae3
DEFS =		@DEFS@
Packit Service 2ab029
LIBS =		@LIBS@
Packit cdaae3
INCLUDES =	-I. -I$(srcdir)
Packit cdaae3
dwfpic =        @dwfpic@
Packit cdaae3
dwfwall =       @dwfwall@
Packit cdaae3
dwfsanitize =   @dwfsanitize@
Packit cdaae3
dwfzlib =       @dwfzlib@
Packit cdaae3
SONAME =        libdwarf.so.1
Packit cdaae3
CFLAGS =	$(PREINCS) @CPPFLAGS@ @CFLAGS@ $(INCLUDES) $(dwfpic) $(dwfwall) $(dwfsanitize)  $(POSTINCS)
Packit Service 2ab029
LDFLAGS =	$(PRELIBS) @LDFLAGS@ $(dwfsanitize) $(POSTLIBS) 
Packit cdaae3
HOSTCFLAGS =	$(CFLAGS)
Packit cdaae3
HOSTLDFLAGS =	$(PRELIBS) @LDFLAGS@ 
Packit cdaae3
Packit cdaae3
# These three files are only appropriate for SGI IRIX.
Packit cdaae3
# There is no reason to think these are of any use to anyone else.
Packit cdaae3
# As of October 2015 they are removed from OBJS
Packit cdaae3
#       dwarf_addr_finder.o 
Packit cdaae3
#	dwarf_sort_line.o 
Packit cdaae3
#       dwarf_line2.o 
Packit cdaae3
Packit cdaae3
BUILD_BASE = .
Packit cdaae3
Packit cdaae3
OBJS= dwarf_abbrev.o \
Packit cdaae3
        dwarf_alloc.o \
Packit cdaae3
        dwarf_arange.o \
Packit cdaae3
        dwarf_die_deliv.o \
Packit cdaae3
        dwarf_dsc.o \
Packit cdaae3
        dwarf_dnames.o \
Packit cdaae3
        dwarf_elf_access.o \
Packit cdaae3
        dwarf_error.o \
Packit cdaae3
        dwarf_form.o \
Packit cdaae3
        dwarf_frame.o \
Packit cdaae3
        dwarf_frame2.o \
Packit cdaae3
        dwarf_frame3.o \
Packit cdaae3
        dwarf_funcs.o \
Packit cdaae3
        dwarf_gdbindex.o \
Packit cdaae3
        dwarf_global.o \
Packit cdaae3
        dwarf_groups.o \
Packit cdaae3
        dwarf_harmless.o \
Packit cdaae3
        dwarf_init_finish.o  \
Packit cdaae3
        dwarf_leb.o \
Packit cdaae3
        dwarf_line.o \
Packit cdaae3
        dwarf_loc.o \
Packit cdaae3
	dwarf_macro.o \
Packit cdaae3
	dwarf_macro5.o \
Packit cdaae3
        dwarf_original_elf_init.o \
Packit cdaae3
        dwarf_pubtypes.o \
Packit cdaae3
        dwarf_query.o \
Packit cdaae3
        dwarf_ranges.o \
Packit cdaae3
        dwarf_string.o \
Packit cdaae3
        dwarf_tied.o \
Packit cdaae3
        dwarf_tsearchhash.o \
Packit cdaae3
        dwarf_types.o \
Packit cdaae3
        dwarf_util.o \
Packit cdaae3
        dwarf_vars.o \
Packit cdaae3
        dwarf_weaks.o    \
Packit cdaae3
        dwarf_xu_index.o    \
Packit cdaae3
	dwarf_print_lines.o \
Packit cdaae3
	malloc_check.o \
Packit cdaae3
        pro_alloc.o \
Packit cdaae3
        pro_arange.o \
Packit cdaae3
        pro_die.o \
Packit cdaae3
	pro_encode_nm.o \
Packit cdaae3
        pro_error.o \
Packit cdaae3
        pro_expr.o \
Packit cdaae3
        pro_finish.o \
Packit cdaae3
        pro_forms.o \
Packit cdaae3
        pro_funcs.o \
Packit cdaae3
        pro_frame.o \
Packit cdaae3
        pro_init.o \
Packit cdaae3
        pro_line.o \
Packit cdaae3
        pro_reloc.o \
Packit cdaae3
        pro_reloc_stream.o \
Packit cdaae3
        pro_reloc_symbolic.o \
Packit cdaae3
        pro_pubnames.o \
Packit cdaae3
        pro_section.o \
Packit cdaae3
        pro_types.o \
Packit cdaae3
        pro_vars.o \
Packit cdaae3
        pro_macinfo.o \
Packit cdaae3
        pro_weaks.o
Packit cdaae3
        
Packit cdaae3
Packit cdaae3
all: gennames errmsg_check @build_shared@ @build_nonshared@
Packit cdaae3
Packit cdaae3
libdwarf.a: dwarf_names.h dwarf_names.c  $(OBJS) dwarf_names.o
Packit cdaae3
	$(AR) $(ARFLAGS) $@ $(OBJS)  dwarf_names.o > ar-output-temp
Packit cdaae3
Packit cdaae3
libdwarf.so: dwarf_names.h dwarf_names.c $(OBJS) dwarf_names.o
Packit cdaae3
	$(CC) $(CFLAGS) $(LDFLAGS) -shared $(OBJS) -Wl,-soname=$(SONAME)  dwarf_names.o $(dwfzlib) -o $@
Packit cdaae3
	ln libdwarf.so $(SONAME)
Packit cdaae3
Packit cdaae3
nosharedlibrary:
Packit cdaae3
	echo "Not building shared library libdwarf.so"
Packit cdaae3
noarchivelibrary:
Packit cdaae3
	echo "Not building archive library libdwarf.a"
Packit cdaae3
Packit cdaae3
dwgetopt.o: $(srcdir)/dwgetopt.c $(srcdir)/dwgetopt.h
Packit cdaae3
	$(HOSTCC) $(HOSTCFLAGS) -c $(srcdir)/dwgetopt.c
Packit cdaae3
dwarf_loc.o: $(srcdir)/dwarf_loc.c  $(srcdir)/dwarf_loc2.c  $(srcdir)/dwarf_loc.h 
Packit cdaae3
	$(CC) $(CFLAGS) -c $(srcdir)/dwarf_loc.c
Packit cdaae3
Packit cdaae3
errmsg_check: $(srcdir)/dwarf_errmsg_list.c libdwarf.h
Packit cdaae3
	grep DW_DLE libdwarf.h >errmsg_check_list
Packit cdaae3
	$(HOSTCC) $(HOSTCFLAGS) $(LDFLAGS)  -DTESTING $(srcdir)/dwarf_errmsg_list.c -o errmsg_check
Packit cdaae3
	./errmsg_check -f errmsg_check_list
Packit cdaae3
Packit cdaae3
# Gennames builds and runs native, even for a cross-build of libdwarf.
Packit cdaae3
gennames: $(srcdir)/gennames.c $(srcdir)/dwarf.h dwgetopt.o
Packit cdaae3
	$(HOSTCC) $(HOSTCFLAGS) $(srcdir)/gennames.c dwgetopt.o $(HOSTLDFLAGS) -o gennames
Packit cdaae3
dwarf_names.h: dwarf_names.c
Packit cdaae3
dwarf_names.c: gennames $(srcdir)/dwarf.h
Packit cdaae3
	rm -f dwarf_names.h dwarf_names.c
Packit cdaae3
	./gennames  @dwarf_namestable@  -i $(srcdir) -o .
Packit cdaae3
# End gennames build lines
Packit cdaae3
Packit cdaae3
dwarf_line.o: $(srcdir)/dwarf.h libdwarf.h $(srcdir)/dwarf_line_table_reader_common.c $(srcdir)/dwarf_line.c
Packit cdaae3
	$(CC) $(CFLAGS) -c $(srcdir)/dwarf_line.c -o $@
Packit cdaae3
dwarf_print_lines.o: $(srcdir)/dwarf.h libdwarf.h $(srcdir)/dwarf_line_table_reader_common.c $(srcdir)/dwarf_print_lines.c
Packit cdaae3
	$(CC) $(CFLAGS) -c $(srcdir)/dwarf_print_lines.c -o $@
Packit cdaae3
dwarf_error.o: $(srcdir)/dwarf.h libdwarf.h $(srcdir)/dwarf_error.c $(srcdir)/dwarf_errmsg_list.c
Packit cdaae3
	$(CC) $(CFLAGS) -c $(srcdir)/dwarf_error.c -o $@
Packit cdaae3
Packit cdaae3
Packit cdaae3
Packit cdaae3
#
Packit cdaae3
# The following are very SGI-centric
Packit cdaae3
# psroff is just a troff formatter.
Packit cdaae3
# the .mm files are in ATT/USL/USG mm form.
Packit cdaae3
# Calling it pdfbld or bldpdf is arbitrary, so allow both.
Packit cdaae3
Packit cdaae3
docbld:pdfbld 
Packit cdaae3
bldpdf: pdfbld
Packit cdaae3
pdfbld: libdwarf2.1.pdf libdwarf2p.1.pdf mips_extensions.pdf
Packit cdaae3
#Oriented to using gsroff now.
Packit cdaae3
TROFF=/usr/bin/groff
Packit cdaae3
TROFFDEV="-T ps"
Packit cdaae3
TROFFDEV=
Packit cdaae3
PSTOPDF=/usr/bin/ps2pdf
Packit cdaae3
# pr expands tabs to spaces: this avoids problems with tab
Packit cdaae3
# interpretation
Packit cdaae3
Packit cdaae3
# The warning about 'cant break line' is a too-long line used
Packit cdaae3
# in the table of contents.
Packit cdaae3
# All pr does here is change each tab to spaces.
Packit cdaae3
# Ignore the warning (and those like it).
Packit cdaae3
libdwarf2.1.pdf:  $(BUILD_BASE)/libdwarf2.1.mm
Packit cdaae3
	-pr -t -e $(BUILD_BASE)/libdwarf2.1.mm \
Packit cdaae3
		  | tbl | $(TROFF) $(TROFFDEV) -mm >libdwarf2.1.ps
Packit cdaae3
	$(PSTOPDF) libdwarf2.1.ps libdwarf2.1.pdf
Packit cdaae3
Packit cdaae3
libdwarf2p.1.pdf:  $(BUILD_BASE)/libdwarf2p.1.mm
Packit cdaae3
	-pr -t -e  $(BUILD_BASE)/libdwarf2p.1.mm \
Packit cdaae3
		  | tbl | $(TROFF) $(TROFFDEV) -mm >libdwarf2p.1.ps
Packit cdaae3
	$(PSTOPDF) libdwarf2p.1.ps libdwarf2p.1.pdf
Packit cdaae3
Packit cdaae3
mips_extensions.pdf: mips_extensions.mm
Packit cdaae3
	-pr $(TROFFDEV) -e mips_extensions.mm | tbl | \
Packit cdaae3
                 $(TROFF) $(TROFFDEV) -mm >mips_extensions.ps
Packit cdaae3
	$(PSTOPDF) mips_extensions.ps  mips_extensions.pdf
Packit cdaae3
Packit cdaae3
clean:
Packit cdaae3
	rm -f *.o libdwarf.a 
Packit cdaae3
	rm -f libdwarf.so*
Packit cdaae3
	rm -f libdwarf2.1.ps
Packit cdaae3
	rm -f mips_extensions.ps
Packit cdaae3
	rm -f libdwarf2p.1.ps
Packit cdaae3
	rm -f gennames 
Packit cdaae3
	rm -f ar-output-temp
Packit cdaae3
	rm -f junk 
Packit cdaae3
	rm -f ALL
Packit cdaae3
	rm -f gennames 
Packit cdaae3
	rm -f dwarfleb 
Packit cdaae3
	rm -f dwarf_names_enum.h dwarf_names_new.h dwarf_names.c dwarf_names.h
Packit cdaae3
	rm -f ./dwarftied
Packit cdaae3
	rm -f ./errmsg_check
Packit cdaae3
	rm -f ./errmsg_check_list
Packit cdaae3
	rm -f *~
Packit cdaae3
Packit cdaae3
install: all
Packit cdaae3
	echo "No install provided, see comments in the README"
Packit cdaae3
Packit cdaae3
distclean:	clean
Packit cdaae3
	rm -f config.status config.log config.cache config.h
Packit cdaae3
	rm -rf autom4te.cache 
Packit cdaae3
	rm -f Makefile
Packit cdaae3
	rm -f libdwarf.h
Packit cdaae3
	rm -f ./dwarftied
Packit cdaae3
Packit cdaae3
test:
Packit cdaae3
	$(CC) -DTESTING $(CFLAGS) dwarf_leb.c pro_encode_nm.c -o dwarfleb
Packit cdaae3
	./dwarfleb
Packit cdaae3
	$(CC) -DTESTING $(CFLAGS) dwarf_tied.c dwarf_tsearchhash.o -o dwarftied
Packit cdaae3
	./dwarftied
Packit cdaae3
Packit cdaae3
Packit cdaae3
shar:
Packit cdaae3
		@echo "shar not set up yet"
Packit cdaae3
dist:
Packit cdaae3
		@echo "dist not set up yet"