Hallo
Ich programmiere gerade ein Spiel für die Uzebox und musste dafür das
Makefile verändern, da ich neue Dateien zum Projekt hinzufügen musste.
Sobald ich aber eine der hinzugefügten Dateien bearbeite, gibt avr-gcc
seltsame Fehler aus, deren Ursprung ich nicht nachvollziehen kann:
1 | avr-gcc.exe: error: c:avr-gcc-4.7.1-rc1-mingw32bin../lib/gcc/avr/4.7.1/../../../../avr/include/avr/io.h: No such file or directory
|
2 | avr-gcc.exe: error: c:avr-gcc-4.7.1-rc1-mingw32bin../lib/gcc/avr/4.7.1/../../../../avr/include/avr/sfr_defs.h: No such file or directory
|
3 | [...]
|
Folgende Zeilen habe ich im Makefile geändert/hinzugefügt:
1 | ### Source files and search directory
|
2 | CSRC = sd/pff.c sd/mmc.c
|
3 | ASRC = sd/xitoa.S sd/usi.S animation.S
|
4 |
|
5 | [...]
|
6 |
|
7 | ## Objects that must be built in order to link)
|
8 | OBJECTS = uzeboxVideoEngineCore.o uzeboxCore.o uzeboxSoundEngine.o uzeboxSoundEngineCore.o uzeboxVideoEngine.o $(GAME).o $(notdir $(CSRC:.c=.o)) $(notdir $(ASRC:.S=.o))
|
9 |
|
10 | [...]
|
11 |
|
12 | ## Compile other asm files
|
13 | $(notdir $(ASRC:.S=.o)): $(addprefix ../, $(ASRC))
|
14 | $(CC) $(INCLUDES) $(ASMFLAGS) -c $+
|
15 |
|
16 | ## Compile other c files
|
17 | $(notdir $(CSRC:.c=.o)): $(addprefix ../, $(CSRC))
|
18 | $(CC) $(INCLUDES) $(CFLAGS) -c $+
|
Das Makefile befindet sich in einem Unterordner, daher wird das prefix
../ hinzugefügt. Seltsam ist außerdem, dass es keine Fehler gibt wenn
ich alles neukompiliere.
Mit Makefiles kenne ich mich leider nur sehr wenig nicht aus, vielleicht
kann mir einer einen Tipp geben, was ich ich falsch gemacht habe.