From 099905d65703d7ed3a1ae97cf5fd9eae28e03aa8 Mon Sep 17 00:00:00 2001 From: Jakob Gruber Date: Mon, 10 Sep 2012 12:22:57 +0200 Subject: [PATCH] misc: Move avr_mcu_section.h to sim/avr Since sim_elf.h includes avr_mcu_section.h, it needs to reference a path which works both during simavr builds, and compilation of external programs including sim_elf.h. Adding the avr/ subdirectory to pkg-config cflags is not desired, to make sure it's clear that header is shared between the sim and the firmware. --- Makefile.common | 2 +- simavr/Makefile | 3 +-- {include => simavr/sim/avr}/avr_mcu_section.h | 0 simavr/sim/sim_avr.c | 2 +- simavr/sim/sim_elf.h | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) rename {include => simavr/sim/avr}/avr_mcu_section.h (100%) diff --git a/Makefile.common b/Makefile.common index e019689..178c3c9 100644 --- a/Makefile.common +++ b/Makefile.common @@ -106,7 +106,7 @@ endif -ffunction-sections -fdata-sections \ -Wl,--relax,--gc-sections \ -Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000 \ - -I../include -I../../include \ + -I../simavr/sim/avr -I../../simavr/sim/avr \ ${^} -o ${@} @${AVR}size ${@}|sed '1d' diff --git a/simavr/Makefile b/simavr/Makefile index 5382e4d..4ade137 100644 --- a/simavr/Makefile +++ b/simavr/Makefile @@ -40,7 +40,6 @@ VPATH += sim IPATH = sim IPATH += . IPATH += ../../shared -IPATH += ../include # # Static library @@ -88,7 +87,7 @@ install : all $(MKDIR) $(DESTDIR)/include/simavr/avr $(INSTALL) -m644 sim/*.h $(DESTDIR)/include/simavr/ $(INSTALL) -m644 sim_core_*.h $(DESTDIR)/include/simavr/ - $(INSTALL) -m644 ../include/*.h $(DESTDIR)/include/simavr/avr/ + $(INSTALL) -m644 sim/avr/*.h $(DESTDIR)/include/simavr/avr/ $(MKDIR) $(DESTDIR)/lib $(INSTALL) ${OBJ}/libsimavr.a $(DESTDIR)/lib/ $(MKDIR) $(DESTDIR)/lib/pkgconfig/ diff --git a/include/avr_mcu_section.h b/simavr/sim/avr/avr_mcu_section.h similarity index 100% rename from include/avr_mcu_section.h rename to simavr/sim/avr/avr_mcu_section.h diff --git a/simavr/sim/sim_avr.c b/simavr/sim/sim_avr.c index d3e6706..1bc169d 100644 --- a/simavr/sim/sim_avr.c +++ b/simavr/sim/sim_avr.c @@ -29,7 +29,7 @@ #include "sim_gdb.h" #include "avr_uart.h" #include "sim_vcd_file.h" -#include "avr_mcu_section.h" +#include "avr/avr_mcu_section.h" #define AVR_KIND_DECL #include "sim_core_decl.h" diff --git a/simavr/sim/sim_elf.h b/simavr/sim/sim_elf.h index 8084873..ed760d5 100644 --- a/simavr/sim/sim_elf.h +++ b/simavr/sim/sim_elf.h @@ -22,7 +22,7 @@ #ifndef __SIM_ELF_H__ #define __SIM_ELF_H__ -#include "avr_mcu_section.h" +#include "avr/avr_mcu_section.h" #ifdef __cplusplus extern "C" { -- 2.39.5