Build and integrate Splash Image

This commit is contained in:
Jaby 2022-09-29 20:51:18 +02:00 committed by Jaby
parent 883836919a
commit f71da36c08
3 changed files with 8 additions and 5 deletions

1
src/Library/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
src/BootLoader/splash_image_boot.cpp

View File

@ -47,7 +47,7 @@
{ {
"id": "target", "id": "target",
"type": "pickString", "type": "pickString",
"options": ["build", "clean", "rebuild", "splash"], "options": ["build", "clean", "rebuild"],
"default": "build", "default": "build",
"description": "build target", "description": "build target",
} }

View File

@ -3,18 +3,21 @@ JABY_ENGINE_DIR = ../../
ARTIFACT = libJabyEngine ARTIFACT = libJabyEngine
BUILD_DIR = bin BUILD_DIR = bin
SPLASH_IMAGE = src/BootLoader/splash_image_boot.cpp
CCFLAGS += -Iinclude -I../../include CCFLAGS += -Iinclude -I../../include
CCFLAGS += -save-temps=obj CCFLAGS += -save-temps=obj
include ../../lib/Wildcard.mk include ../../lib/Wildcard.mk
SRCS = $(call rwildcard, src, c cpp) SRCS = $(call rwildcard, src, c cpp)
SRCS += src/syscall_printf.asm SRCS += src/syscall_printf.asm
SRCS += $(SPLASH_IMAGE)
include ../../lib/Makefile include ../../lib/Makefile
LIB_DIR = ../../lib/$(CONFIG_NAME) LIB_DIR = ../../lib/$(CONFIG_NAME)
#Linking rule #Linking rule
$(TARGET).a: $(OBJS) $(TARGET).a: $(OBJS) $(SPLASH_IMAGE)
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(AR) rcs $(TARGET).a $(OBJS) $(AR) rcs $(TARGET).a $(OBJS)
@ -22,14 +25,13 @@ $(LIB_DIR)/$(ARTIFACT).a: $(TARGET).a
@mkdir -p $(LIB_DIR) @mkdir -p $(LIB_DIR)
cp $(TARGET).a $(LIB_DIR)/$(ARTIFACT).a 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 $@ jaby_engine_fconv $< simple-tim full16 | cpp_out --name SplashScreen -o $@
#Rules section for default compilation and linking #Rules section for default compilation and linking
splash: ressources/Splash.cpp
all: $(LIB_DIR)/$(ARTIFACT).a all: $(LIB_DIR)/$(ARTIFACT).a
clean: clean:
rm -fr $(SPLASH_IMAGE)
rm -fr $(OUTPUT_DIR) rm -fr $(OUTPUT_DIR)
rm -fr $(LIB_DIR)/$(ARTIFACT).a rm -fr $(LIB_DIR)/$(ARTIFACT).a