From de4712f305db1b12f395ca9f98af9ce4678d439c Mon Sep 17 00:00:00 2001 From: zedarider Date: Fri, 13 Jan 2017 21:41:28 +0000 Subject: repaired make --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Makefile') 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) -- cgit