Compare commits

..

No commits in common. "51d751b69879ee80e4e6185df21b1eb11f1db844" and "df3a988ff6f6193e846de3041344810ab43782fa" have entirely different histories.

4 changed files with 17 additions and 9 deletions

View File

@ -1 +0,0 @@
gcc

View File

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

View File

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

View File

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