Skip to content

Commit

Permalink
Fix VSCode Makefile to support multiple .c files (raysan5#4391)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
arrecis authored and psxdev committed Nov 18, 2024
1 parent 33d48c3 commit c304b0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/VSCode/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c304b0b

Please sign in to comment.