Modified makefiles and add AST module

This commit is contained in:
Maix0 2024-05-25 16:36:35 +02:00
parent a614195a2e
commit 635e9cfe95
20 changed files with 165 additions and 382 deletions

View file

@ -6,7 +6,7 @@
# By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/11/03 13:20:01 by maiboyer #+# #+# #
# Updated: 2024/05/16 16:06:36 by maiboyer ### ########.fr #
# Updated: 2024/05/25 16:28:54 by maiboyer ### ########.fr #
# #
# **************************************************************************** #
@ -32,8 +32,8 @@ SUBJECT_URL =
SRC_FILES = $(shell cat src.list)
SRC = $(addsuffix .c,$(addprefix $(SRC_DIR)/,$(SRC_FILES)))
OBJ = $(addsuffix .o,$(addprefix $(BUILD_DIR)/,$(SRC_FILES)))
DEPS = $(addsuffix .d,$(addprefix $(BUILD_DIR)/,$(SRC_FILES)))
OBJ = $(addsuffix .o,$(addprefix $(BUILD_DIR)/aq/,$(SRC_FILES)))
DEPS = $(addsuffix .d,$(addprefix $(BUILD_DIR)/aq/,$(SRC_FILES)))
LIBS = $(addprefix $(LIBS_DIR)/,$(LIBS_NAME))
INCLUDES = $(addprefix -I,$(foreach P,$(INCLUDE_DIR) $(LIBS) $(addsuffix /include,$(LIBS)) vendor $(addsuffix /vendor,$(LIBS)),$(realpath $(P))))
@ -57,12 +57,12 @@ $(TARGET): $(OBJ)
@echo -e '$(COL_GRAY) Linking\t$(COL_GREEN)$(TARGET)$(COL_RESET)'
@ar rcs $(BUILD_DIR)/$(NAME) $(OBJ)
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c
$(BUILD_DIR)/aq/%.o: $(SRC_DIR)/%.c
@mkdir -p $(dir $@)
@echo -e '$(COL_GRAY) Building\t$(COL_GREEN)$<$(COL_RESET)'
@$(CC) $(CFLAGS) $(WERROR) $(INCLUDES) -c $< -o $@
$(BUILD_DIR)/%.o: $(GENERIC_DIR)/%.c
$(BUILD_DIR)/aq/%.o: $(GENERIC_DIR)/%.c
@mkdir -p $(dir $@)
@echo -e '$(COL_GRAY) Building\t$(COL_GREEN)$<$(COL_RESET)'
@$(CC) $(CFLAGS) $(WERROR) $(INCLUDES) -c $< -o $@