aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzedarider <ymherklotz@gmail.com>2016-12-06 15:11:07 +0000
committerzedarider <ymherklotz@gmail.com>2016-12-06 15:11:07 +0000
commit73ff5968a2dc294514b37006d72daa6070d7250b (patch)
tree17a35883cf41a4f8decdab120981413f18717ecc
downloadA-star-algorithm-73ff5968a2dc294514b37006d72daa6070d7250b.tar.gz
A-star-algorithm-73ff5968a2dc294514b37006d72daa6070d7250b.zip
adding main.cpp
-rw-r--r--.atom-build.json3
-rw-r--r--.clang_complete1
-rw-r--r--.gitignore29
-rw-r--r--Makefile35
-rw-r--r--src/main.cpp18
5 files changed, 86 insertions, 0 deletions
diff --git a/.atom-build.json b/.atom-build.json
new file mode 100644
index 0000000..0193d03
--- /dev/null
+++ b/.atom-build.json
@@ -0,0 +1,3 @@
+{
+ "cmd": "make -B"
+}
diff --git a/.clang_complete b/.clang_complete
new file mode 100644
index 0000000..30679be
--- /dev/null
+++ b/.clang_complete
@@ -0,0 +1 @@
+-Iinclude
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4581ef2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,29 @@
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+*.smod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6125a62
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+CC := g++ # this is the main compiler
+# CC := clange --analyze # and comment out the linker last line
+SRCDIR := src
+BUILDDIR := build
+TARGET := bin/main
+
+SRCEXT := cpp
+SOURCES := $(shell find $(SRCDIR) -type f -name "*.$(SRCEXT)")
+OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o))
+CFLAGS := -g -Wall -Wextra -Wpedantic -std=c++14
+LIBDIR := -L/usr/lib64/
+LIB := -lsfml-graphics -lsfml-system -lsfml-window
+INC := -Iinclude
+
+$(TARGET): $(OBJECTS)
+ @echo " Linking..."
+ @echo " $(CC) $^ -o $(TARGET) $(LIBDIR) $(LIB)"; $(CC) $^ -o $(TARGET) $(LIBDIR) $(LIB)
+
+$(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT)
+ @mkdir -p $(BUILDDIR)
+ @echo " $(CC) $(CFLAGS) $(INC) -c -o $@ $<"; $(CC) $(CFLAGS) $(INC) -c -o $@ $<
+
+clean:
+ @echo " Cleaning..."
+ @echo " $(RM) -r $(BUILDDIR) $(TARGET)"; $(RM) -r $(BUILDDIR) $(TARGET)
+
+# Tests
+tester:
+ @echo " $(CC) $(CFLAGS) test/tester.cpp $(INC) $(LIB) -o bin/tester"; $(CC) $(CFLAGS) test/tester.cpp $(INC) $(LIB) -o bin/tester
+
+# Spikes
+ticket:
+ @echo " $(CC) $(CFLAGS) spikes/ticket.cpp $(INC) $(LIB) -o bin/ticket"; $(CC) $(CFLAGS) spikes/ticket.cpp $(INC) $(LIB) -o bin/ticket
+
+.PHONY: clean
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..7781db3
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,18 @@
+/*
+
+ description:
+
+ author: Yann Herklotz <ymherklotz@gmail.com>
+ date created: DD-MM-YYYY
+
+ */
+
+#include <iostream>
+
+using namespace std;
+
+int main(int argc, char *argv[]) {
+ cout << "executing " << argv[0] << endl;
+ cout << "arguments given: " << argc-1 << endl;
+ return 0;
+}