Parcourir la source

Import build system

DricomDragon il y a 4 ans
Parent
commit
d09503a78f
2 fichiers modifiés avec 68 ajouts et 0 suppressions
  1. 43 0
      tankNet/.gitignore
  2. 25 0
      tankNet/makefile

+ 43 - 0
tankNet/.gitignore

@@ -0,0 +1,43 @@
+bin/
+
+
+# Created by https://www.toptal.com/developers/gitignore/api/c++
+# Edit at https://www.toptal.com/developers/gitignore?templates=c++
+
+### C++ ###
+# Prerequisites
+*.d
+
+# 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
+
+# End of https://www.toptal.com/developers/gitignore/api/c++
+
+

+ 25 - 0
tankNet/makefile

@@ -0,0 +1,25 @@
+CXX=g++
+CXXFLAGS=-std=c++11
+LDFLAGS=-lbox2d
+INC=
+LIB=
+
+EXEC=App
+SRC=$(shell find . -name '*.cpp')
+OBJ=$(SRC:.cpp=.o)
+
+$(EXEC): $(OBJ)
+	@mkdir -p bin
+	$(CXX) -o bin/$@ $^ $(LDFLAGS) $(LIB)
+
+%.o : %.cpp
+	$(CXX) -o $@ -c $< $(CXXFLAGS) $(INC)
+
+clean:
+	rm -rf $(OBJ)
+
+distclean: clean
+	rm -rf ./bin
+
+exec: $(EXEC)
+	./bin/$(EXEC)