1 ## The IGEN simulator generator for GDB, the GNU Debugger.
3 ## Copyright 2002-2024 Free Software Foundation, Inc.
5 ## Contributed by Andrew Cagney.
7 ## This file is part of GDB.
9 ## This program is free software; you can redistribute it and/or modify
10 ## it under the terms of the GNU General Public License as published by
11 ## the Free Software Foundation; either version 3 of the License, or
12 ## (at your option) any later version.
14 ## This program is distributed in the hope that it will be useful,
15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ## GNU General Public License for more details.
19 ## You should have received a copy of the GNU General Public License
20 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
22 # igen leaks memory, and therefore makes AddressSanitizer unhappy. Disable
23 # leak detection while running it.
24 IGEN
= %D
%/igen
$(EXEEXT
)
25 IGEN_RUN
= ASAN_OPTIONS
=detect_leaks
=0 $(IGEN
) $(IGEN_FLAGS_SMP
)
27 # Alias for developers.
30 EXTRA_LIBRARIES
+= %D
%/libigen.a
31 %C
%_libigen_a_SOURCES
= \
49 %C
%_igen_SOURCES
= %D
%/igen.c
50 %C
%_igen_LDADD
= %D
%/libigen.a
52 # These rules are copied from automake, but tweaked to use FOR_BUILD variables.
53 %D
%/libigen.a
: $(igen_libigen_a_OBJECTS
) $(igen_libigen_a_DEPENDENCIES
) $(EXTRA_igen_libigen_a_DEPENDENCIES
) %D
%/$(am__dirstamp
)
55 $(AM_V_AR
)$(AR_FOR_BUILD
) $(ARFLAGS
) $@
$(igen_libigen_a_OBJECTS
) $(igen_libigen_a_LIBADD
)
56 $(AM_V_at
)$(RANLIB_FOR_BUILD
) $@
58 %D
%/igen
$(EXEEXT
): $(%C
%_igen_OBJECTS
) $(%C
%_igen_DEPENDENCIES
) %D
%/$(am__dirstamp
)
59 $(AM_V_CCLD
)$(LINK_FOR_BUILD
) $(%C
%_igen_OBJECTS
) $(%C
%_igen_LDADD
)
61 # igen is a build-time only tool. Override the default rules for it.
63 $(AM_V_CC
)$(COMPILE_FOR_BUILD
) -c
$< -o
$@
65 # Build some of the files in standalone mode for developers of igen itself.
67 $(AM_V_CC
)$(COMPILE_FOR_BUILD
) -DMAIN
-c
$< -o
$@
70 %C
%_filter_LDADD
= %D
%/filter-main.o
%D
%/libigen.a
73 %C
%_gen_LDADD
= %D
%/gen-main.o
%D
%/libigen.a
75 %C
%_ld_cache_SOURCES
=
76 %C
%_ld_cache_LDADD
= %D
%/ld-cache-main.o
%D
%/libigen.a
78 %C
%_ld_decode_SOURCES
=
79 %C
%_ld_decode_LDADD
= %D
%/ld-decode-main.o
%D
%/libigen.a
82 %C
%_ld_insn_LDADD
= %D
%/ld-insn-main.o
%D
%/libigen.a
85 %C
%_table_LDADD
= %D
%/table-main.o
%D
%/libigen.a
95 EXTRA_PROGRAMS
+= $(%C
%_IGEN_TOOLS
)
96 MOSTLYCLEANFILES
+= $(%C
%_IGEN_TOOLS
) %D
%/libigen.a