I tried making my own makefile but the SDL part won’t work. I don’t know what’s wrong with it. It looks perfectly fine, Im using SDL2, i was doing a test to see if anything was wrong in my code, here is is:
main = src/main.cpp
inc = include/SDL2/SDL.h
all: src/main.o output
output: src/main.o
g++ src/main.o -o output
src/main.o: $(main) $(inc)
g++ -c $(main)
clean:
rm -f *.o
my directory is:
makefile
src
main.cpp
include
SDL.h
other libraries
anything wrong?
I’ve tried checking directories and files and nothing worked. I’ve when through countless posts and i can’t find any solution.
New contributor
bonie real is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.