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