Makefile (Maturion)

Aus SEGA-DC.DE

TARGET = sdlfighter

OPTFLAGS=-O3 -fstrict-aliasing -fexpensive-optimizations -foptimize-register-move -freduce-all-givs -frename-registers -frerun-cse-after-loop -frerun-loop-opt -fschedule-insns -fno-sched-interblock -fsched-spec-load -fsingle-precision-constant -fstrength-reduce -fstrict-aliasing -ffast-math -fno-common -fno-builtin -fno-exceptions -fargument-noalias-global -fomit-frame-pointer# -Wall -g -ffreestanding

KOS_CFLAGS+= -I$(KOS_BASE)/../kos-ports/include $(OPTFLAGS)

KOS_CFLAGS+= -I. -ml -m4-single-only -D_arch_dreamcast -D_arch_sub_pristine -D_SDL -DDREAMCAST


all: $(TARGET).bin

include $(KOS_BASE)/Makefile.rules

.SRCS = main.c edge.c hud.c objects.c BFont.c other.c

OBJS = $(.SRCS:.c=.o)

romdisk.img: $(KOS_GENROMFS) -f romdisk.img -d romdisk -v

romdisk.o: romdisk.img $(KOS_BASE)/utils/bin2o/bin2o romdisk.img romdisk romdisk.o

clean: rm -f $(OBJS) $(TARGET).elf $(TARGET).bin

$(TARGET).elf: $(OBJS) $(PROBJS) romdisk.o $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET).elf $(KOS_START) \ $(OBJS) $(PROBJS) romdisk.o $(OBJEXTRA) -lSDL_image -lSDL_mixer -lSDL_129 -lpng_128 -lz_123 -lm -lSDL_129 $(KOS_LIBS)

$(TARGET).bin: $(TARGET).elf $(KOS_OBJCOPY) -R .stack -O binary $(TARGET).elf $(TARGET).bin

run: $(TARGET).bin $(KOS_LOADER) $(TARGET).bin