]>
Commit | Line | Data |
---|---|---|
d45a4bef JB |
1 | #### Makefile.in --- Makefile template for the M32C simulator |
2 | ||
3666a048 | 3 | ### Copyright (C) 2005-2021 Free Software Foundation, Inc. |
d45a4bef JB |
4 | ### Contributed by Red Hat, Inc. |
5 | ### | |
6 | ### This file is part of the GNU simulators. | |
7 | ### | |
4744ac1b JB |
8 | ### This program is free software; you can redistribute it and/or modify |
9 | ### it under the terms of the GNU General Public License as published by | |
10 | ### the Free Software Foundation; either version 3 of the License, or | |
11 | ### (at your option) any later version. | |
12 | ### | |
13 | ### This program is distributed in the hope that it will be useful, | |
14 | ### but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ### GNU General Public License for more details. | |
17 | ### | |
d45a4bef | 18 | ### You should have received a copy of the GNU General Public License |
4744ac1b | 19 | ### along with this program. If not, see <http://www.gnu.org/licenses/>. |
d45a4bef JB |
20 | |
21 | ## COMMON_PRE_CONFIG_FRAG | |
22 | ||
3877a145 | 23 | SIM_EXTRA_CFLAGS = -Wall -DTIMER_A |
d45a4bef JB |
24 | |
25 | SIM_RUN_OBJS = \ | |
26 | main.o \ | |
27 | $(ENDLIST) | |
28 | ||
29 | SIM_OBJS = \ | |
30 | gdb-if.o \ | |
31 | int.o \ | |
32 | load.o \ | |
33 | mem.o \ | |
34 | misc.o \ | |
35 | reg.o \ | |
36 | r8c.o \ | |
37 | m32c.o \ | |
38 | srcdest.o \ | |
39 | syscalls.o \ | |
40 | trace.o \ | |
41 | $(ENDLIST) | |
42 | ||
d45a4bef JB |
43 | LIBS = $B/bfd/libbfd.a $B/libiberty/libiberty.a |
44 | ||
45 | ## COMMON_POST_CONFIG_FRAG | |
46 | ||
47 | arch = m32c | |
48 | ||
2b8d134b SM |
49 | # opc2c leaks memory, and therefore makes AddressSanitizer unhappy. Disable |
50 | # leak detection while running it. | |
51 | OPC2C = ASAN_OPTIONS=detect_leaks=0 ./opc2c | |
52 | ||
d45a4bef | 53 | r8c.c : r8c.opc opc2c |
2b8d134b SM |
54 | $(OPC2C) -l r8c.out $(srcdir)/r8c.opc > r8c.c.tmp |
55 | mv r8c.c.tmp r8c.c | |
d45a4bef JB |
56 | |
57 | m32c.c : m32c.opc opc2c | |
2b8d134b SM |
58 | $(OPC2C) -l m32c.out $(srcdir)/m32c.opc > m32c.c.tmp |
59 | mv m32c.c.tmp m32c.c | |
d45a4bef JB |
60 | |
61 | opc2c : opc2c.o safe-fgets.o | |
c6c7769d | 62 | $(LINK_FOR_BUILD) $^ |
d45a4bef | 63 | |
d45a4bef JB |
64 | encodings: |
65 | grep '/\* [01]' $(srcdir)/r8c.opc | sort | |
66 | ||
cd006ce4 | 67 | opc2c.o : opc2c.c safe-fgets.h |
c6c7769d | 68 | $(COMPILE_FOR_BUILD) -c $(srcdir)/opc2c.c |
cd006ce4 MM |
69 | |
70 | safe-fgets.o : safe-fgets.c safe-fgets.h | |
c6c7769d | 71 | $(COMPILE_FOR_BUILD) -c $(srcdir)/safe-fgets.c |