
CC = g++
CFLAGS = -g -O2 $(shell sdl-config --cflags)
LDFLAGS = $(shell sdl-config --libs) -lSDL_image -lSDL_ttf -lSDL_mixer

SOURCES = keyboard barrier mainmenu  \
          mainmenubutton introscreen \
          gamehandler gameover music \
          bullet playership credits  \
          helpscreen main

OBJECT_FILES = $(addsuffix .o,$(addprefix obj/,$(SOURCES) ) )

gulfofdeath: $(OBJECT_FILES)
	$(CC) -o $@ $^ $(LDFLAGS)

obj/%.o: src/%.cpp src/%.h Makefile
	$(CC) -c -o $@ $< $(CFLAGS)

clean:
	-rm -f obj/*.o src/*~ gulfofdeath
