• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## Process this file with automake to create Makefile.in
2##
3## Copyright (C) 2002-2010 Red Hat, Inc.
4## This file is part of elfutils.
5##
6## This file is free software; you can redistribute it and/or modify
7## it under the terms of either
8##
9##   * the GNU Lesser General Public License as published by the Free
10##     Software Foundation; either version 3 of the License, or (at
11##     your option) any later version
12##
13## or
14##
15##   * the GNU General Public License as published by the Free
16##     Software Foundation; either version 2 of the License, or (at
17##     your option) any later version
18##
19## or both in parallel, as here.
20##
21## elfutils is distributed in the hope that it will be useful, but
22## WITHOUT ANY WARRANTY; without even the implied warranty of
23## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24## General Public License for more details.
25##
26## You should have received copies of the GNU General Public License and
27## the GNU Lesser General Public License along with this program.  If
28## not, see <http://www.gnu.org/licenses/>.
29##
30include $(top_srcdir)/config/eu.am
31AM_CPPFLAGS += -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl -I$(top_srcdir)/libdw -I$(top_srcdir)/libdwelf
32
33VERSION = 1
34
35lib_LIBRARIES = libasm.a
36noinst_LIBRARIES = libasm_pic.a
37noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
38pkginclude_HEADERS = libasm.h
39
40libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \
41		   asm_getelf.c asm_newscn.c asm_newscn_ingrp.c \
42		   asm_newsubscn.c asm_newsym.c asm_newcomsym.c \
43		   asm_newabssym.c \
44		   asm_newscngrp.c asm_scngrp_newsignature.c \
45		   asm_fill.c asm_align.c asm_addstrz.c \
46		   asm_addint8.c asm_adduint8.c \
47		   asm_addint16.c asm_adduint16.c \
48		   asm_addint32.c asm_adduint32.c \
49		   asm_addint64.c asm_adduint64.c \
50		   asm_adduleb128.c asm_addsleb128.c \
51		   disasm_begin.c disasm_cb.c disasm_end.c disasm_str.c \
52		   symbolhash.c
53
54libasm_pic_a_SOURCES =
55am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os)
56
57libasm_so_DEPS = ../lib/libeu.a ../libebl/libebl_pic.a ../libelf/libelf.so ../libdw/libdw.so
58libasm_so_LDLIBS = $(libasm_so_DEPS)
59if USE_LOCKS
60libasm_so_LDLIBS += -lpthread
61endif
62
63libasm_so_LIBS = libasm_pic.a
64libasm.so: $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS)
65	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
66		-Wl,--soname,$@.$(VERSION) \
67		-Wl,--version-script,$<,--no-undefined \
68		-Wl,--whole-archive $(libasm_so_LIBS) -Wl,--no-whole-archive \
69		$(libasm_so_LDLIBS)
70	@$(textrel_check)
71	$(AM_V_at)ln -fs $@ $@.$(VERSION)
72
73install: install-am libasm.so
74	$(mkinstalldirs) $(DESTDIR)$(libdir)
75	$(INSTALL_PROGRAM) libasm.so $(DESTDIR)$(libdir)/libasm-$(PACKAGE_VERSION).so
76	ln -fs libasm-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libasm.so.$(VERSION)
77	ln -fs libasm.so.$(VERSION) $(DESTDIR)$(libdir)/libasm.so
78
79uninstall: uninstall-am
80	rm -f $(DESTDIR)$(libdir)/libasm-$(PACKAGE_VERSION).so
81	rm -f $(DESTDIR)$(libdir)/libasm.so.$(VERSION)
82	rm -f $(DESTDIR)$(libdir)/libasm.so
83	rmdir --ignore-fail-on-non-empty $(DESTDIR)$(includedir)/elfutils
84
85noinst_HEADERS = libasmP.h symbolhash.h
86EXTRA_DIST = libasm.map
87
88CLEANFILES += $(am_libasm_pic_a_OBJECTS) libasm.so libasm.so.$(VERSION)
89