]>
Commit | Line | Data |
---|---|---|
de8a2781 MF |
1 | ## See sim/Makefile.am |
2 | ## | |
213516ef | 3 | ## Copyright (C) 1996-2023 Free Software Foundation, Inc. |
de8a2781 MF |
4 | ## Written by Cygnus Support. |
5 | ## | |
6 | ## This program is free software; you can redistribute it and/or modify | |
7 | ## it under the terms of the GNU General Public License as published by | |
8 | ## the Free Software Foundation; either version 3 of the License, or | |
9 | ## (at your option) any later version. | |
10 | ## | |
11 | ## This program is distributed in the hope that it will be useful, | |
12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ## GNU General Public License for more details. | |
15 | ## | |
16 | ## You should have received a copy of the GNU General Public License | |
17 | ## along with this program. If not, see <http://www.gnu.org/licenses/>. | |
70ab6bdd | 18 | |
c0c25232 MF |
19 | %C%_run_SOURCES = |
20 | %C%_run_LDADD = \ | |
21 | %D%/nrun.o \ | |
22 | %D%/libsim.a \ | |
23 | $(SIM_COMMON_LIBS) | |
24 | ||
25 | noinst_PROGRAMS += %D%/run | |
26 | ||
70ab6bdd MF |
27 | %C%_BUILD_OUTPUTS = \ |
28 | %D%/gencode$(EXEEXT) \ | |
29 | %D%/simops.h \ | |
30 | %D%/table.c | |
31 | ||
de8a2781 | 32 | ## This makes sure build tools are available before building the arch-subdirs. |
70ab6bdd MF |
33 | SIM_ALL_RECURSIVE_DEPS += $(%C%_BUILD_OUTPUTS) |
34 | ||
35 | %C%_gencode_SOURCES = %D%/gencode.c | |
36 | %C%_gencode_LDADD = %D%/d10v-opc.o | |
37 | ||
38 | # These rules are copied from automake, but tweaked to use FOR_BUILD variables. | |
39 | %D%/gencode$(EXEEXT): $(%C%_gencode_OBJECTS) $(%C%_gencode_DEPENDENCIES) %D%/$(am__dirstamp) | |
40 | $(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_gencode_OBJECTS) $(%C%_gencode_LDADD) | |
41 | ||
42 | # gencode is a build-time only tool. Override the default rules for it. | |
43 | %D%/gencode.o: %D%/gencode.c | |
44 | $(AM_V_CC)$(COMPILE_FOR_BUILD) -c $< -o $@ | |
45 | %D%/d10v-opc.o: ../opcodes/d10v-opc.c | |
46 | $(AM_V_CC)$(COMPILE_FOR_BUILD) -c $< -o $@ | |
47 | ||
48 | %D%/simops.h: %D%/gencode$(EXEEXT) | |
49 | $(AM_V_GEN)$< -h >$@ | |
50 | ||
51 | %D%/table.c: %D%/gencode$(EXEEXT) | |
52 | $(AM_V_GEN)$< >$@ | |
53 | ||
54 | EXTRA_PROGRAMS += %D%/gencode | |
55 | MOSTLYCLEANFILES += $(%C%_BUILD_OUTPUTS) |