From c87272340914abd1862aee648b0c4010e8e34940 Mon Sep 17 00:00:00 2001 From: Jaby Date: Thu, 29 Sep 2022 20:51:18 +0200 Subject: [PATCH] Build and integrate Splash Image --- src/Library/.gitignore | 1 + src/Library/Library.code-workspace | 2 +- src/Library/Makefile | 10 ++++++---- 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 src/Library/.gitignore diff --git a/src/Library/.gitignore b/src/Library/.gitignore new file mode 100644 index 00000000..616d4b44 --- /dev/null +++ b/src/Library/.gitignore @@ -0,0 +1 @@ +src/BootLoader/splash_image_boot.cpp \ No newline at end of file diff --git a/src/Library/Library.code-workspace b/src/Library/Library.code-workspace index c9bcaf07..94b6f8e3 100644 --- a/src/Library/Library.code-workspace +++ b/src/Library/Library.code-workspace @@ -47,7 +47,7 @@ { "id": "target", "type": "pickString", - "options": ["build", "clean", "rebuild", "splash"], + "options": ["build", "clean", "rebuild"], "default": "build", "description": "build target", } diff --git a/src/Library/Makefile b/src/Library/Makefile index a711d4f9..c60cd6b6 100644 --- a/src/Library/Makefile +++ b/src/Library/Makefile @@ -3,18 +3,21 @@ JABY_ENGINE_DIR = ../../ ARTIFACT = libJabyEngine BUILD_DIR = bin +SPLASH_IMAGE = src/BootLoader/splash_image_boot.cpp + CCFLAGS += -Iinclude -I../../include CCFLAGS += -save-temps=obj include ../../lib/Wildcard.mk SRCS = $(call rwildcard, src, c cpp) SRCS += src/syscall_printf.asm +SRCS += $(SPLASH_IMAGE) include ../../lib/Makefile LIB_DIR = ../../lib/$(CONFIG_NAME) #Linking rule -$(TARGET).a: $(OBJS) +$(TARGET).a: $(OBJS) $(SPLASH_IMAGE) @mkdir -p $(dir $@) $(AR) rcs $(TARGET).a $(OBJS) @@ -22,14 +25,13 @@ $(LIB_DIR)/$(ARTIFACT).a: $(TARGET).a @mkdir -p $(LIB_DIR) cp $(TARGET).a $(LIB_DIR)/$(ARTIFACT).a -ressources/Splash.cpp: ressources/Splash.png +$(SPLASH_IMAGE): ressources/Splash.png jaby_engine_fconv $< simple-tim full16 | cpp_out --name SplashScreen -o $@ #Rules section for default compilation and linking -splash: ressources/Splash.cpp - all: $(LIB_DIR)/$(ARTIFACT).a clean: + rm -fr $(SPLASH_IMAGE) rm -fr $(OUTPUT_DIR) rm -fr $(LIB_DIR)/$(ARTIFACT).a \ No newline at end of file