aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 8663715f84aa9dab20cc3daf7b1ddc2395bb79ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
CC      = /usr/bin/g++
CFLAGS  = -Wall -g -std=c++11
LDFLAGS = -lm -lcurses
OUTPUT = Engine
BUILDDIR = build

OBJ = main.o cObject.o cObjectHandler.o cRender.o cInput.o

prog: $(OBJ)
	mkdir -p $(BUILDDIR)
	$(CC) $(CFLAGS) -o $(BUILDDIR)/$(OUTPUT) $(OBJ) $(LDFLAGS)

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

all:
	make clean
	make

.PHONY: clean

clean:
	rm -f $(BUILDDIR)/$(OUTPUT) *.o
	rmdir $(BUILDDIR)