aboutsummaryrefslogtreecommitdiff
path: root/Makefile.retrostone2
diff options
context:
space:
mode:
authorgameblabla2020-12-26 08:53:03 +0100
committergameblabla2020-12-26 08:53:03 +0100
commit2c41876dd9913c2a49cd044a805df54915b95f0f (patch)
treee04b3f224a90c217289c49b84129faac19bf1248 /Makefile.retrostone2
parent4c1a193d483b10ef63c27553f6e6e95af23552b8 (diff)
downloadsnesemu-2c41876dd9913c2a49cd044a805df54915b95f0f.tar.gz
snesemu-2c41876dd9913c2a49cd044a805df54915b95f0f.tar.bz2
snesemu-2c41876dd9913c2a49cd044a805df54915b95f0f.zip
Fix issue wit pitch being doubled by 2.
Change all of the code accordingly and simplify it. This was made as to allocate less memory than needed, improve the speed of the scaler code and make it more suitable for IPU mode.
Diffstat (limited to 'Makefile.retrostone2')
-rw-r--r--Makefile.retrostone263
1 files changed, 63 insertions, 0 deletions
diff --git a/Makefile.retrostone2 b/Makefile.retrostone2
new file mode 100644
index 0000000..a64a4cf
--- /dev/null
+++ b/Makefile.retrostone2
@@ -0,0 +1,63 @@
+PRGNAME = snes9x
+
+VIDEO_BACKEND = gcw0
+INPUT_BACKEND = sdl
+SOUND_BACKEND = sdl
+PROFILE = 0
+
+# define regarding OS, which compiler to use
+CC = /opt/retrostone2-toolchain/bin/arm-linux-gcc
+
+# change compilation / linking flag options
+CFLAGS = -DLSB_FIRST -I. -Ilibretro-common/include -Isrc -DINLINE="inline" -DRIGHTSHIFT_IS_SAR -DFAST_ALIGNED_LSB_WORD_ACCESS
+CFLAGS += -Isource -I./shell/emu -I./shell/scalers -I./shell/emu -I./shell/audio -I./shell/menu -I./shell/video/sdl -I./shell/input -Ishell/headers
+
+CFLAGS += -Ofast -fsingle-precision-constant -fno-PIC -flto
+CFLAGS += -falign-functions=1 -falign-jumps=1 -falign-loops=1 -falign-labels=1
+
+CFLAGS += -DNDEBUG -DLAGFIX -DGIT_VERSION=\"" c9b3980"\" -fno-builtin -fno-exceptions -ffunction-sections -std=gnu99
+CFLAGS += -Wall -Wextra -pedantic -Wno-implicit-function-declaration -Wno-implicit-fallthrough -Wno-sign-compare -Wno-unused-variable -Wno-unused-function -Wno-uninitialized -Wno-strict-aliasing -Wno-overflow -fno-strict-overflow
+
+ifeq ($(PROFILE), YES)
+CFLAGS += -fprofile-generate=/home/useless/profile
+else ifeq ($(PROFILE), APPLY)
+CFLAGS += -fprofile-use -fbranch-probabilities
+endif
+
+#-fprofile-generate=/mnt/int_sd/profile
+LDFLAGS = -lc -lgcc -lm -lSDL -no-pie -Wl,--as-needed -Wl,--gc-sections -s -flto
+ifeq ($(SOUND_BACKEND), portaudio)
+LDFLAGS += -lasound -lportaudio
+endif
+ifeq ($(SOUND_BACKEND), libao)
+LDFLAGS += -lao
+endif
+ifeq ($(SOUND_BACKEND), alsa)
+LDFLAGS += -lasound
+endif
+ifeq ($(SOUND_BACKEND), pulse)
+LDFLAGS += -lpulse -lpulse-simple
+endif
+
+ifeq ($(PROFILE), YES)
+LDFLAGS += -lgcov
+endif
+
+# Files to be compiled
+SRCDIR = ./source ./shell/emu ./shell/scalers ./shell/audio/$(SOUND_BACKEND) ./shell/menu ./shell/video/$(VIDEO_BACKEND) ./shell/input/$(INPUT_BACKEND) ./shell/other
+VPATH = $(SRCDIR)
+SRC_C = $(foreach dir, $(SRCDIR), $(wildcard $(dir)/*.c))
+SRC_CP = $(foreach dir, $(SRCDIR), $(wildcard $(dir)/*.cpp))
+OBJ_C = $(notdir $(patsubst %.c, %.o, $(SRC_C)))
+OBJ_CP = $(notdir $(patsubst %.cpp, %.o, $(SRC_CP)))
+OBJS = $(OBJ_C) $(OBJ_CP)
+
+# Rules to make executable
+$(PRGNAME): $(OBJS)
+ $(CC) $(CFLAGS) -o $(PRGNAME) $^ $(LDFLAGS)
+
+$(OBJ_C) : %.o : %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+clean:
+ rm -f $(PRGNAME)$(EXESUFFIX) *.o