From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Joachim Le Fournis Date: Tue, 13 Jul 2021 21:17:44 +0200 Subject: [PATCH] Add serenity toolchain information and makefile files --- build/platform.simulator.serenity.mak | 6 ++++ build/toolchain.x86_64-pc-serenity.mak | 4 +++ ion/src/simulator/serenity/Makefile | 43 +++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 build/platform.simulator.serenity.mak create mode 100644 build/toolchain.x86_64-pc-serenity.mak create mode 100644 ion/src/simulator/serenity/Makefile diff --git a/build/platform.simulator.serenity.mak b/build/platform.simulator.serenity.mak new file mode 100644 index 0000000..ff985de --- /dev/null +++ b/build/platform.simulator.serenity.mak @@ -0,0 +1,6 @@ +TOOLCHAIN = x86_64-pc-serenity +EXE = elf + +EPSILON_TELEMETRY ?= 0 + +SHOULD_USE_DYNAMIC_SDL = 1 diff --git a/build/toolchain.x86_64-pc-serenity.mak b/build/toolchain.x86_64-pc-serenity.mak new file mode 100644 index 0000000..d6110e2 --- /dev/null +++ b/build/toolchain.x86_64-pc-serenity.mak @@ -0,0 +1,4 @@ +TOOLCHAIN_PREFIX = x86_64-pc-serenity +CC = $(TOOLCHAIN_PREFIX)-gcc +CXX = $(TOOLCHAIN_PREFIX)-g++ +LD = $(TOOLCHAIN_PREFIX)-g++ diff --git a/ion/src/simulator/serenity/Makefile b/ion/src/simulator/serenity/Makefile new file mode 100644 index 0000000..5d4bb13 --- /dev/null +++ b/ion/src/simulator/serenity/Makefile @@ -0,0 +1,43 @@ +ION_SIMULATOR_FILES = 1 + + +ion_src += $(addprefix ion/src/simulator/linux/, \ + assets.s \ + platform_files.cpp \ + platform_images.cpp \ + platform_language.cpp \ +) + +SFLAGS += -I$(SERENITY_INSTALL_ROOT)/usr/local/include/SDL2 -I$(SERENITY_INSTALL_ROOT)/usr/local/include +LDFLAGS += -lpng -lz -ljpeg -lSDL2 + +ion_src += $(addprefix ion/src/simulator/shared/, \ + dummy/haptics_enabled.cpp \ + dummy/keyboard_callback.cpp \ + dummy/window_callback.cpp \ + actions.cpp \ + clipboard_helper.cpp \ + haptics.cpp \ + journal.cpp \ + state_file.cpp \ +) + +ion_src += ion/src/shared/collect_registers.cpp + +ifeq ($(EPSILON_TELEMETRY),1) +ion_src += ion/src/simulator/shared/dummy/telemetry_init.cpp +ion_src += ion/src/shared/telemetry_console.cpp +endif + +$(eval $(call rule_for, \ + INCBIN, \ + ion/src/simulator/linux/assets.s ion/src/simulator/linux/platform_images.h, \ + $(ion_simulator_assets_paths), \ + $$(PYTHON) ion/src/simulator/linux/incbin.py $(ion_simulator_assets) -o $$@, \ + global \ +)) + +$(call object_for,ion/src/simulator/linux/platform_images.cpp): $(BUILD_DIR)/ion/src/simulator/linux/platform_images.h + +# The header is refered to as so make sure it's findable this way +$(call object_for,ion/src/simulator/linux/platform_images.cpp): SFLAGS += -I$(BUILD_DIR)