diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..93787e2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "glm"] + path = glm + url = git://github.com/g-truc/glm.git diff --git a/Makefile b/Makefile index d81003d..70b366b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ FILE := app TARGET := $(FILE) +REPOS := glcxx glm CCFLAGS := $(shell sdl2-config --cflags) ifeq (MINGW,$(findstring MINGW,$(shell uname))) @@ -12,10 +13,16 @@ endif LDFLAGS := $(LIBS) $(shell sdl2-config --libs) -all: $(TARGET) +all: submodule_init $(TARGET) $(TARGET): $(FILE).cc $(CXX) -o $(TARGET) $(CCFLAGS) $< $(LDFLAGS) +.PHONY: submodule_init +submodule_init: + @if [ ! -e glcxx ]; then \ + git submodule update --init; \ + fi + clean: -rm -f $(TARGET) *~ *.o diff --git a/glcxx b/glcxx new file mode 160000 index 0000000..e0f6651 --- /dev/null +++ b/glcxx @@ -0,0 +1 @@ +Subproject commit e0f6651161cdb03f75ede1bde0e1ac49f097c414 diff --git a/glm b/glm new file mode 160000 index 0000000..8f39bb8 --- /dev/null +++ b/glm @@ -0,0 +1 @@ +Subproject commit 8f39bb8730d45570384f3156eb0126b835024d69