-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request "GCW0 port, numerous fixes" from gameblabla/merge
GCW0 port, numerous fixes
- Loading branch information
Showing
14 changed files
with
373 additions
and
111 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
PRGNAME = ngpcemu | ||
CC = /opt/gcw0-toolchain-static/bin/mipsel-linux-gcc | ||
CXX = /opt/gcw0-toolchain-static/bin/mipsel-linux-g++ | ||
|
||
#### Configuration | ||
|
||
# Possible values : retrostone, rs97, rs90 | ||
PORT = gcw0 | ||
# Possible values : alsa, oss, portaudio | ||
SOUND_ENGINE = sdl | ||
# Possible values : generic, rs90 | ||
MENU = generic | ||
# Possible values : 0, YES, APPLY | ||
PROFILE = 0 | ||
|
||
#### End of Configuration | ||
|
||
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" | ||
|
||
INCLUDES = -Imednafen/include -I./ -I./mednafen -I./mednafen/hw_cpu/z80-fuse -I./mednafen/ngp -I./mednafen/ngp/TLCS-900h -I./mednafen/sound | ||
INCLUDES += -Ishell/headers -Ishell/video/$(PORT) -Ishell/audio -Ishell/scalers -Ishell/input/sdl -Ishell/fonts -Ishell/menu/$(MENU) | ||
|
||
DEFINES = -DLSB_FIRST -DWANT_16BPP -DFRONTEND_SUPPORTS_RGB565 -DINLINE="inline" -DWANT_STEREO_SOUND | ||
DEFINES += -DSIZEOF_DOUBLE=8 $(WARNINGS) -DMEDNAFEN_VERSION=\"0.9.31\" -DPACKAGE=\"mednafen\" -DMEDNAFEN_VERSION_NUMERIC=931 -DPSS_STYLE=1 -DMPC_FIXED_POINT -DSTDC_HEADERS -D__STDC_LIMIT_MACROS -D_LOW_ACCURACY_ | ||
DEFINES += -DGIT_VERSION=\"$(GIT_VERSION)\" -DNOAVERAGING -DNDEBUG -DGCW0 -DIPU_SCALE | ||
|
||
#-fdata-sections -ffunction-sections | ||
CFLAGS = -Ofast -funroll-loops -mno-fp-exceptions -mno-check-zero-division -mframe-header-opt -fsingle-precision-constant -fno-common -mips32r2 -fno-PIC -mno-abicalls -flto | ||
CFLAGS += $(INCLUDES) $(DEFINES) | ||
ifeq ($(PROFILE), YES) | ||
CFLAGS += -fprofile-generate=/media/data/local/home/ | ||
else ifeq ($(PROFILE), APPLY) | ||
CFLAGS += -fprofile-use | ||
endif | ||
|
||
CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++03 | ||
LDFLAGS =-nodefaultlibs -lc -lgcc -lSDL -lasound -no-pie -Wl,--as-needed -Wl,--gc-sections -flto -s | ||
|
||
ifeq ($(PROFILE), YES) | ||
LDFLAGS += -lgcov | ||
endif | ||
|
||
ifeq ($(SOUND_ENGINE), alsa) | ||
LDFLAGS += -lasound | ||
endif | ||
ifeq ($(SOUND_ENGINE), portaudio) | ||
LDFLAGS += -lportaudio | ||
endif | ||
|
||
# Files to be compiled | ||
SRCDIR = ./mednafen ./mednafen/hw_cpu/z80-fuse ./mednafen/ngp ./mednafen/ngp/TLCS-900h ./mednafen/sound | ||
SRCDIR += ./shell/input/sdl ./shell/audio/$(SOUND_ENGINE) ./shell/emu ./shell/scalers ./shell/video/$(PORT) ./shell/menu/$(MENU) ./shell/fonts | ||
|
||
VPATH = $(SRCDIR) | ||
SRC_C = $(foreach dir, $(SRCDIR), $(wildcard $(dir)/*.c)) | ||
SRC_CPP = $(foreach dir, $(SRCDIR), $(wildcard $(dir)/*.cpp)) | ||
OBJ_C = $(notdir $(patsubst %.c, %.o, $(SRC_C))) | ||
OBJ_CPP = $(notdir $(patsubst %.cpp, %.o, $(SRC_CPP))) | ||
OBJS = $(OBJ_C) $(OBJ_CPP) | ||
|
||
# Rules to make executable | ||
$(PRGNAME): $(OBJS) | ||
$(CC) $(CFLAGS) -std=gnu99 -o $(PRGNAME) $^ $(LDFLAGS) | ||
|
||
$(OBJ_CPP) : %.o : %.cpp | ||
$(CXX) $(CXXFLAGS) -c -o $@ $< | ||
|
||
clean: | ||
rm -f $(PRGNAME)$(EXESUFFIX) *.o *.gcda |
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
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
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
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
Oops, something went wrong.