smsplus-gx/Makefile.amini
gameblabla 9bbdc89dfc
Add Makefiles for GCW0 and the New bittboy.
Also updating the other Makefiles accordingly.
2019-03-07 19:08:39 +01:00

40 lines
1.3 KiB
Makefile

PRGNAME = sms_sdl
# define regarding OS, which compiler to use
CC = /opt/rs97-toolchain/bin/mipsel-linux-gcc
# add SDL dependencies
PORT = amini
SOUND_OUTPUT = oss
SOUND_ENGINE = maxim_sn76489
Z80_CORE = z80
PROFILE = 0
CFLAGS = -Ofast -fdata-sections -ffunction-sections -mno-check-zero-division -funsafe-math-optimizations -fsingle-precision-constant -fno-common -mips32 -fno-PIC -mno-abicalls
CFLAGS += -std=gnu99 -DLSB_FIRST -DMAXIM_PSG
CFLAGS += -Isource -Isource/cpu_cores/$(Z80_CORE) -Isource/generic -Isource/ports/$(PORT) -I./source/sound -Isource/unzip -Isource/sdl -Isource/sound/$(SOUND_ENGINE) -Isource/sound_output
ifeq ($(PROFILE), 1)
CFLAGS += -fprofile-generate=/mnt/int_sd/profile
else
CFLAGS += -fprofile-use
endif
LDFLAGS = -lSDL -lm -lz -lc -no-pie -Wl,--as-needed -Wl,--gc-sections -s -flto
# Files to be r
SRCDIR = ./source ./source/unzip ./source/cpu_cores/$(Z80_CORE) ./source/sound ./source/sound_output/$(SOUND_OUTPUT) ./source/generic ./source/ports/$(PORT) ./source/sound/$(SOUND_ENGINE)
VPATH = $(SRCDIR)
SRC_C = $(foreach dir, $(SRCDIR), $(wildcard $(dir)/*.c))
OBJ_C = $(notdir $(patsubst %.c, %.o, $(SRC_C)))
OBJS = $(OBJ_C)
# Rules to make executable
$(PRGNAME): $(OBJS)
$(CC) $(CFLAGS) -o $(PRGNAME) $^ $(LDFLAGS)
$(OBJ_C) : %.o : %.c
$(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f $(PRGNAME) *.o