RM = rm -f SRCS = main.cpp GUI.cpp util.cpp engine.cpp enginecore.cpp OBJS = $(subst .cpp,.o,$(SRCS)) HEADS = $(subst .cpp,.h,$(SRCS)) CFLAGS = -Wall -ggdb -O2 -c -Wno-sign-compare LFLAGS = -Wall -ggdb -O2 -lSDL -lSDL_gfx -lSDL_image -lSDL_ttf -lSDL_mixer -Wno-sign-compare Game: $(OBJS) g++ $(OBJS) $(LFLAGS) -o Game main.o: main.cpp $(HEADS) g++ main.cpp $(CFLAGS) -o main.o GUI.o: GUI.cpp GUI.h util.h g++ GUI.cpp $(CFLAGS) -o GUI.o util.o: util.cpp util.h g++ util.cpp $(CFLAGS) -o util.o engine.o: engine.cpp GUI.h util.h engine.h enginecore.h g++ engine.cpp $(CFLAGS) -o engine.o enginecore.o: enginecore.cpp util.h enginecore.h g++ enginecore.cpp $(CFLAGS) -o enginecore.o clean: $(RM) $(OBJS)