RetroArch/Makefile.switch

80 lines
2.2 KiB
Makefile
Raw Normal View History

2017-12-24 01:26:58 +00:00
TARGET := retroarch_switch
DEBUG ?= 0
GRIFFIN_BUILD = 0
WHOLE_ARCHIVE_LINK = 0
OBJ :=
2020-07-01 19:04:05 +00:00
DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_DYNAMIC -DHAVE_REWIND
2017-12-24 01:26:58 +00:00
ifeq ($(GRIFFIN_BUILD), 1)
OBJ += griffin/griffin.o
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_NEON -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
2019-07-25 06:07:24 +00:00
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA
2018-05-23 19:59:47 +00:00
DEFINES += -DHAVE_RUNAHEAD -DHAVE_DYNAMIC
2020-06-30 17:35:41 +00:00
DEFINES += -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS
2017-12-24 01:26:58 +00:00
else
2020-07-01 19:04:05 +00:00
HAVE_REWIND = 1
2019-07-11 09:51:06 +00:00
HAVE_AUDIOMIXER = 1
2020-06-30 15:36:03 +00:00
HAVE_RWAV = 1
2017-12-24 01:26:58 +00:00
HAVE_CC_RESAMPLER = 1
2017-12-30 05:02:42 +00:00
HAVE_MENU_COMMON = 1
2017-12-24 01:26:58 +00:00
HAVE_RTGA = 1
HAVE_RPNG = 1
HAVE_RJPEG = 1
HAVE_RBMP = 1
2017-12-30 05:02:42 +00:00
HAVE_RGUI = 1
2017-12-24 01:26:58 +00:00
HAVE_ZLIB = 1
2020-07-02 00:13:04 +00:00
HAVE_DSP_FILTER = 1
2020-07-02 04:28:14 +00:00
HAVE_VIDEO_FILTER = 1
2017-12-24 01:26:58 +00:00
HAVE_BUILTINZLIB = 1
HAVE_LIBRETRODB = 1
HAVE_MATERIALUI = 0 # enable later?
HAVE_XMB = 0
HAVE_STATIC_VIDEO_FILTERS = 1
HAVE_STATIC_AUDIO_FILTERS = 1
2017-12-30 05:02:42 +00:00
HAVE_MENU = 1
HAVE_CONFIGFILE = 1
HAVE_RUNAHEAD = 1
2018-05-23 19:59:47 +00:00
HAVE_DYNAMIC = 1
2020-06-30 17:35:41 +00:00
HAVE_PATCH = 1
HAVE_CHEATS = 1
2017-12-24 01:26:58 +00:00
include Makefile.common
CFLAGS += $(DEF_FLAGS)
BLACKLIST :=
2017-12-24 01:26:58 +00:00
BLACKLIST += input/input_overlay.o
BLACKLIST += tasks/task_overlay.o
2017-12-24 01:26:58 +00:00
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
endif
ifeq ($(strip $(LIBTRANSISTOR_HOME)),)
2018-09-15 06:50:08 +00:00
$(error "Please set LIBTRANSISTOR_HOME in your environment. export LIBTRANSISTOR_HOME=<path/to/libtransistor/dist/>")
2017-12-24 01:26:58 +00:00
endif
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
INCDIRS := -I. -Ideps -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -Ideps/stb -I$(LIBTRANSISTOR_HOME)/build/sdl2_install/include/SDL2/
2017-12-24 01:26:58 +00:00
LIBDIRS := -L.
TARGETS := $(TARGET).nro
2018-09-15 06:50:08 +00:00
CFLAGS += $(INCDIRS) $(DEFINES) -Wno-unused-command-line-argument -Werror-implicit-function-declaration
2017-12-24 01:26:58 +00:00
all: $(TARGETS)
$(TARGET).nro.so: $(OBJ) libretro_switch.a fs.squashfs.o $(LIBTRANSISTOR_NRO_LIB) $(LIBTRANSISTOR_COMMON_LIBS)
$(LD) $(LD_FLAGS) --allow-multiple-definition -o $@ $(OBJ) libretro_switch.a fs.squashfs.o $(LIBTRANSISTOR_NRO_LDFLAGS) -lm
%.squashfs.o: %.squashfs
$(LD) -s -r -b binary -m aarch64elf -T $(LIBTRANSISTOR_HOME)/fs.T -o $@ $<
fs.squashfs: fs/*
mksquashfs $^ $@ -comp lz4 -nopad -noappend
clean:
rm -f $(OBJ) $(TARGET).nro.so $(TARGET).nro
.PHONY: clean all