From b201b74c3fcc4d146b67dd7f9bbd61a3f490e28e Mon Sep 17 00:00:00 2001 From: Alan Arrecis Date: Thu, 17 Oct 2024 17:08:07 -0600 Subject: [PATCH] Fix VSCode Makefile to support multiple .c files (#4391) Updated the VSCode Makefile to allow compilation of multiple .c files instead of just one (main.c). - Replaced `SRC` and `OBJS` definitions to dynamically include all .c and .h files in the project. - This change enables automatic handling of any number of source files specifically in the VSCode setup. --- projects/VSCode/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/VSCode/Makefile b/projects/VSCode/Makefile index 2f43c9ea..86febfba 100644 --- a/projects/VSCode/Makefile +++ b/projects/VSCode/Makefile @@ -352,9 +352,9 @@ SRC_DIR = src OBJ_DIR = obj # Define all object files from source files -SRC = $(call rwildcard, *.c, *.h) +SRC = $(call rwildcard, ./, *.c, *.h) #OBJS = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o) -OBJS ?= main.c +OBJS = $(patsubst %.c,%.o,$(filter %.c,$(SRC))) # For Android platform we call a custom Makefile.Android ifeq ($(PLATFORM),PLATFORM_ANDROID)