Restructure the library layers

This commit is contained in:
2025-12-16 17:36:50 +00:00
parent c0d901d7e9
commit 4b95a681d4
55 changed files with 161 additions and 161 deletions

View File

@@ -1,4 +1,4 @@
.PHONY: help full prng testing uuid core primitives all clean builddir build-test run-test codegen install build-lib ccodegen
.PHONY: help full base os prng testing uuid all clean builddir build-test run-test codegen install build-lib ccodegen
# External variables
CC = clang
@@ -113,38 +113,38 @@ help:
@$(ECHO_E) "$(BOLD)$(BLUE)Available targets:$(RESET)"
@$(ECHO_E) " $(GREEN)make$(RESET) Build, install and test the full wapp library."
@$(ECHO_E) " $(GREEN)make full$(RESET) Build and install the full wapp library."
@$(ECHO_E) " $(GREEN)make core$(RESET) Build and install only the $(CYAN)core$(RESET) component of the wapp library with all its dependencies."
@$(ECHO_E) " $(GREEN)make base$(RESET) Build and install only the $(CYAN)base$(RESET) component of the wapp library with all its dependencies."
@$(ECHO_E) " $(GREEN)make os$(RESET) Build and install only the $(CYAN)os$(RESET) component of the wapp library with all its dependencies."
@$(ECHO_E) " $(GREEN)make prng$(RESET) Build and install only the $(CYAN)prng$(RESET) component of the wapp library with all its dependencies."
@$(ECHO_E) " $(GREEN)make uuid$(RESET) Build and install only the $(CYAN)uuid$(RESET) component of the wapp library with all its dependencies."
@$(ECHO_E) " $(GREEN)make testing$(RESET) Build and install only the $(CYAN)testing$(RESET) component of the wapp library with all its dependencies."
@$(ECHO_E) " $(GREEN)make primitives$(RESET) Build and install only the $(CYAN)primitives$(RESET) component of the wapp library with all its dependencies."
@$(ECHO_E) " $(GREEN)make clean$(RESET) Clean the build directory."
@$(ECHO_E) " $(GREEN)make help$(RESET) Print this help message and exit."
full: LIB_SRC = src/wapp.c
full: INCLUDES = common core primitives prng testing uuid
full: INCLUDES = common os base prng testing uuid
full: install
base: LIB_SRC = src/base/wapp_base.c
base: INCLUDES = common base
base: install
os: LIB_SRC = src/os/wapp_os.c
os: INCLUDES = common os base
os: install
prng: LIB_SRC = src/prng/wapp_prng.c
prng: INCLUDES = common prng
prng: install
testing: LIB_SRC = src/testing/wapp_testing.c
testing: INCLUDES = common core testing
testing: INCLUDES = common os testing
testing: install
uuid: LIB_SRC = src/uuid/wapp_uuid.c
uuid: INCLUDES = common primitives prng
uuid: INCLUDES = common base prng
uuid: install
core: LIB_SRC = src/core/wapp_core.c
core: INCLUDES = common core primitives
core: install
primitives: LIB_SRC = src/primitives/wapp_primitives.c
primitives: INCLUDES = common primitives
primitives: install
clean:
@rm -rf "$(BUILD_DIR)"
@@ -182,4 +182,4 @@ build-lib: builddir
@rm "$(OBJ_OUT)"
ccodegen:
$(CC) $(CSTD) $(CFLAGS) $(BUILD_FLAGS) $(LIBFLAGS) -Isrc/core src/core/wapp_core.c ccodegen/*.c -o ccgen
$(CC) $(CSTD) $(CFLAGS) $(BUILD_FLAGS) $(LIBFLAGS) -Isrc/os src/os/wapp_os.c ccodegen/*.c -o ccgen