Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 1 | ## Process this file with automake to create Makefile.in |
| 2 | ## |
Roland McGrath | b2589ff | 2012-06-26 18:09:10 -0700 | [diff] [blame] | 3 | ## Copyright (C) 2002-2012 Red Hat, Inc. |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 4 | ## This file is part of elfutils. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 5 | ## |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 6 | ## This file is free software; you can redistribute it and/or modify |
| 7 | ## it under the terms of either |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 8 | ## |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 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 |
Ulrich Drepper | 361df7d | 2006-04-04 21:38:57 +0000 | [diff] [blame] | 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 | ## |
Mark Wielaard | de2ed97 | 2012-06-05 17:15:16 +0200 | [diff] [blame] | 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/>. |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 29 | ## |
Roland McGrath | 22359e2 | 2010-02-15 15:57:03 -0800 | [diff] [blame] | 30 | include $(top_srcdir)/config/eu.am |
Mark Wielaard | cdaaf21 | 2013-04-25 16:50:11 -0400 | [diff] [blame] | 31 | AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ |
Roland McGrath | 22359e2 | 2010-02-15 15:57:03 -0800 | [diff] [blame] | 32 | -I$(srcdir)/../libdw -I$(srcdir)/../libasm |
Omar Sandoval | 823ee0c | 2019-08-26 10:51:45 -0700 | [diff] [blame] | 33 | if BUILD_STATIC |
| 34 | AM_CFLAGS += $(fpic_CFLAGS) |
| 35 | endif |
| 36 | AM_CFLAGS += -fdollars-in-identifiers |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 37 | LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -P$(<F:lex.l=) |
| 38 | LEX_OUTPUT_ROOT = lex.$(<F:lex.l=) |
| 39 | AM_YFLAGS = -p$(<F:parse.y=) |
Ulrich Drepper | b08d5a8 | 2005-07-26 05:00:05 +0000 | [diff] [blame] | 40 | |
Omar Sandoval | 823ee0c | 2019-08-26 10:51:45 -0700 | [diff] [blame] | 41 | noinst_LIBRARIES = libcpu.a libcpu_pic.a |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 42 | |
Omar Sandoval | 823ee0c | 2019-08-26 10:51:45 -0700 | [diff] [blame] | 43 | noinst_HEADERS = i386_dis.h x86_64_dis.h |
| 44 | |
Ulrich Drepper | fcab4f6 | 2019-09-06 23:49:54 +0200 | [diff] [blame] | 45 | libcpu_a_SOURCES = i386_disasm.c x86_64_disasm.c bpf_disasm.c riscv_disasm.c |
Omar Sandoval | 823ee0c | 2019-08-26 10:51:45 -0700 | [diff] [blame] | 46 | |
| 47 | libcpu_pic_a_SOURCES = |
| 48 | am_libcpu_pic_a_OBJECTS = $(libcpu_a_SOURCES:.c=.os) |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 49 | |
| 50 | i386_gendis_SOURCES = i386_gendis.c i386_lex.l i386_parse.y |
| 51 | |
Roland McGrath | a9cefae | 2011-10-16 09:23:00 -0700 | [diff] [blame] | 52 | i386_disasm.o: i386.mnemonics $(srcdir)/i386_dis.h |
| 53 | x86_64_disasm.o: x86_64.mnemonics $(srcdir)/x86_64_dis.h |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 54 | |
Roland McGrath | 10eb76b | 2010-08-16 22:48:48 -0700 | [diff] [blame] | 55 | %_defs: $(srcdir)/defs/i386 |
Josh Stone | daee471 | 2015-10-05 11:04:15 -0700 | [diff] [blame] | 56 | $(AM_V_GEN)m4 -D$* -DDISASSEMBLER $< > $@T |
| 57 | $(AM_V_at)mv -f $@T $@ |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 58 | |
Roland McGrath | a9cefae | 2011-10-16 09:23:00 -0700 | [diff] [blame] | 59 | if MAINTAINER_MODE |
Omar Sandoval | 823ee0c | 2019-08-26 10:51:45 -0700 | [diff] [blame] | 60 | noinst_HEADERS += memory-access.h i386_parse.h i386_data.h |
Roland McGrath | a9cefae | 2011-10-16 09:23:00 -0700 | [diff] [blame] | 61 | |
Ulf Hermann | 28149ca | 2017-04-20 17:02:42 +0200 | [diff] [blame] | 62 | noinst_PROGRAMS = i386_gendis$(EXEEXT) |
Roland McGrath | a9cefae | 2011-10-16 09:23:00 -0700 | [diff] [blame] | 63 | |
Ulf Hermann | 28149ca | 2017-04-20 17:02:42 +0200 | [diff] [blame] | 64 | $(srcdir)/%_dis.h: %_defs i386_gendis$(EXEEXT) |
| 65 | $(AM_V_GEN)./i386_gendis$(EXEEXT) $< > $@T |
Josh Stone | daee471 | 2015-10-05 11:04:15 -0700 | [diff] [blame] | 66 | $(AM_V_at)mv -f $@T $@ |
Roland McGrath | b2589ff | 2012-06-26 18:09:10 -0700 | [diff] [blame] | 67 | |
| 68 | else |
| 69 | |
| 70 | $(srcdir)/%_dis.h: |
| 71 | @echo '*** missing $@; configure with --enable-maintainer-mode' |
| 72 | @false |
| 73 | |
Roland McGrath | a9cefae | 2011-10-16 09:23:00 -0700 | [diff] [blame] | 74 | endif |
Roland McGrath | 10eb76b | 2010-08-16 22:48:48 -0700 | [diff] [blame] | 75 | |
| 76 | %.mnemonics: %_defs |
Josh Stone | daee471 | 2015-10-05 11:04:15 -0700 | [diff] [blame] | 77 | $(AM_V_GEN)sed '1,/^%%/d;/^#/d;/^[[:space:]]*$$/d;s/[^:]*:\([^[:space:]]*\).*/MNE(\1)/;s/{[^}]*}//g;/INVALID/d' \ |
Roland McGrath | 10eb76b | 2010-08-16 22:48:48 -0700 | [diff] [blame] | 78 | $< | sort -u > $@ |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 79 | |
Ulrich Drepper | f231e27 | 2008-01-02 18:07:17 +0000 | [diff] [blame] | 80 | i386_lex_no_Werror = yes |
| 81 | |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 82 | libeu = ../lib/libeu.a |
| 83 | |
Omar Sandoval | 277c2c5 | 2019-12-11 16:23:28 -0800 | [diff] [blame] | 84 | i386_lex_CFLAGS = -Wno-unused-label -Wno-unused-function -Wno-sign-compare \ |
| 85 | -Wno-implicit-fallthrough |
Ulrich Drepper | c911d5c | 2008-01-22 05:59:26 +0000 | [diff] [blame] | 86 | i386_parse.o: i386_parse.c i386.mnemonics |
Roland McGrath | 78df796 | 2009-01-23 16:39:42 -0800 | [diff] [blame] | 87 | i386_parse_CFLAGS = -DNMNES="`wc -l < i386.mnemonics`" |
Ulrich Drepper | c911d5c | 2008-01-22 05:59:26 +0000 | [diff] [blame] | 88 | i386_lex.o: i386_parse.h |
Érico Rolim | 47516d4 | 2020-12-16 15:56:14 -0300 | [diff] [blame] | 89 | i386_gendis_LDADD = $(libeu) -lm $(obstack_LIBS) |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 90 | |
Ulrich Drepper | c911d5c | 2008-01-22 05:59:26 +0000 | [diff] [blame] | 91 | i386_parse.h: i386_parse.c ; |
| 92 | |
Omar Sandoval | 4fcb7ec | 2019-08-26 10:51:44 -0700 | [diff] [blame] | 93 | bpf_disasm_CFLAGS = -Wno-format-nonliteral |
| 94 | |
Ulrich Drepper | 9349000 | 2008-01-21 18:48:06 +0000 | [diff] [blame] | 95 | EXTRA_DIST = defs/i386 |
Ulrich Drepper | 3cbdd38 | 2008-01-02 17:44:39 +0000 | [diff] [blame] | 96 | |
Omar Sandoval | 823ee0c | 2019-08-26 10:51:45 -0700 | [diff] [blame] | 97 | MOSTLYCLEANFILES = $(am_libcpu_pic_a_OBJECTS) |
Mark Wielaard | 5e56a1e | 2012-02-24 23:41:53 +0100 | [diff] [blame] | 98 | CLEANFILES += $(foreach P,i386 x86_64,$P_defs $P.mnemonics) |
| 99 | MAINTAINERCLEANFILES = $(foreach P,i386 x86_64, $P_dis.h) |