]>
Commit | Line | Data |
---|---|---|
a945c346 | 1 | # Copyright (C) 2021-2024 Free Software Foundation, Inc. |
b44786f6 | 2 | # |
3 | # This file is part of GCC. | |
4 | # | |
5 | # GCC is free software; you can redistribute it and/or modify | |
6 | # it under the terms of the GNU General Public License as published by | |
7 | # the Free Software Foundation; either version 3, or (at your option) | |
8 | # any later version. | |
9 | # | |
10 | # GCC is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | # GNU General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU General Public License | |
16 | # along with GCC; see the file COPYING3. If not see | |
17 | # <http://www.gnu.org/licenses/>. | |
18 | ||
3c231836 YY |
19 | |
20 | GTM_H += loongarch-multilib.h | |
88352420 XR |
21 | OPTIONS_H_EXTRA += $(srcdir)/config/loongarch/loongarch-def.h \ |
22 | $(srcdir)/config/loongarch/loongarch-tune.h \ | |
23 | $(srcdir)/config/loongarch/loongarch-cpucfg-map.h | |
3e315736 | 24 | |
b44786f6 | 25 | # Canonical target triplet from config.gcc |
26 | LA_MULTIARCH_TRIPLET = $(patsubst LA_MULTIARCH_TRIPLET=%,%,$\ | |
27 | $(filter LA_MULTIARCH_TRIPLET=%,$(tm_defines))) | |
28 | ||
29 | # String definition header | |
30 | LA_STR_H = $(srcdir)/config/loongarch/loongarch-str.h | |
31 | ||
32 | # String definition header | |
33 | $(LA_STR_H): s-loongarch-str ; @true | |
34 | s-loongarch-str: $(srcdir)/config/loongarch/genopts/genstr.sh \ | |
88352420 XR |
35 | $(srcdir)/config/loongarch/genopts/loongarch-strings \ |
36 | $(srcdir)/config/loongarch/genopts/isa-evolution.in | |
b44786f6 | 37 | $(SHELL) $(srcdir)/config/loongarch/genopts/genstr.sh header \ |
38 | $(srcdir)/config/loongarch/genopts/loongarch-strings > \ | |
39 | tmp-loongarch-str.h | |
40 | $(SHELL) $(srcdir)/../move-if-change tmp-loongarch-str.h \ | |
41 | $(LA_STR_H) | |
42 | $(STAMP) s-loongarch-str | |
43 | ||
44 | loongarch-c.o: $(srcdir)/config/loongarch/loongarch-c.cc $(CONFIG_H) $(SYSTEM_H) \ | |
45 | coretypes.h $(TM_H) $(TREE_H) output.h $(C_COMMON_H) $(TARGET_H) | |
46 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ | |
47 | $(srcdir)/config/loongarch/loongarch-c.cc | |
48 | ||
49 | loongarch-builtins.o: $(srcdir)/config/loongarch/loongarch-builtins.cc $(CONFIG_H) \ | |
50 | $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) $(RECOG_H) langhooks.h \ | |
51 | $(DIAGNOSTIC_CORE_H) $(OPTABS_H) $(srcdir)/config/loongarch/loongarch-ftypes.def \ | |
52 | $(srcdir)/config/loongarch/loongarch-modes.def | |
53 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ | |
54 | $(srcdir)/config/loongarch/loongarch-builtins.cc | |
55 | ||
56 | loongarch-driver.o : $(srcdir)/config/loongarch/loongarch-driver.cc $(LA_STR_H) \ | |
57 | $(CONFIG_H) $(SYSTEM_H) | |
58 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< | |
59 | ||
60 | loongarch-opts.o: $(srcdir)/config/loongarch/loongarch-opts.cc $(LA_STR_H) | |
61 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< | |
62 | ||
88352420 XR |
63 | loongarch-cpu.o: $(srcdir)/config/loongarch/loongarch-cpu.cc $(LA_STR_H) \ |
64 | $(srcdir)/config/loongarch/loongarch-cpucfg-map.h | |
b44786f6 | 65 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< |
66 | ||
2b2a0599 XR |
67 | loongarch-def.o: $(srcdir)/config/loongarch/loongarch-def.cc $(LA_STR_H) |
68 | $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< | |
b44786f6 | 69 | |
00d7c37d | 70 | loongarch-d.o: $(srcdir)/config/loongarch/loongarch-d.cc |
71 | $(COMPILE) $< | |
72 | $(POSTCOMPILE) | |
73 | ||
b44786f6 | 74 | $(srcdir)/config/loongarch/loongarch.opt: s-loongarch-opt ; @true |
75 | s-loongarch-opt: $(srcdir)/config/loongarch/genopts/genstr.sh \ | |
76 | $(srcdir)/config/loongarch/genopts/loongarch.opt.in \ | |
88352420 | 77 | $(srcdir)/config/loongarch/genopts/isa-evolution.in \ |
b44786f6 | 78 | $(srcdir)/config/loongarch/genopts/loongarch-strings $(LA_STR_H) |
79 | $(SHELL) $(srcdir)/config/loongarch/genopts/genstr.sh opt \ | |
80 | $(srcdir)/config/loongarch/genopts/loongarch.opt.in \ | |
81 | > tmp-loongarch.opt | |
82 | $(SHELL) $(srcdir)/../move-if-change tmp-loongarch.opt \ | |
83 | $(srcdir)/config/loongarch/loongarch.opt | |
84 | $(STAMP) s-loongarch-opt | |
88352420 XR |
85 | |
86 | $(srcdir)/config/loongarch/loongarch-cpucfg-map.h: s-loongarch-cpucfg-map | |
87 | @true | |
88 | s-loongarch-cpucfg-map: $(srcdir)/config/loongarch/genopts/genstr.sh \ | |
89 | $(srcdir)/config/loongarch/genopts/isa-evolution.in | |
90 | $(SHELL) $< cpucfg-map > tmp-cpucfg.h | |
91 | $(SHELL) $(srcdir)/../move-if-change tmp-cpucfg.h \ | |
92 | $(srcdir)/config/loongarch/loongarch-cpucfg-map.h | |
93 | $(STAMP) $@ |