59 lines
1.8 KiB
Makefile
59 lines
1.8 KiB
Makefile
JABY_ENGINE_DIR = ../../
|
|
|
|
ARTIFACT = libJabyEngine_$(TV_FORMAT)
|
|
BUILD_DIR = bin
|
|
|
|
SPLASH_IMAGE = src/BootLoader/splash_image_pal_boot.hpp
|
|
SPLASH_IMAGE_NTSC = src/BootLoader/splash_image_ntsc_boot.hpp
|
|
|
|
CCFLAGS += -Iinclude -I../../include
|
|
CCFLAGS += -save-temps=obj
|
|
|
|
include ../../lib/Wildcard.mk
|
|
SRCS = $(call rwildcard, src, c cpp)
|
|
SRCS += src/syscall_printf.asm
|
|
|
|
include ../../lib/Makefile
|
|
LIB_DIR = ../../lib/$(CONFIG_NAME)
|
|
|
|
MAIN_BOOT_OBJ = $(filter %/main_boot.o,$(OBJS))
|
|
OVERLAY_BOOT_OBJ = $(filter %/overlay_boot.o,$(OBJS))
|
|
MAIN_LIB_OBJS = $(filter-out $(MAIN_BOOT_OBJ) $(OVERLAY_BOOT_OBJ),$(OBJS))
|
|
|
|
#$(info $$var is [${MAIN_BOOT_OBJ}])
|
|
#$(info $$var2 is [${MAIN_LIB_OBJS}])
|
|
|
|
#Linking rule
|
|
$(TARGET).a: $(MAIN_LIB_OBJS) $(SPLASH_IMAGE)
|
|
@mkdir -p $(dir $@)
|
|
$(AR) rcs $(TARGET).a $(MAIN_LIB_OBJS)
|
|
|
|
#Copy rules
|
|
$(LIB_DIR)/$(ARTIFACT).a: $(TARGET).a
|
|
@mkdir -p $(LIB_DIR)
|
|
cp $(TARGET).a $(LIB_DIR)/$(ARTIFACT).a
|
|
|
|
$(LIB_DIR)/$(notdir $(MAIN_BOOT_OBJ)): $(MAIN_BOOT_OBJ)
|
|
@mkdir -p $(LIB_DIR)
|
|
cp $(MAIN_BOOT_OBJ) $(LIB_DIR)/$(notdir $(MAIN_BOOT_OBJ))
|
|
|
|
$(LIB_DIR)/$(notdir $(OVERLAY_BOOT_OBJ)): $(OVERLAY_BOOT_OBJ)
|
|
@mkdir -p $(LIB_DIR)
|
|
cp $(OVERLAY_BOOT_OBJ) $(LIB_DIR)/$(notdir $(OVERLAY_BOOT_OBJ))
|
|
|
|
# Improve later
|
|
# rule to make the boot image
|
|
$(SPLASH_IMAGE): ressources/Splash.png
|
|
jaby_engine_fconv --lz4 $< simple-tim full16 | cpp_out --name SplashScreen -o $@
|
|
|
|
$(SPLASH_IMAGE_NTSC): ressources/Splash_ntsc.png
|
|
jaby_engine_fconv --lz4 $< simple-tim full16 | cpp_out --name SplashScreen -o $@
|
|
|
|
#Rules section for default compilation and linking
|
|
all: $(SPLASH_IMAGE) $(SPLASH_IMAGE_NTSC) $(LIB_DIR)/$(ARTIFACT).a $(LIB_DIR)/$(notdir $(MAIN_BOOT_OBJ)) $(LIB_DIR)/$(notdir $(OVERLAY_BOOT_OBJ))
|
|
|
|
clean:
|
|
rm -fr $(SPLASH_IMAGE)
|
|
rm -fr $(SPLASH_IMAGE_NTSC)
|
|
rm -fr $(OUTPUT_DIR)
|
|
rm -fr $(LIB_DIR)/$(ARTIFACT).a
|