t-avr revision 1.6
1# Copyright (C) 2000-2016 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 19driver-avr.o: $(srcdir)/config/avr/driver-avr.c \ 20 $(CONFIG_H) $(SYSTEM_H) coretypes.h \ 21 $(srcdir)/config/avr/avr-arch.h $(TM_H) 22 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< 23 24avr-devices.o: $(srcdir)/config/avr/avr-devices.c \ 25 $(srcdir)/config/avr/avr-mcus.def \ 26 $(srcdir)/config/avr/avr-arch.h \ 27 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) 28 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< 29 30avr-c.o: $(srcdir)/config/avr/avr-c.c \ 31 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) 32 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< 33 34avr-log.o: $(srcdir)/config/avr/avr-log.c \ 35 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(INPUT_H) dumpfile.h 36 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< 37 38avr.o avr-c.o: $(srcdir)/config/avr/builtins.def 39 40# This overrides stdfix.h from USER_H which we supply and include 41# in our own stdfix.h as stdfix-gcc.h. 42 43EXTRA_HEADERS = $(srcdir)/config/avr/stdfix.h \ 44 stdfix-gcc.h 45 46stdfix-gcc.h: $(srcdir)/ginclude/stdfix.h 47 -cp $< $@ 48 49# Files and Variables auto-generated from avr-mcus.def 50 51AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def 52 53# Run `avr-mcus' after you changed or added devices in avr-mcus.def 54 55.PHONY: avr-mcus 56 57avr-mcus: $(srcdir)/config/avr/t-multilib \ 58 $(srcdir)/doc/avr-mmcu.texi ; @true 59 60# Make sure that native -mmcu= support is in sync with -mmcu= documentation. 61gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.c \ 62 $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.c \ 63 $(srcdir)/config/avr/avr-arch.h 64 $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@ 65 66gen-avr-mmcu-specs$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-specs.c \ 67 $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.c \ 68 $(srcdir)/config/avr/avr-arch.h $(TM_H) 69 $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ $(INCLUDES) 70 71$(srcdir)/doc/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext) 72 $(RUN_GEN) ./$< > $@ 73 74s-device-specs: gen-avr-mmcu-specs$(build_exeext) 75 rm -rf device-specs 76 mkdir device-specs && cd device-specs && $(RUN_GEN) ../$< 77 $(STAMP) s-device-specs 78 79GCC_PASSES+=s-device-specs 80 81install-driver: install-device-specs 82 83install-device-specs: s-device-specs installdirs 84 -rm -rf $(DESTDIR)$(libsubdir)/device-specs 85 mkdir $(DESTDIR)$(libsubdir)/device-specs 86 -for file in device-specs/*; do \ 87 $(INSTALL_DATA) $${file} $(DESTDIR)$(libsubdir)/$${file}; \ 88 done 89 90# Map -mmcu= to the right multilib variant 91# MULTILIB_OPTIONS 92# MULTILIB_DIRNAMES 93# MULTILIB_EXCEPTIONS 94# MULTILIB_MATCHES 95 96s-mlib: $(srcdir)/config/avr/t-multilib 97 98$(srcdir)/config/avr/t-multilib: $(srcdir)/config/avr/genmultilib.awk \ 99 $(AVR_MCUS) 100 $(AWK) -f $< -v FORMAT=Makefile $< $(AVR_MCUS) > $@ 101