From 7a9d27862f2e65a07cf1a2099603f86357cc14ec Mon Sep 17 00:00:00 2001 From: Jaby Date: Thu, 23 Nov 2023 21:27:04 -0500 Subject: [PATCH] Create FontWriter Support Lib project --- Support/include/FontWriter/FontWriter.hpp | 3 + Support/src/FontWriter/Makefile | 36 ++++++ Support/src/FontWriter/src/FontWriter.cpp | 6 + Support/src/Makefile | 6 + Support/src/SupportLibrary.code-workspace | 72 ++++++++++++ src/Library/Library.code-workspace | 130 +++++++++++----------- 6 files changed, 188 insertions(+), 65 deletions(-) create mode 100644 Support/include/FontWriter/FontWriter.hpp create mode 100644 Support/src/FontWriter/Makefile create mode 100644 Support/src/FontWriter/src/FontWriter.cpp create mode 100644 Support/src/Makefile create mode 100644 Support/src/SupportLibrary.code-workspace diff --git a/Support/include/FontWriter/FontWriter.hpp b/Support/include/FontWriter/FontWriter.hpp new file mode 100644 index 00000000..be1cdbc1 --- /dev/null +++ b/Support/include/FontWriter/FontWriter.hpp @@ -0,0 +1,3 @@ +#pragma once + +void test(); \ No newline at end of file diff --git a/Support/src/FontWriter/Makefile b/Support/src/FontWriter/Makefile new file mode 100644 index 00000000..2ac085be --- /dev/null +++ b/Support/src/FontWriter/Makefile @@ -0,0 +1,36 @@ +JABY_ENGINE_DIR = ../../.. +include $(JABY_ENGINE_DIR)/mkfile/RebuildTarget.mk + +ARTIFACT = libFontWriter +BUILD_DIR = bin + +CCFLAGS += -I../../include -I$(JABY_ENGINE_DIR)/include +CCFLAGS += -save-temps=obj + +include $(JABY_ENGINE_DIR)/mkfile/Wildcard.mk +SRCS = $(call rwildcard, src, c cpp s) + +include $(JABY_ENGINE_DIR)/mkfile/Makefile +LIB_DIR = ../../lib/$(CONFIG_NAME) + +LIB_OBJS = $(filter-out $(MAIN_BOOT_OBJ) $(OVERLAY_BOOT_OBJ),$(OBJS)) + +#$(info $$var is [${MAIN_BOOT_OBJ}]) +#$(info $$var2 is [${LIB_OBJS}]) + +#Linking rule +$(TARGET).a: $(LIB_OBJS) + @mkdir -p $(dir $@) + $(AR) rcs $(TARGET).a $(LIB_OBJS) + +#Copy rules +$(LIB_DIR)/$(ARTIFACT).a: $(TARGET).a + @mkdir -p $(LIB_DIR) + cp $(TARGET).a $(LIB_DIR)/$(ARTIFACT).a + +#Rules section for default compilation and linking +all: $(LIB_DIR)/$(ARTIFACT).a + +clean: + rm -fr $(OUTPUT_DIR) + rm -fr $(LIB_DIR)/$(ARTIFACT).a \ No newline at end of file diff --git a/Support/src/FontWriter/src/FontWriter.cpp b/Support/src/FontWriter/src/FontWriter.cpp new file mode 100644 index 00000000..b9dc5df3 --- /dev/null +++ b/Support/src/FontWriter/src/FontWriter.cpp @@ -0,0 +1,6 @@ +#include +#include + +void test() { + printf("Hello Planschi c:\n"); +} diff --git a/Support/src/Makefile b/Support/src/Makefile new file mode 100644 index 00000000..01434bd5 --- /dev/null +++ b/Support/src/Makefile @@ -0,0 +1,6 @@ +FontWriter: always + $(MAKE) -C FontWriter + +all: FontWriter + +always: ; \ No newline at end of file diff --git a/Support/src/SupportLibrary.code-workspace b/Support/src/SupportLibrary.code-workspace new file mode 100644 index 00000000..f4ea81fd --- /dev/null +++ b/Support/src/SupportLibrary.code-workspace @@ -0,0 +1,72 @@ +{ + "folders": [ + { + "name": "Support", + "path": "." + }, + { + "name": "Support Include", + "path": "../include" + }, + { + "name": "Support Library", + "path": "../lib" + }, + ], + "tasks": { + "version": "2.0.0", + "tasks": [ + { + "label": "make", + "type": "shell", + "windows": { + "command": "wsl make ${input:target} BUILD_PROFILE=${input:build cfg}", + }, + "linux": { + "command": "make ${input:target} BUILD_PROFILE=${input:build cfg}", + }, + "group": "build" + } + ], + "inputs": [ + { + "id": "build cfg", + "type": "pickString", + "options": ["debug", "release"], + "default": "release", + "description": "build configuration" + }, + { + "id": "target", + "type": "pickString", + "options": ["all", "clean", "rebuild"], + "default": "all", + "description": "build target", + } + ] + }, + "settings": { + "cmake.configureOnOpen": false, + "C_Cpp.default.includePath": [ + "../include", + "../../include" + ], + "C_Cpp.default.compilerPath": "", + "C_Cpp.default.cStandard": "c17", + "C_Cpp.default.cppStandard": "c++20", + "C_Cpp.default.intelliSenseMode": "linux-gcc-x86", + "C_Cpp.default.compilerArgs": [ + ], + "C_Cpp.default.defines": [ + "JABYENGINE_PAL", + "__friends=public" + ], + "files.exclude": { + "**/*.o": true, + "**/*.dep": true + }, + "files.associations": { + "stdio.h": "c" + } + } +} \ No newline at end of file diff --git a/src/Library/Library.code-workspace b/src/Library/Library.code-workspace index b0557255..24cb6ef6 100644 --- a/src/Library/Library.code-workspace +++ b/src/Library/Library.code-workspace @@ -1,72 +1,72 @@ { - "folders": [ - { - "name": "JabyEngine", - "path": ".", - }, - { - "name": "Include", - "path": "..\\..\\include" - }, - { - "name": "Root", - "path": "..\\.." - } - ], - "tasks": { - "version": "2.0.0", - "tasks": [ - { - "label": "make", - "type": "shell", - "windows": { - "command": "wsl make ${input:target} BUILD_PROFILE=${input:build cfg}", - }, - "linux": { - "command": "make ${input:target} BUILD_PROFILE=${input:build cfg}", - }, - "group": "build" - } - ], - "inputs": [ - { - "id": "build cfg", - "type": "pickString", - "options": ["debug", "release"], - "default": "release", - "description": "build configuration" - }, - { - "id": "target", - "type": "pickString", - "options": ["all", "clean", "rebuild"], - "default": "all", - "description": "build target", - } - ] - }, - "settings": { - "cmake.configureOnOpen": false, - "C_Cpp.default.includePath": [ - "include", - "../../include" + "folders": [ + { + "name": "JabyEngine", + "path": ".", + }, + { + "name": "Include", + "path": "..\\..\\include" + }, + { + "name": "Root", + "path": "..\\.." + } + ], + "tasks": { + "version": "2.0.0", + "tasks": [ + { + "label": "make", + "type": "shell", + "windows": { + "command": "wsl make ${input:target} BUILD_PROFILE=${input:build cfg}", + }, + "linux": { + "command": "make ${input:target} BUILD_PROFILE=${input:build cfg}", + }, + "group": "build" + } + ], + "inputs": [ + { + "id": "build cfg", + "type": "pickString", + "options": ["debug", "release"], + "default": "release", + "description": "build configuration" + }, + { + "id": "target", + "type": "pickString", + "options": ["all", "clean", "rebuild"], + "default": "all", + "description": "build target", + } + ] + }, + "settings": { + "cmake.configureOnOpen": false, + "C_Cpp.default.includePath": [ + "include", + "../../include" ], - "C_Cpp.default.compilerPath": "", - "C_Cpp.default.cStandard": "c17", + "C_Cpp.default.compilerPath": "", + "C_Cpp.default.cStandard": "c17", "C_Cpp.default.cppStandard": "c++20", - "C_Cpp.default.intelliSenseMode": "linux-gcc-x86", + "C_Cpp.default.intelliSenseMode": "linux-gcc-x86", "C_Cpp.default.compilerArgs": [ ], - "C_Cpp.default.defines": [ - "JABYENGINE_PAL", - "__friends=public" + "C_Cpp.default.defines": [ + "JABYENGINE_PAL", + "__friends=public" ], - "files.exclude": { - "**/*.o": true, - "**/*.dep": true - }, - "files.associations": { - "stdio.h": "c" - } - } + "files.exclude": { + "**/*.o": true, + "**/*.dep": true + }, + "files.associations": { + "stdio.h": "c" + } + } } \ No newline at end of file