Skip to content

Commit c304b0b

Browse files
arrecispsxdev
authored andcommitted
Fix VSCode Makefile to support multiple .c files (raysan5#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.
1 parent 33d48c3 commit c304b0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/VSCode/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ SRC_DIR = src
352352
OBJ_DIR = obj
353353

354354
# Define all object files from source files
355-
SRC = $(call rwildcard, *.c, *.h)
355+
SRC = $(call rwildcard, ./, *.c, *.h)
356356
#OBJS = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
357-
OBJS ?= main.c
357+
OBJS = $(patsubst %.c,%.o,$(filter %.c,$(SRC)))
358358

359359
# For Android platform we call a custom Makefile.Android
360360
ifeq ($(PLATFORM),PLATFORM_ANDROID)

0 commit comments

Comments
 (0)