1 # Copyright (C) 2016-2024 Free Software Foundation, Inc.
3 # This file is free software; you can redistribute it and/or modify it under
4 # the terms of the GNU General Public License as published by the Free
5 # Software Foundation; either version 3 of the License, or (at your option)
8 # This file is distributed in the hope that it will be useful, but WITHOUT
9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # You should have received a copy of the GNU General Public License
14 # along with GCC; see the file COPYING3. If not see
15 # <http://www.gnu.org/licenses/>.
17 GTM_H += $(HASH_TABLE_H)
19 CFLAGS-mkoffload.o += $(DRIVER_DEFINES) \
20 -DGCC_INSTALL_NAME=\"$(GCC_INSTALL_NAME)\"
21 mkoffload.o: $(srcdir)/config/gcn/mkoffload.cc
24 ALL_HOST_OBJS += mkoffload.o
26 mkoffload$(exeext): mkoffload.o collect-utils.o libcommon-target.a \
27 $(LIBIBERTY) $(LIBDEPS)
28 +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \
29 mkoffload.o collect-utils.o libcommon-target.a $(LIBIBERTY) $(LIBS)
31 CFLAGS-gcn-run.o += -DVERSION_STRING=$(PKGVERSION_s)
32 COMPILE-gcn-run.o = $(filter-out -fno-rtti,$(COMPILE))
33 gcn-run.o: $(srcdir)/config/gcn/gcn-run.cc
34 $(COMPILE-gcn-run.o) -x c -std=gnu11 -Wno-error=pedantic $<
36 ALL_HOST_OBJS += gcn-run.o
38 gcn-run$(exeext): gcn-run.o
39 +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $< -ldl
42 space := $(empty) $(empty)
44 multilib_list := $(subst $(comma),$(space),$(TM_MULTILIB_CONFIG))
45 MULTILIB_OPTIONS = $(subst $(space),/,$(addprefix march=,$(multilib_list)))
46 MULTILIB_DIRNAMES = $(multilib_list)
48 gcn-tree.o: $(srcdir)/config/gcn/gcn-tree.cc
51 ALL_HOST_OBJS += gcn-tree.o
53 $(srcdir)/config/gcn/gcn-tables.opt: $(srcdir)/config/gcn/gcn-devices.def $(srcdir)/config/gcn/gen-opt-tables.awk
54 $(AWK) -f $(srcdir)/config/gcn/gen-opt-tables.awk $< > $@
56 gcn-device-macros.h: $(srcdir)/config/gcn/gcn-devices.def $(srcdir)/config/gcn/gen-gcn-device-macros.awk
57 $(AWK) -f $(srcdir)/config/gcn/gen-gcn-device-macros.awk $< > $@
58 generated_files += gcn-device-macros.h