No codegen doubly-linked list (#8)

Reviewed-on: #8
Co-authored-by: Abdelrahman <said.abdelrahman89@gmail.com>
Co-committed-by: Abdelrahman <said.abdelrahman89@gmail.com>
This commit was merged in pull request #8.
This commit is contained in:
2025-12-17 03:53:13 +00:00
committed by Abdelrahman Said
parent 4b95a681d4
commit 4ea30f0762
43 changed files with 551 additions and 8249 deletions

View File

@@ -1,4 +1,4 @@
.PHONY: help full base os prng testing uuid 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 install build-lib
# External variables
CC = clang
@@ -7,7 +7,6 @@ AR = ar
BUILD_TYPE = Debug
BUILD_DIR = libwapp-build/$(PLATFORM)-$(BUILD_TYPE)
INSTALL_PREFIX = dist
CODEGEN_INPUT = ""
RUNTIME_ASSERT = true
# Internal variables
@@ -95,7 +94,7 @@ ifeq ($(KERNEL), Darwin)
ECHO_E = echo
endif
all: clean builddir codegen run-c-test full run-cc-test
all: clean builddir run-c-test full run-cc-test
help:
@$(ECHO_E) "$(BOLD)$(BLUE)Available build variables:$(RESET)"
@@ -105,7 +104,6 @@ help:
@$(ECHO_E) " $(GREEN)BUILD_TYPE$(RESET) Build type $(MAGENTA)[Debug | RelWithDebInfo | Release] $(YELLOW)(Default: Debug)$(RESET)."
@$(ECHO_E) " $(GREEN)BUILD_DIR$(RESET) Directory where build files will be written."
@$(ECHO_E) " $(GREEN)INSTALL_PREFIX$(RESET) Prefix where library and include files will be installed."
@$(ECHO_E) " $(GREEN)CODEGEN_INPUT$(RESET) Input file for code generation (See $(CYAN)codegen_custom_data_example.json$(RESET) for an example)."
@$(ECHO_E) " $(GREEN)RUNTIME_ASSERT$(RESET) Whether runtime asserts are enabled $(MAGENTA)[true | false] $(YELLOW)(Default: true)$(RESET)."
@$(ECHO_E) " $(GREEN)$(RESET) $(BOLD)$(BG_RED)DISCLAIMER:$(RESET) Using this flag is not recommended as it disables safety checks"
@$(ECHO_E) " $(GREEN)$(RESET) potentially leading to Undefined Behaviour."
@@ -167,10 +165,7 @@ run-cc-test: build-cc-test
@export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:"$(BUILD_DIR)" && "$(TEST_CXX_OUT)"
@rm "$(TEST_CXX_OUT)"
codegen:
python3 -m codegen -f $(CODEGEN_INPUT)
install: codegen build-lib
install: build-lib
@mkdir -p "$(LIB_INSTALL)"
@cp -v "$(LIB_OUT)" "$(LIB_INSTALL)"
@mkdir -p "$(INCLUDE_INSTALL)"
@@ -180,6 +175,3 @@ build-lib: builddir
$(CC) -c $(CSTD) $(CFLAGS) $(BUILD_FLAGS) $(LIBFLAGS) $(LIB_SRC) -o "$(OBJ_OUT)"
$(AR) r "$(LIB_OUT)" "$(OBJ_OUT)"
@rm "$(OBJ_OUT)"
ccodegen:
$(CC) $(CSTD) $(CFLAGS) $(BUILD_FLAGS) $(LIBFLAGS) -Isrc/os src/os/wapp_os.c ccodegen/*.c -o ccgen