Compare commits

...

2 Commits

Author SHA1 Message Date
Ulysse Cura 51d751b698 Fixing some Makefile problems. 2026-07-17 17:57:34 +02:00
Ulysse Cura e15a26428f Going to ccls. 2026-07-17 17:57:17 +02:00
4 changed files with 9 additions and 17 deletions

1
GCC_Project/.ccls Normal file
View File

@ -0,0 +1 @@
gcc

View File

@ -1 +1,2 @@
build
.ccls-cache
build

View File

@ -1,10 +0,0 @@
{
"configurations": [
{
"name": "Default",
"includePath": [
]
}
],
"version": 1
}

View File

@ -30,9 +30,9 @@ Q := @
endif
# Colors
GREEN := \033[0;32m
YELLOW := \033[1;33m
RESET := \033[0m
GREEN := \033[32m
YELLOW := \033[33m
RESET := \033[m
# Current file nb to process
CURRENT_FILE := 0
@ -46,14 +46,14 @@ build_dir:
# Link target
$(OUTPUT): $(OBJECTS)
@echo "[100%] $(YELLOW)Linking $(OUTPUT)$(RESET)"
@echo -e "[100%] $(YELLOW)Linking $(OUTPUT)$(RESET)"
$(Q)$(CC) $(LDFLAGS) -o $@ $(OBJECTS)
# Build .o files from .c
$(BUILD_DIR)/%.o: %.c
$(eval CURRENT_FILE := $(shell echo $$(($(CURRENT_FILE)+1))))
$(eval PERCENTAGE := $(shell echo $$(($(CURRENT_FILE)*100/$(TOTAL_FILES)))))
@echo "[$(PERCENTAGE)%] $(GREEN)Building C object $@$(RESET)"
@echo -e "[$(PERCENTAGE)%] $(GREEN)Building C object $@$(RESET)"
$(Q)$(CC) $(CCFLAGS) $(INCLUDE_DIRS:%=-I%) -MMD -MP -c $< -o $@
# Source files dependencies
@ -73,5 +73,5 @@ clean:
# Run executable
.PHONY: run
run:
run: all
$(Q)./$(OUTPUT)