aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzedarider <ymherklotz@gmail.com>2017-01-13 21:41:28 +0000
committerzedarider <ymherklotz@gmail.com>2017-01-13 21:41:28 +0000
commitde4712f305db1b12f395ca9f98af9ce4678d439c (patch)
tree34bbaf8869a9222e283c91a5ebf39140abc74759
parentb975867b1d3675be2acbe8f82cd00dfa86852bdb (diff)
downloadChessAI-de4712f305db1b12f395ca9f98af9ce4678d439c.tar.gz
ChessAI-de4712f305db1b12f395ca9f98af9ce4678d439c.zip
repaired make
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d08e45f..231788a 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,8 @@ CC := g++ # this is the main compiler
# CC := clange --analyze # and comment out the linker last line
SRCDIR := src
BUILDDIR := build
-TARGET := bin/chess_ai
+TARGETDIR := bin
+TARGET := main
SRCEXT := cpp
SOURCES := $(shell find $(SRCDIR) -type f -name "*.$(SRCEXT)")
@@ -13,7 +14,8 @@ INC := -I include
$(TARGET): $(OBJECTS)
@echo " Linking..."
- @echo " $(CC) $^ -o $(TARGET) $(LIB)"; $(CC) $^ -o $(TARGET) $(LIB)
+ @mkdir -p $(BUILDDIR)
+ @echo " $(CC) $^ -o $(TARGETDIR)/$(TARGET) $(LIB)"; $(CC) $^ -o $(TARGETDIR)/$(TARGET) $(LIB)
$(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT)
@mkdir -p $(BUILDDIR)