diff --git a/GCC_Project/.vscode/c_cpp_properties.json b/GCC_Project/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..828fd27 --- /dev/null +++ b/GCC_Project/.vscode/c_cpp_properties.json @@ -0,0 +1,10 @@ +{ + "configurations": [ + { + "name": "Default", + "includePath": [ + ] + } + ], + "version": 1 +} \ No newline at end of file diff --git a/GCC_Project/.vscode/tasks.json b/GCC_Project/.vscode/tasks.json index 8021ddb..dc4aebd 100644 --- a/GCC_Project/.vscode/tasks.json +++ b/GCC_Project/.vscode/tasks.json @@ -6,9 +6,9 @@ "detail": "Build project", "type": "shell", "command": "make", - //"args": [ - // "-j$(nproc)" - //], + "args": [ + "-j$(nproc)" + ], "group": "build", "presentation": { "echo": true, diff --git a/GCC_Project/Makefile b/GCC_Project/Makefile index 2219a95..208deca 100644 --- a/GCC_Project/Makefile +++ b/GCC_Project/Makefile @@ -9,11 +9,13 @@ SOURCES := \ OUTPUT := GCC_Project # Compiler and flags -CXX = ccache gcc -CXXFLAGS = -Wall -Wextra -std=c17 -g -INCLUDE_DIRS = +CC = gcc +CCFLAGS = -Wall -Wextra -std=c17 LDFLAGS = +# Include directories +INCLUDE_DIRS = + # Change output location OUTPUT := $(BUILD_DIR)/$(OUTPUT) @@ -45,14 +47,14 @@ build_dir: # Link target $(OUTPUT): $(OBJECTS) @echo "[100%] $(YELLOW)Linking $(OUTPUT)$(RESET)" - $(Q)$(CXX) $(LDFLAGS) -o $@ $(OBJECTS) + $(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)" - $(Q)$(CXX) $(CXXFLAGS) $(INCLUDE_DIRS:%=-I%) -MMD -MP -c $< -o $@ + $(Q)$(CC) $(CCFLAGS) $(INCLUDE_DIRS:%=-I%) -MMD -MP -c $< -o $@ # Source files dependencies -include $(OBJECTS:.o=.d) @@ -68,7 +70,6 @@ end: $(OUTPUT) .PHONY: clean clean: $(Q)rm -rf $(BUILD_DIR) - $(Q)rm -rf $(dir $(FXCONV_CONVERTERS))/__pycache__ # Run executable .PHONY: run