diff options
author | zedarider <ymherklotz@gmail.com> | 2016-12-21 14:37:31 +0000 |
---|---|---|
committer | zedarider <ymherklotz@gmail.com> | 2016-12-21 14:37:31 +0000 |
commit | dbc58fb44cc119161b31aa8c58b41828ce226bfa (patch) | |
tree | a8ba3b2410c6e2d88c9cc96a5a4ca2a18bba6e53 | |
parent | dfb9410625c27a8ae5177024c67ddeaa4dc087ac (diff) | |
download | A-star-algorithm-dbc58fb44cc119161b31aa8c58b41828ce226bfa.tar.gz A-star-algorithm-dbc58fb44cc119161b31aa8c58b41828ce226bfa.zip |
fixed makefile
-rw-r--r-- | Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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/main +TARGETDIR := bin +TARGET := main SRCEXT := cpp SOURCES := $(shell find $(SRCDIR) -type f -name "*.$(SRCEXT)") @@ -13,8 +14,9 @@ LIB := -lsfml-graphics -lsfml-system -lsfml-window INC := -Iinclude $(TARGET): $(OBJECTS) + @mkdir -p $(TARGETDIR) @echo " Linking..." - @echo " $(CC) $^ -o $(TARGET) $(LIBDIR) $(LIB)"; $(CC) $^ -o $(TARGET) $(LIBDIR) $(LIB) + @echo " $(CC) $^ -o $(TARGET) $(LIBDIR) $(LIB)"; $(CC) $^ -o $(TARGETDIR)/$(TARGET) $(LIBDIR) $(LIB) $(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT) @mkdir -p $(BUILDDIR) @@ -26,10 +28,12 @@ clean: # Tests tester: + @mkdir -p test @echo " $(CC) $(CFLAGS) test/tester.cpp $(INC) $(LIB) -o bin/tester"; $(CC) $(CFLAGS) test/tester.cpp $(INC) $(LIB) -o bin/tester # Spikes ticket: + @mkdir -p spikes @echo " $(CC) $(CFLAGS) spikes/ticket.cpp $(INC) $(LIB) -o bin/ticket"; $(CC) $(CFLAGS) spikes/ticket.cpp $(INC) $(LIB) -o bin/ticket .PHONY: clean |