diff options
author | jonas <himself@jonasgunz.de> | 2019-01-07 12:57:54 +0100 |
---|---|---|
committer | jonas <himself@jonasgunz.de> | 2019-01-07 14:56:59 +0100 |
commit | d4cbd787881d9367b8718a5ee9d645b988c88664 (patch) | |
tree | c3e8598e9836fb7dd9181d19dd1da86ed50cca99 /Makefile | |
parent | 1751c781621b644eda4bd2ebd8eb73fa2270e98e (diff) | |
download | termgl-d4cbd787881d9367b8718a5ee9d645b988c88664.tar.gz |
Tweaked Makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,12 +1,14 @@ CC = /usr/bin/g++ CFLAGS = -Wall -g -std=c++11 LDFLAGS = -lm -lcurses -OUTPUT = bin/Engine +OUTPUT = Engine +BUILDDIR = build OBJ = main.o cObject.o cObjectHandler.o cRender.o cInput.o prog: $(OBJ) - $(CC) $(CFLAGS) -o $(OUTPUT) $(OBJ) $(LDFLAGS) + mkdir -p $(BUILDDIR) + $(CC) $(CFLAGS) -o $(BUILDDIR)/$(OUTPUT) $(OBJ) $(LDFLAGS) %.o: %.cpp $(CC) $(CFLAGS) -c $< @@ -18,4 +20,5 @@ all: .PHONY: clean clean: - rm -f $(OUTPUT) *.o + rm -f $(BUILDDIR)/$(OUTPUT) *.o + rmdir $(BUILDDIR) |