Untarred the source code and compiled it on a folder on my desktop: https://www.libsdl.org/release/SDL2-2.0.5.tar.gz
Makefile:
OBJS specifies which files to compile as part of the project
OBJS = hello.cpp
#CC specifies which compiler we're using
CC = g++
#COMPILER_FLAGS specifies the additional compilation options we're using
# -w suppresses all warnings
COMPILER_FLAGS = -w -I/home/me/Desktop/SDL/SDL2-2.0.5/include
#LINKER_FLAGS specifies the libraries we're linking against
LINKER_FLAGS = -lSDL2main -lSDL2
#OBJ_NAME specifies the name of our exectuable
OBJ_NAME = hello
#This is the target that compiles our executable
all : $(OBJS)
$(CC) $(OBJS) $(COMPILER_FLAGS) $(LINKER_FLAGS) -o $(OBJ_NAME)
I’m guessing I need to tell the compiler where to look for the libraries but I have no idea where it could be. There’s no lib folder in the SDL2-2.0.5 folder?