Make produces segmentation fault in common.mk

,

Hey,

With a similar setup to the "Array" C example, when using make, I am getting a segmentation fault in /home/<user>/Apps/playdate-sdk/C_API/buildsupport/common.mk:115: all. But the Array example does compile, not my code. So I know it's a problem with my project, but... I don't know where.

For reference, here's my makefile :

HEAP_SIZE      = 8388208
STACK_SIZE     = 61800

PRODUCT = Dronin.pdx

# Locate the SDK
SDK = ${PLAYDATE_SDK_PATH}
ifeq ($(SDK),)
SDK = $(shell egrep '^\s*SDKRoot' ~/.Playdate/config | head -n 1 | cut -c9-)
endif

ifeq ($(SDK),)
$(error SDK path not found; set ENV value PLAYDATE_SDK_PATH)
endif

VPATH += src

# List C source files here
SRC = src/main.c src/geometry.c src/render.c

# List all user directories here
UINCDIR = 

# List user asm files
UASRC = 

# List all user C define here, like -D_DEBUG=1
UDEFS = 

# Define ASM defines here
UADEFS = 

# List the user directory to look for the libraries here
ULIBDIR =

# List all user libraries here
ULIBS =

include $(SDK)/C_API/buildsupport/common.mk    

And here's the structure of my project :

Sorry if this is a basic make error, it's my first time using it. To be honest I don't really understand how the whole C + lua workflow even works, really. Like, does make compile the lua code as well ? Or do I have to do it separately ? How are the two assembled ? Do the C and lua code run in parallel ? The documentation was not very helpful on these points.

Thanks if you have any insight !

Alright, I got it. I used Whitebrim/VSCode-PlaydateTemplate as a base for the project before I implemented C, and this template uses source as the Lua directory instead of Source which is what the C SDK expects.

I am still confused about the C+lua workflow though.