1# Copyright (C) 2021-2022 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 19TM_H += $(srcdir)/config/loongarch/loongarch-driver.h 20OPTIONS_H_EXTRA += $(srcdir)/config/loongarch/loongarch-def.h \ 21 $(srcdir)/config/loongarch/loongarch-tune.h 22 23# Canonical target triplet from config.gcc 24LA_MULTIARCH_TRIPLET = $(patsubst LA_MULTIARCH_TRIPLET=%,%,$\ 25$(filter LA_MULTIARCH_TRIPLET=%,$(tm_defines))) 26 27# String definition header 28LA_STR_H = $(srcdir)/config/loongarch/loongarch-str.h 29 30# String definition header 31$(LA_STR_H): s-loongarch-str ; @true 32s-loongarch-str: $(srcdir)/config/loongarch/genopts/genstr.sh \ 33 $(srcdir)/config/loongarch/genopts/loongarch-strings 34 $(SHELL) $(srcdir)/config/loongarch/genopts/genstr.sh header \ 35 $(srcdir)/config/loongarch/genopts/loongarch-strings > \ 36 tmp-loongarch-str.h 37 $(SHELL) $(srcdir)/../move-if-change tmp-loongarch-str.h \ 38 $(LA_STR_H) 39 $(STAMP) s-loongarch-str 40 41loongarch-c.o: $(srcdir)/config/loongarch/loongarch-c.cc $(CONFIG_H) $(SYSTEM_H) \ 42 coretypes.h $(TM_H) $(TREE_H) output.h $(C_COMMON_H) $(TARGET_H) 43 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 44 $(srcdir)/config/loongarch/loongarch-c.cc 45 46loongarch-builtins.o: $(srcdir)/config/loongarch/loongarch-builtins.cc $(CONFIG_H) \ 47 $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) $(RECOG_H) langhooks.h \ 48 $(DIAGNOSTIC_CORE_H) $(OPTABS_H) $(srcdir)/config/loongarch/loongarch-ftypes.def \ 49 $(srcdir)/config/loongarch/loongarch-modes.def 50 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ 51 $(srcdir)/config/loongarch/loongarch-builtins.cc 52 53loongarch-driver.o : $(srcdir)/config/loongarch/loongarch-driver.cc $(LA_STR_H) \ 54 $(CONFIG_H) $(SYSTEM_H) 55 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< 56 57loongarch-opts.o: $(srcdir)/config/loongarch/loongarch-opts.cc $(LA_STR_H) 58 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< 59 60loongarch-cpu.o: $(srcdir)/config/loongarch/loongarch-cpu.cc $(LA_STR_H) 61 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< 62 63loongarch-def.o: $(srcdir)/config/loongarch/loongarch-def.c $(LA_STR_H) 64 $(CC) -c $(ALL_CFLAGS) $(INCLUDES) $< 65 66$(srcdir)/config/loongarch/loongarch.opt: s-loongarch-opt ; @true 67s-loongarch-opt: $(srcdir)/config/loongarch/genopts/genstr.sh \ 68 $(srcdir)/config/loongarch/genopts/loongarch.opt.in \ 69 $(srcdir)/config/loongarch/genopts/loongarch-strings $(LA_STR_H) 70 $(SHELL) $(srcdir)/config/loongarch/genopts/genstr.sh opt \ 71 $(srcdir)/config/loongarch/genopts/loongarch.opt.in \ 72 > tmp-loongarch.opt 73 $(SHELL) $(srcdir)/../move-if-change tmp-loongarch.opt \ 74 $(srcdir)/config/loongarch/loongarch.opt 75 $(STAMP) s-loongarch-opt 76