diff --git a/.gitignore b/.gitignore index 43b6705..4727142 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ bin/ build/ +ext/assimp doc/ msvc/.vs/ msvc/x64/ diff --git a/Makefile b/Makefile index a73910a..a26b208 100644 --- a/Makefile +++ b/Makefile @@ -13,22 +13,23 @@ LIBNAME = libTangerine.a RENDER_SOURCES = $(wildcard $(SRCDIR)/*.cpp) RENDER_OBJECTS = $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(RENDER_SOURCES)) +# NOTE: target to automatically build a current release of assimp. Fixes +# issue on Fedora where the default assimp version doesn't support glTF2 ASSIMP_DIR=ext/assimp ifeq ($(USE_INTERNAL_ASSIMP), y) -$(info using internal assimp) CXXFLAGS += -I$(ASSIMP_DIR)/include +BUILD_ASSIMP_TARGET := build_assimp endif -all: mkdirs $(LIBNAME) examples + +all: mkdirs $(BUILD_ASSIMP_TARGET) $(LIBNAME) examples .PHONY: all -include $(OBJDIR)/*.d -# NOTE: target to automatically build a current release of assimp. Fixes -# issue on Fedora where the default assimp version doesn't support glTF2 build_assimp: - if [ ! -d $(ASSIMP_DIR) ]; then \ + @if [ ! -d $(ASSIMP_DIR) ]; then \ git clone -n "https://github.com/assimp/assimp" $(ASSIMP_DIR); \ cd $(ASSIMP_DIR); \ git checkout -q v5.0.1; \