mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
libretro, changes to allow for both standalone and libretro build
This commit is contained in:
parent
e2b573c0b0
commit
0198149a72
1 changed files with 22 additions and 15 deletions
37
Makefile
37
Makefile
|
@ -1,21 +1,6 @@
|
||||||
TARGET ?= PicoDrive
|
TARGET ?= PicoDrive
|
||||||
DEBUG ?= 0
|
DEBUG ?= 0
|
||||||
CFLAGS += -Wall -ggdb -ffunction-sections -fdata-sections
|
|
||||||
CFLAGS += -I.
|
CFLAGS += -I.
|
||||||
ifeq "$(DEBUG)" "0"
|
|
||||||
CFLAGS += -O3 -DNDEBUG
|
|
||||||
endif
|
|
||||||
|
|
||||||
# This is actually needed, believe me.
|
|
||||||
# If you really have to disable this, set NO_ALIGN_FUNCTIONS elsewhere.
|
|
||||||
ifndef NO_ALIGN_FUNCTIONS
|
|
||||||
CFLAGS += -falign-functions=2
|
|
||||||
endif
|
|
||||||
LDFLAGS += -Wl,--gc-sections
|
|
||||||
|
|
||||||
# profiling
|
|
||||||
pprof ?= 0
|
|
||||||
gperf ?= 0
|
|
||||||
|
|
||||||
all: config.mak target_
|
all: config.mak target_
|
||||||
|
|
||||||
|
@ -34,6 +19,28 @@ else # NO_CONFIG_MAK
|
||||||
config.mak:
|
config.mak:
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# This is actually needed, believe me.
|
||||||
|
# If you really have to disable this, set NO_ALIGN_FUNCTIONS elsewhere.
|
||||||
|
ifndef NO_ALIGN_FUNCTIONS
|
||||||
|
CFLAGS += -falign-functions=2
|
||||||
|
endif
|
||||||
|
LDFLAGS += -Wl,--gc-sections
|
||||||
|
|
||||||
|
# profiling
|
||||||
|
pprof ?= 0
|
||||||
|
gperf ?= 0
|
||||||
|
|
||||||
|
ifneq ("$(PLATFORM)", "libretro")
|
||||||
|
CFLAGS += -Wall -g
|
||||||
|
ifneq ($(findstring gcc,$(CC)),)
|
||||||
|
CFLAGS += -ffunction-sections -fdata-sections
|
||||||
|
LDFLAGS += -Wl,--gc-sections
|
||||||
|
endif
|
||||||
|
ifeq "$(DEBUG)" "0"
|
||||||
|
CFLAGS += -O3 -DNDEBUG
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ("$(PLATFORM)",$(filter "$(PLATFORM)","gp2x" "opendingux" "rpi1"))
|
ifeq ("$(PLATFORM)",$(filter "$(PLATFORM)","gp2x" "opendingux" "rpi1"))
|
||||||
# very small caches, avoid optimization options making the binary much bigger
|
# very small caches, avoid optimization options making the binary much bigger
|
||||||
CFLAGS += -finline-limit=42 -fno-unroll-loops -fno-ipa-cp -ffast-math
|
CFLAGS += -finline-limit=42 -fno-unroll-loops -fno-ipa-cp -ffast-math
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue