aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index b4d3abb..8663715 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,14 @@
CC = /usr/bin/g++
CFLAGS = -Wall -g -std=c++11
LDFLAGS = -lm -lcurses
-OUTPUT = build/Engine
+OUTPUT = Engine
+BUILDDIR = build
OBJ = main.o cObject.o cObjectHandler.o cRender.o cInput.o
prog: $(OBJ)
- mkdir build
- $(CC) $(CFLAGS) -o $(OUTPUT) $(OBJ) $(LDFLAGS)
+ mkdir -p $(BUILDDIR)
+ $(CC) $(CFLAGS) -o $(BUILDDIR)/$(OUTPUT) $(OBJ) $(LDFLAGS)
%.o: %.cpp
$(CC) $(CFLAGS) -c $<
@@ -19,5 +20,5 @@ all:
.PHONY: clean
clean:
- rm -f $(OUTPUT) *.o
- rmdir build
+ rm -f $(BUILDDIR)/$(OUTPUT) *.o
+ rmdir $(BUILDDIR)