Change the second line to:
g++ -o program main.o render.o screenwriter.o -lSDL ^^^^^^^
Otherwise, your output will be main.o, and you will lose it at the input.
Even better than manual service of martyrdom, special macros should be used:
$(CXX) -o $@ $+ -lSDL
So, even when you expand your program, you will no longer have to edit this command.
source share