Yes (I wrote it in the original post, and to make sure, I deleted the whole content of the out dir, with the same result).
And I'm pretty sure it doesn't even compile other files because I work on a quite weak machine and building my entire project from scratch takes some minutes, whereas I get this error immediately.
I don't know if it helps, but here's my makefile (that's the original from sgdk dir, modified to take into account a src/chars directory, plus the -S tag anf maybe another one exporting the symbols table) :
Code: Select all
BIN= $(GDK)/bin
LIB= $(GDK)/lib
LIBSRC= $(GDK)/src
LIBRES= $(GDK)/res
LIBINCLUDE= $(GDK)/inc
SRC= src
RES= res
INCLUDE= inc
SHELL= $(BIN)/sh
RM= $(BIN)/rm
CP= $(BIN)/cp
AR= $(BIN)/ar
CC= $(BIN)/gcc
LD= $(BIN)/ld
NM= $(BIN)/nm
ECHO= echo
OBJCPY= $(BIN)/objcopy
ASMZ80= $(BIN)/sjasm
MACCER= $(BIN)/mac68k
SIZEBND= $(BIN)/sizebnd
BINTOS= $(BIN)/bintos
GENRES= $(BIN)/genres
RESCOMP= $(BIN)/rescomp
MKDIR= $(BIN)/mkdir
SRC_C= $(wildcard *.c)
SRC_C+= $(wildcard $(SRC)/*.c)
SRC_C+= $(wildcard $(SRC)/chars/*.c)
SRC_S= $(wildcard *.s)
SRC_S+= $(wildcard $(SRC)/*.s)
SRC_ASM= $(wildcard *.asm)
SRC_ASM+= $(wildcard $(SRC)/*.asm)
SRC_S80= $(wildcard *.s80)
SRC_S80+= $(wildcard $(SRC)/*.s80)
RES_C= $(wildcard $(RES)/*.c)
RES_S= $(wildcard $(RES)/*.s)
RES_RC= $(wildcard *.rc)
RES_RC+= $(wildcard $(RES)/*.rc)
RES_RES= $(wildcard *.res)
RES_RES+= $(wildcard $(RES)/*.res)
OBJ= $(RES_RES:.res=.o)
OBJ+= $(RES_RC:.rc=.o)
OBJ+= $(RES_S:.s=.o)
OBJ+= $(RES_C:.c=.o)
OBJ+= $(SRC_S80:.s80=.o)
OBJ+= $(SRC_ASM:.asm=.o)
OBJ+= $(SRC_S:.s=.o)
OBJ+= $(SRC_C:.c=.o)
OBJS = $(addprefix out/, $(OBJ))
INCS= -I$(INCLUDE) -I$(SRC) -I$(RES) -I$(LIBINCLUDE) -I$(LIBRES)
DEFAULT_FLAGS= -m68000 -Wall -fno-builtin $(INCS) -B$(BIN) -S
FLAGSZ80= -i$(SRC) -i$(INCLUDE) -i$(RES) -i$(LIBSRC) -i$(LIBINCLUDE)
#release: FLAGS= $(DEFAULT_FLAGS) -O3 -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer
release: FLAGS= $(DEFAULT_FLAGS) -O1 -fomit-frame-pointer
release: out/rom.bin
debug: FLAGS= $(DEFAULT_FLAGS) -O1 -ggdb -DDEBUG=1
debug: out/rom.bin out/rom.out out/symbol.txt
all: release
default: release
.PHONY: clean
clean:
$(RM) -f $(OBJS) out.lst out/cmd_ out/sega.o out/rom_head.bin out/rom_head.o out/rom.nm out/rom.wch out/rom.out out/rom.bin
cleanrelease:
$(RM) -f $(OBJS) out.lst out/cmd_ out/sega.o out/rom_head.bin out/rom_head.o out/rom.nm out/rom.wch out/rom.out out/rom.bin
cleandebug:
$(RM) -f $(OBJS) out.lst out/cmd_ out/sega.o out/rom_head.bin out/rom_head.o out/rom.nm out/rom.wch out/rom.out out/rom.bin out/symbol.txt
cleanobj:
$(RM) -f $(OBJS) out/sega.o out/rom_head.bin out/rom_head.o out/rom.out
out/rom.bin: out/rom.out
$(OBJCPY) -O binary out/rom.out out/rom.bin
$(SIZEBND) out/rom.bin -sizealign 131072
out/symbol.txt: out/rom.out
$(NM) out/rom.out > out/symbol.txt
out/rom.out: out/sega.o out/cmd_ $(LIB)/libmd.a
$(CC) -B$(BIN) -n -T $(GDK)/md.ld -nostdlib out/sega.o @out/cmd_ $(LIB)/libmd.a $(LIB)/libgcc.a -o out/rom.out
$(RM) out/cmd_
out/cmd_: $(OBJS)
$(ECHO) "$(OBJS)" > out/cmd_
out/sega.o: $(SRC)/boot/sega.s out/rom_head.bin
$(MKDIR) -p out
$(CC) $(FLAGS) -c $(SRC)/boot/sega.s -o $@
out/rom_head.bin: out/rom_head.o
$(LD) -T $(GDK)/md.ld -nostdlib --oformat binary -o $@ $<
out/rom_head.o: $(SRC)/boot/rom_head.c
$(MKDIR) -p out
$(CC) $(FLAGS) -c $< -o $@
$(SRC)/boot/sega.s: $(LIBSRC)/boot/sega.s
$(MKDIR) -p $(SRC)/boot
$(CP) $< $@
$(SRC)/boot/rom_head.c: $(LIBSRC)/boot/rom_head.c
$(MKDIR) -p $(SRC)/boot
$(CP) $< $@
out/%.o: %.c
$(MKDIR) -p out
$(MKDIR) -p out/src
$(MKDIR) -p out/src/chars
$(MKDIR) -p out/res
$(CC) $(FLAGS) -c $< -o $@
out/%.o: %.s
$(MKDIR) -p out
$(MKDIR) -p out/src
$(MKDIR) -p out/res
$(CC) $(FLAGS) -c $< -o $@
%.s: %.res
$(RESCOMP) $< $@
%.asm: %.rc
$(GENRES) $< $@
%.s: %.asm
$(MACCER) -o $@ $<
%.o80: %.s80
$(ASMZ80) $(FLAGSZ80) $< $@ out.lst
%.s: %.o80
$(BINTOS) $<