forked from m45t3r/snes9x4d
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
UNZIP = 1 | ||
C4_OLD = 0 | ||
SRTC = 0 | ||
CHEATS = 0 | ||
SDLMENU = 1 | ||
SETA_DSP = 0 | ||
SNAPSHOT_OLD = 0 | ||
SPC7110 = 0 | ||
|
||
include Makefile.common | ||
|
||
PREFIX = mipsel-linux | ||
|
||
CXX = $(PREFIX)-g++ | ||
CC = $(PREFIX)-gcc | ||
STRIP = $(PREFIX)-strip | ||
AS = $(PREFIX)-as | ||
|
||
SYSROOT := $(shell $(CC) --print-sysroot) | ||
SDL_CFLAGS := $(shell $(SYSROOT)/usr/bin/sdl-config --cflags) | ||
SDL_LIBS := $(shell $(SYSROOT)/usr/bin/sdl-config --libs) | ||
|
||
LDFLAGS = -lz -lm $(SDL_LIBS) -Wl,--as-needed -Wl,--gc-sections -s | ||
|
||
OFLAGS = -Ofast -fomit-frame-pointer -mips32r2 \ | ||
-fdata-sections -ffunction-sections \ | ||
-fno-stack-protector -fomit-frame-pointer \ | ||
-fno-strict-aliasing \ | ||
-Wall | ||
|
||
ifeq ($(PGO), GENERATE) | ||
OFLAGS += -fprofile-generate -fprofile-dir=/media/data/profile/snes9x4d | ||
LDFLAGS += -lgcov | ||
else ifeq ($(PGO), APPLY) | ||
OFLAGS += -fprofile-use -fprofile-dir=./profile -fbranch-probabilities | ||
else ifeq ($(PGO), FORCE-APPLY) | ||
OFLAGS += -fprofile-use -fprofile-dir=./profile -fbranch-probabilities -Wno-error=coverage-mismatch | ||
else | ||
OFLAGS += -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ | ||
-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \ | ||
-fmerge-all-constants | ||
endif | ||
|
||
CCFLAGS += $(OFLAGS) \ | ||
-DBILINEAR_SCALE \ | ||
-DFAST_LSB_WORD_ACCESS \ | ||
-DFOREVER_16_BIT \ | ||
-DFOREVER_16_BIT_SOUND \ | ||
-DLAGFIX \ | ||
-DDINGOO \ | ||
-DVIDEO_MODE=1 \ | ||
-DZLIB \ | ||
|
||
CXXFLAGS = --std=gnu++14 $(CCFLAGS) \ | ||
-fno-exceptions -fno-rtti -fno-threadsafe-statics | ||
|
||
CFLAGS = --std=gnu11 $(CCFLAGS) | ||
|
||
.SUFFIXES: .o .cpp .c .cc .h .m .i .S .asm .obj | ||
.PHONY: format | ||
|
||
all: snes9x4d | ||
|
||
format: | ||
find . -regex '.*\.\(c\|h\|cpp\|hpp\|cc\|cxx\)' -exec clang-format -style=file -i {} \; | ||
|
||
snes9x4d: $(OBJECTS) | ||
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS) | ||
$(STRIP) $@ | ||
|
||
.cpp.o: | ||
$(CXX) -c $(CXXFLAGS) $*.cpp -o $@ | ||
|
||
.c.o: | ||
$(CC) -c $(CFLAGS) $*.c -o $@ | ||
|
||
.cpp.S: | ||
$(CXX) -S $(CXXFLAGS) $*.cpp -o $@ | ||
|
||
.cpp.i: | ||
$(CXX) -E $(CXXFLAGS) $*.cpp -o $@ | ||
|
||
.S.o: | ||
$(CXX) -c $(CXXFLAGS) $*.S -o $@ | ||
|
||
.S.i: | ||
$(CXX) -c -E $(CXXFLAGS) $*.S -o $@ | ||
|
||
clean: | ||
rm -f $(OBJECTS) | ||
|
||
release: clean all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Desktop Entry] | ||
Name=snes9x4d | ||
Comment=Super Nintendo emulator | ||
Comment[fr]=Émulateur de Super Nintendo | ||
Comment[es]=Emulador de Super Nintendo | ||
Exec=snes9x4d %f | ||
Terminal=false | ||
Type=Application | ||
StartupNotify=true | ||
Icon=sfc | ||
Categories=emulators; | ||
MimeType=application/x-snes-rom;application/zip; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
cd $(dirname $0) | ||
|
||
OPK_NAME=snes9x4d.opk | ||
|
||
echo Building ${OPK_NAME}... | ||
|
||
# create opk | ||
FLIST="../snes9x4d default.gcw0.desktop sfc.png" | ||
|
||
rm -f ${OPK_NAME} | ||
mksquashfs ${FLIST} ${OPK_NAME} -all-root -no-xattrs -noappend -no-exports | ||
|
||
cat default.gcw0.desktop |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.