1# GCC Makefile fragment for Synopsys DesignWare ARC.
2#
3# Copyright (C) 2016-2020 Free Software Foundation, Inc.
4#
5# This file is part of GCC.
6#
7# GCC is free software; you can redistribute it and/or modify it under the
8# terms of the GNU General Public License as published by the Free Software
9# Foundation; either version 3, or (at your option) any later version.
10#
11# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
14# details.
15#
16# You should have received a copy of the GNU General Public License along
17# with GCC; see the file COPYING3.  If not see
18# <http://www.gnu.org/licenses/>.
19
20TM_H += $(srcdir)/config/arc/arc-c.def
21
22driver-arc.o: $(srcdir)/config/arc/driver-arc.c \
23  $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)
24	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
25
26arc-c.o: $(srcdir)/config/arc/arc-c.c $(CONFIG_H) $(SYSTEM_H) \
27$(TREE_H) $(TM_H) $(TM_P_H) coretypes.h
28	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
29		$(srcdir)/config/arc/arc-c.c
30
31#Run `arc-cpus` if you changed something in arc-cpus.def
32
33.PHONY: arc-cpus
34
35arc-cpus: $(srcdir)/config/arc/t-multilib \
36	$(srcdir)/config/arc/arc-tables.opt
37
38$(srcdir)/config/arc/t-multilib: $(srcdir)/config/arc/genmultilib.awk 	\
39				 $(srcdir)/config/arc/arc-cpus.def
40	$(AWK) -f $< -v FORMAT=Makefile $< $(srcdir)/config/arc/arc-cpus.def > $@
41
42$(srcdir)/config/arc/arc-tables.opt: $(srcdir)/config/arc/genoptions.awk \
43				 $(srcdir)/config/arc/arc-cpus.def
44	$(AWK) -f $< -v FORMAT=Makefile $< $(srcdir)/config/arc/arc-cpus.def > $@
45
46PASSES_EXTRA += $(srcdir)/config/arc/arc-passes.def
47
48# Local Variables:
49# mode: Makefile
50# End:
51