Skip to content

Commit

Permalink
some smalls tweaks / fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane-D committed May 29, 2024
1 parent 4a753de commit 40afedd
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
34 changes: 17 additions & 17 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ MAKEFILE_DIR := $(subst \,/,$(MAKEFILE_DIR))

ifeq ($(OS),Windows_NT)
# Native Windows
SHELL := $(BIN)/sh.exe
RM := $(BIN)/rm.exe
CP := $(BIN)/cp.exe
MKDIR := $(BIN)/mkdir.exe
SHELL := $(BIN)/sh
RM := $(BIN)/rm
CP := $(BIN)/cp
MKDIR := $(BIN)/mkdir

AR := $(BIN)/ar.exe
CC := $(BIN)/gcc.exe
LD:= $(BIN)/ld.exe
NM:= $(BIN)/nm.exe
OBJCPY := $(BIN)/objcopy.exe
ASMZ80 := $(BIN)/sjasm.exe
MACCER := $(BIN)/mac68k.exe
BINTOS := $(BIN)/bintos.exe
LTO_PLUGIN := --plugin=liblto_plugin-0.dll
AR := $(BIN)/ar
CC := $(BIN)/gcc
LD:= $(BIN)/ld
NM:= $(BIN)/nm
OBJCPY := $(BIN)/objcopy
ASMZ80 := $(BIN)/sjasm
MACCER := $(BIN)/mac68k
BINTOS := $(BIN)/bintos
LTO_PLUGIN := --plugin=liblto_plugin.dll
LIBGCC := $(LIB)/libgcc.a
else
# Native Linux and Docker
PREFIX ?= m68k-elf-
SHELL = sh
RM = rm
CP = cp
MKDIR = mkdir
SHELL := sh
RM := rm
CP := cp
MKDIR := mkdir

AR := $(PREFIX)ar
CC := $(PREFIX)gcc
Expand Down
Binary file modified lib/libmd.a
Binary file not shown.
Binary file modified lib/libmd_debug.a
Binary file not shown.
4 changes: 2 additions & 2 deletions makefile.gen
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ DEFAULT_FLAGS= $(EXTRA_FLAGS) -DSGDK_GCC -m68000 -Wall -Wextra -Wno-shift-negati
FLAGSZ80:= -i$(SRC) -i$(INCLUDE) -i$(RES) -i$(SRC_LIB) -i$(INCLUDE_LIB) -i$(INCLUDE_LIB)/snd

#release: FLAGS= $(DEFAULT_FLAGS) -Os -fomit-frame-pointer -fuse-linker-plugin -flto
release: FLAGS= $(DEFAULT_FLAGS) -O3 -fuse-linker-plugin -fno-web -fno-gcse -fomit-frame-pointer -flto
release: FLAGS= $(DEFAULT_FLAGS) -O3 -fuse-linker-plugin -fno-web -fno-gcse -fomit-frame-pointer -flto -flto=auto -ffat-lto-objects
release: CFLAGS= $(FLAGS)
release: AFLAGS= $(FLAGS)
release: LIBMD= $(LIB)/libmd.a
Expand Down Expand Up @@ -168,7 +168,7 @@ $(OUT)/symbol.txt: $(OUT)/rom.out

$(OUT)/rom.out: $(OUT)/sega.o $(OUT)/cmd_ $(LIBMD)
$(MKDIR) -p $(dir $@)
$(CC) -m68000 -B$(BIN) -n -T $(GDK)/md.ld -nostdlib $(OUT)/sega.o @$(OUT)/cmd_ $(LIBMD) $(LIBGCC) -o $(OUT)/rom.out -Wl,--gc-sections -flto
$(CC) -m68000 -B$(BIN) -n -T $(GDK)/md.ld -nostdlib $(OUT)/sega.o @$(OUT)/cmd_ $(LIBMD) $(LIBGCC) -o $(OUT)/rom.out -Wl,--gc-sections -flto -flto=auto -ffat-lto-objects
$(RM) $(OUT)/cmd_

$(OUT)/cmd_: $(OBJS)
Expand Down
4 changes: 2 additions & 2 deletions makelib.gen
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ DEFAULT_FLAGS_LIB := $(EXTRA_FLAGS) -DSGDK_GCC -m68000 -Wall -Wextra -Wno-array-
FLAGSZ80_LIB := -i$(SRC_LIB) -i$(INCLUDE_LIB) -i$(INCLUDE_LIB)/snd


#release: FLAGS_LIB= $(DEFAULT_FLAGS_LIB) -Os -fomit-frame-pointer -fuse-linker-plugin -ffat-lto-objects -flto
release: FLAGS_LIB= $(DEFAULT_FLAGS_LIB) -O3 -fuse-linker-plugin -fno-web -fno-gcse -fomit-frame-pointer -ffat-lto-objects -flto
#release: FLAGS_LIB= $(DEFAULT_FLAGS_LIB) -Os -fomit-frame-pointer -fuse-linker-plugin -flto -flto=auto -ffat-lto-objects
release: FLAGS_LIB= $(DEFAULT_FLAGS_LIB) -O3 -fuse-linker-plugin -fno-web -fno-gcse -fomit-frame-pointer -flto -flto=auto -ffat-lto-objects
release: CFLAGS_LIB= $(FLAGS_LIB)
release: AFLAGS_LIB= $(FLAGS_LIB)
release: $(LIB)/libmd.a
Expand Down
4 changes: 2 additions & 2 deletions sample/benchmark/src/spr_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,8 @@ u16 executeSpritesTest(u16 *scores)
PAL_setColors(0, palette, 64, CPU);
SYS_enableInts();

// execute sprite bench
execute(25, 12) / 8;
// execute sprite bench (result not used in score)
execute(25, 12);
#endif // LEGACY_SPRITE_ENGINE

SPR_logProfil();
Expand Down

0 comments on commit 40afedd

Please sign in to comment.