Skip to content

Commit ceaeabc

Browse files
committed
include profiling & PGO in make
+add Normmatt's BIOS
1 parent e133ed0 commit ceaeabc

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*.z
44
*.gcda
55
*.gba
6-
*.bin
76
gpsp.gpe
87
tags
98
cscope.out

miyoo/Makefile

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ ALIASES = aliases.txt
1919

2020
CC = /opt/miyoo/bin/arm-linux-gcc
2121

22+
# Possible values : 0, YES, APPLY
23+
PROFILE ?= 0
24+
2225
OBJS = main.o cpu.o memory.o video.o input.o sound.o gui.o \
2326
cheats.o zip.o arm_stub.o warm.o cpu_threaded.o video_blend.o sha1.o imageio.o
2427

@@ -27,10 +30,21 @@ BIN = $(TARGET)
2730
# Platform specific definitions
2831

2932
VPATH += .. ../arm
33+
CFLAGS = -Ofast -fdata-sections -ffunction-sections -fsingle-precision-constant -fno-PIC -flto
3034
CFLAGS += -DARM_ARCH -DMIYOO -Wall
31-
CFLAGS += -march=armv5te -mtune=arm926ej-s -Ofast `/opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/bin/sdl-config --cflags`
35+
CFLAGS += -march=armv5te -mtune=arm926ej-s `/opt/miyoo/arm-miyoo-linux-uclibcgnueabi/sysroot/usr/bin/sdl-config --cflags`
3236
LIBS = -nodefaultlibs -lc -lgcc -lSDL -lpng -lasound -lz -Wl,--as-needed -Wl,--gc-sections -flto -s
3337

38+
ifeq ($(PROFILE), YES)
39+
LIBS += -lgcov
40+
endif
41+
42+
ifeq ($(PROFILE), YES)
43+
CFLAGS += -fprofile-generate=$(HOMEPATH)/profile
44+
else ifeq ($(PROFILE), APPLY)
45+
CFLAGS += -fprofile-use -fbranch-probabilities
46+
endif
47+
3448
# Compilation:
3549

3650
all: $(BIN)
@@ -48,6 +62,7 @@ config:
4862
@cat ../game_config.txt > $(ASSETSDIR)/game_config.txt
4963

5064
package: all config
65+
@rm -rf $(RELEASEDIR)
5166
@mkdir -p $(RELEASEDIR)
5267
@cp *$(TARGET) $(RELEASEDIR)/
5368
@mkdir -p $(RELEASEDIR)/$(DESTDIR)/$(TARGET)
@@ -60,7 +75,8 @@ package: all config
6075

6176
zip: package
6277
@cd $(RELEASEDIR) && zip -rq $(TARGET)$(VERSION).zip ./* && mv *.zip ..
63-
@rm -rf $(RELEASEDIR)
78+
@rm -rf $(RELEASEDIR)/*
79+
mv $(TARGET)*.zip $(RELEASEDIR)/
6480

6581
ipk: package
6682
@mkdir -p .$(HOMEPATH)
@@ -73,7 +89,8 @@ ipk: package
7389
@tar --owner=0 --group=0 -czvf $(RELEASEDIR)/data.tar.gz -C $(RELEASEDIR)/data/ . >/dev/null 2>&1
7490
@tar --owner=0 --group=0 -czvf $(RELEASEDIR)/control.tar.gz -C $(RELEASEDIR)/CONTROL/ . >/dev/null 2>&1
7591
@ar r $(TARGET).ipk $(RELEASEDIR)/control.tar.gz $(RELEASEDIR)/data.tar.gz $(RELEASEDIR)/debian-binary
76-
@rm -rf $(RELEASEDIR)
92+
@rm -rf $(RELEASEDIR)/*
93+
mv $(TARGET).ipk $(RELEASEDIR)/
7794

7895
clean:
7996
rm -f *.o $(BIN)

miyoo/assets/gba_bios.bin

16 KB
Binary file not shown.

miyoo/opkg_assets/gpsp.lnk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ title=gpSP
22
description=gpSP - GameBoy Advance emulator with dynarec
33
exec=/mnt/emus/gpsp/gpsp
44
selectordir=/mnt/roms/GBA
5+
selectorfilter=.gba,.zip

0 commit comments

Comments
 (0)