From 866feb3ee82b2ddb51d880e87c8cfd74a9ec8a60 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Thu, 4 Mar 2021 15:33:21 -0500 Subject: [PATCH] add build instructions, and update Makefile --- .gitignore | 1 - .gitmodules | 6 ++++++ Makefile | 8 ++++++-- README | 10 ++++++++++ ext/imgui | 1 + ext/tangerine | 1 + 6 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 ext/imgui create mode 160000 ext/tangerine diff --git a/.gitignore b/.gitignore index 2406548..e744add 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ build/* -ext/* bin/* tags diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9afdc66 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "ext/imgui"] + path = ext/imgui + url = https://github.com/ocornut/imgui +[submodule "ext/tangerine"] + path = ext/tangerine + url = https://gitlab.com/cinnaboot/tangerine diff --git a/Makefile b/Makefile index ee181f6..e902b90 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ OBJDIR := build SRCDIR := src -LIBDIR := ext/tangerine TESTDIR := tests BINDIR := bin +LIBDIR := ext/tangerine LIB := $(LIBDIR)/build/libTangerine.a CXX := g++ @@ -29,7 +29,7 @@ all: $(BIN) $(TEST_BIN) -include $(OBJDIR)/*.d -$(BIN): $(COMMON_OBJECTS) $(OBJECTS) +$(BIN): $(COMMON_OBJECTS) $(OBJECTS) $(LIB) $(CXX) -o $(BIN) $(LDFLAGS) $(COMMON_OBJECTS) $(OBJECTS) $(LIB) $(TEST_BIN): $(TEST_OBJECTS) $(TEST_MAIN_OBJ) @@ -47,6 +47,10 @@ $(TEST_OBJECTS): $(TEST_SOURCES) $(TEST_MAIN_OBJ): $(TEST_MAIN_SOURCE) $(CXX) $(CXXFLAGS) -c -MMD $(TESTDIR)/tests_main.cpp -o $(OBJDIR)/tests_main.o +$(LIB): + $(MAKE) -C $(LIBDIR) + clean: rm -rf $(OBJDIR)/* $(BIN) bin/test_orbit + $(MAKE) -C $(LIBDIR) clean .PHONY: clean diff --git a/README b/README index 69ff99d..f6a7e7a 100644 --- a/README +++ b/README @@ -11,3 +11,13 @@ TODO: try out Catch2 for testing: https://github.com/catchorg/Catch2 you know, make the actual game +Building: + install dependencies for your environment: + eg) $ sudo pacman -S assimp glew glm sdl2 catch2 + checkout, and initialise submodule dependencies: + $ git submodule init + $ git submodule update --recursive + build: + $ make + + binaries will be in ./bin diff --git a/ext/imgui b/ext/imgui new file mode 160000 index 0000000..ee643b2 --- /dev/null +++ b/ext/imgui @@ -0,0 +1 @@ +Subproject commit ee643b2ad919f9e85b973f3915d13a4fc0612a5a diff --git a/ext/tangerine b/ext/tangerine new file mode 160000 index 0000000..3d947b1 --- /dev/null +++ b/ext/tangerine @@ -0,0 +1 @@ +Subproject commit 3d947b1193653c0af4e600221cb9aa5bbccf8bc3