Debian Codegraph @

gcc/config/loongarch/t-loongarch

raw
1 # Copyright (C) 2021-2025 Free Software Foundation, Inc.
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
19
20 GTM_H += loongarch-multilib.h
21 OPTIONS_H_EXTRA += $(srcdir)/config/loongarch/loongarch-def.h \
22 $(srcdir)/config/loongarch/loongarch-def-array.h \
23 $(srcdir)/config/loongarch/loongarch-tune.h \
24 $(srcdir)/config/loongarch/loongarch-evolution.h
25
26 # Canonical target triplet from config.gcc
27 LA_MULTIARCH_TRIPLET = $(patsubst LA_MULTIARCH_TRIPLET=%,%,$\
28 $(filter LA_MULTIARCH_TRIPLET=%,$(tm_defines)))
29
30 # String definition header
31 LA_STR_H = $(srcdir)/config/loongarch/loongarch-str.h
32
33 # String definition header
34 $(LA_STR_H): s-loongarch-str ; @true
35 s-loongarch-str: $(srcdir)/config/loongarch/genopts/genstr.sh \
36 $(srcdir)/config/loongarch/genopts/loongarch-strings \
37 $(srcdir)/config/loongarch/genopts/isa-evolution.in
38 $(SHELL) $(srcdir)/config/loongarch/genopts/genstr.sh header \
39 $(srcdir)/config/loongarch/genopts/loongarch-strings > \
40 tmp-loongarch-str.h
41 $(SHELL) $(srcdir)/../move-if-change tmp-loongarch-str.h \
42 $(LA_STR_H)
43 $(STAMP) s-loongarch-str
44
45 loongarch-c.o: $(srcdir)/config/loongarch/loongarch-c.cc $(CONFIG_H) $(SYSTEM_H) \
46 coretypes.h $(TM_H) $(TREE_H) output.h $(C_COMMON_H) $(TARGET_H)
47 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
48 $(srcdir)/config/loongarch/loongarch-c.cc
49
50 loongarch-target-attr.o: $(srcdir)/config/loongarch/loongarch-target-attr.cc \
51 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TARGET_H) $(TREE_H) $(TM_H) \
52 $(DIAGNOSTIC_CORE_H)
53 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
54 $(srcdir)/config/loongarch/loongarch-target-attr.cc
55
56 loongarch-builtins.o: $(srcdir)/config/loongarch/loongarch-builtins.cc $(CONFIG_H) \
57 $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) $(RECOG_H) langhooks.h \
58 $(DIAGNOSTIC_CORE_H) $(OPTABS_H) $(srcdir)/config/loongarch/loongarch-ftypes.def \
59 $(srcdir)/config/loongarch/loongarch-modes.def
60 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
61 $(srcdir)/config/loongarch/loongarch-builtins.cc
62
63 loongarch-driver.o : $(srcdir)/config/loongarch/loongarch-driver.cc $(LA_STR_H) \
64 $(CONFIG_H) $(SYSTEM_H)
65 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
66
67 loongarch-opts.o: $(srcdir)/config/loongarch/loongarch-opts.cc $(LA_STR_H)
68 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
69
70 loongarch-cpu.o: $(srcdir)/config/loongarch/loongarch-cpu.cc $(LA_STR_H) \
71 $(srcdir)/config/loongarch/loongarch-evolution.h
72 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
73
74 loongarch-evolution.o: $(srcdir)/config/loongarch/loongarch-evolution.cc $(LA_STR_H) \
75 $(srcdir)/config/loongarch/loongarch-evolution.h
76 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
77
78 loongarch-def.o: $(srcdir)/config/loongarch/loongarch-def.cc $(LA_STR_H)
79 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
80
81 loongarch-d.o: $(srcdir)/config/loongarch/loongarch-d.cc
82 $(COMPILE) $<
83 $(POSTCOMPILE)
84
85 $(srcdir)/config/loongarch/loongarch.opt: s-loongarch-opt ; @true
86 s-loongarch-opt: $(srcdir)/config/loongarch/genopts/genstr.sh \
87 $(srcdir)/config/loongarch/genopts/loongarch.opt.in \
88 $(srcdir)/config/loongarch/genopts/isa-evolution.in \
89 $(srcdir)/config/loongarch/genopts/loongarch-strings $(LA_STR_H)
90 $(SHELL) $(srcdir)/config/loongarch/genopts/genstr.sh opt \
91 $(srcdir)/config/loongarch/genopts/loongarch.opt.in \
92 > tmp-loongarch.opt
93 $(SHELL) $(srcdir)/../move-if-change tmp-loongarch.opt \
94 $(srcdir)/config/loongarch/loongarch.opt
95 $(STAMP) s-loongarch-opt
96
97 $(srcdir)/config/loongarch/loongarch-evolution.h: s-loongarch-evolution
98 @true
99 $(srcdir)/config/loongarch/loongarch-evolution.cc: s-loongarch-evolution
100 @true
101 s-loongarch-evolution: $(srcdir)/config/loongarch/genopts/genstr.sh \
102 $(srcdir)/config/loongarch/genopts/isa-evolution.in \
103 $(srcdir)/config/loongarch/genopts/gen-evolution.awk
104 $(SHELL) $< evolution_h > tmp-isa-evo.h
105 $(SHELL) $< evolution_c > tmp-isa-evo.cc
106 $(SHELL) $(srcdir)/../move-if-change tmp-isa-evo.h \
107 $(srcdir)/config/loongarch/loongarch-evolution.h
108 $(SHELL) $(srcdir)/../move-if-change tmp-isa-evo.cc \
109 $(srcdir)/config/loongarch/loongarch-evolution.cc
110 $(STAMP) $@