NAME = play

DEBUG =

-include defs.mk

CC = g++ -Wall

CCFLAGS = -std=c++11 -I.

ifdef DEBUG 
  CCFLAGS += -g -O0
else
  CCFLAGS += -Ofast
endif

LIBS =

OBJS =

include math/GNUmakefile
include graphics/GNUmakefile
include sound/GNUmakefile
include logic/GNUmakefile
include $(NAME)/GNUmakefile

OBJS += \
  $(NAME)/$(NAME).o\
  main.o

EXE = $(NAME)/$(NAME)

.SILENT:

all: $(EXE)

%.o: %.cpp
	$(CC) $(CCFLAGS) -c $< -o $@

$(EXE): $(OBJS)
	$(CC) $(OBJS) $(LIBS) -o $@

run: all
	$(EXE)

clean:
	rm -f $(OBJS) $(EXE)

-include rules.mk
