2016-05-09 11:33:04 -07:00
|
|
|
-include Makefile.local
|
2016-05-13 11:56:58 -07:00
|
|
|
|
2016-05-18 11:37:03 -07:00
|
|
|
# Building
|
|
|
|
## Release or Debug
|
|
|
|
#
|
|
|
|
# make BUILD_TYPE=Debug
|
|
|
|
# make BUILD_TYPE=Release
|
|
|
|
#
|
|
|
|
# To build either in debug mode, or in release mode
|
|
|
|
#
|
|
|
|
# Debugging
|
2016-09-09 11:59:04 -07:00
|
|
|
## Run in debugger
|
2016-05-18 11:37:03 -07:00
|
|
|
#
|
2016-09-09 11:59:04 -07:00
|
|
|
# make tests DEBUG=1 ARGS=--gtest_filter=World*
|
2016-05-18 11:37:03 -07:00
|
|
|
#
|
|
|
|
# to only build the tests targets, and run it via gdb afterwards.
|
|
|
|
# It will automatically start the execution and forward the arguments
|
|
|
|
# that are given via ARGS to the target
|
|
|
|
#
|
|
|
|
## Verbose output
|
|
|
|
#
|
|
|
|
# make Q=
|
|
|
|
#
|
|
|
|
# This will print out information about the commands that are executed to build
|
|
|
|
# and run the target(s)
|
|
|
|
|
2016-05-13 11:56:58 -07:00
|
|
|
Q = @
|
2016-09-09 11:59:04 -07:00
|
|
|
OS := $(shell uname)
|
2016-05-13 11:56:58 -07:00
|
|
|
LOCAL_CONFIG_DIR = ~/.local/share/engine
|
2017-06-04 01:12:06 -07:00
|
|
|
UPDATEDIR := /tmp
|
2016-07-19 11:52:47 -07:00
|
|
|
|
|
|
|
VALGRIND ?=
|
|
|
|
ifeq ($(VALGRIND),)
|
2017-06-30 08:01:47 -07:00
|
|
|
VALGRIND_OPTIONS ?=
|
2016-07-19 11:52:47 -07:00
|
|
|
VALGRIND_CMD ?=
|
|
|
|
else
|
2017-06-30 08:01:47 -07:00
|
|
|
VALGRIND_OPTIONS ?=
|
|
|
|
VALGRIND_CMD ?= valgrind $(VALGRIND_OPTIONS)
|
2016-07-19 11:52:47 -07:00
|
|
|
endif
|
|
|
|
|
2017-06-28 12:12:02 -07:00
|
|
|
PERF ?=
|
|
|
|
ifeq ($(PERF),)
|
|
|
|
PERF_OPTIONS ?=
|
|
|
|
PERF_CMD ?=
|
|
|
|
PERF_REPORT_CMD ?=
|
|
|
|
else
|
2017-07-05 13:45:12 -07:00
|
|
|
PERF_OPTIONS ?= --call-graph dwarf
|
2017-06-28 12:12:02 -07:00
|
|
|
PERF_CMD ?= sudo perf record $(PERF_OPTIONS)
|
2017-07-05 13:57:24 -07:00
|
|
|
PERF_REPORT_CMD ?= sudo perf report -g srcline -s dso,sym,srcline --inline -n --stdio
|
2017-06-28 12:12:02 -07:00
|
|
|
endif
|
|
|
|
|
2016-09-09 11:59:04 -07:00
|
|
|
DEBUG ?=
|
|
|
|
ifeq ($(DEBUG),)
|
|
|
|
DEBUG_CMD ?=
|
2016-05-18 11:37:03 -07:00
|
|
|
else
|
2016-09-09 11:59:04 -07:00
|
|
|
DEBUGGER := $(shell (gdb --help >/dev/null 2>&1 && echo GDB) || (lldb --help >/dev/null 2>&1 && echo LLDB))
|
|
|
|
ifeq ($(DEBUGGER),GDB)
|
|
|
|
DEBUG_CMD ?= gdb -ex run --args
|
|
|
|
else ifeq ($(DEBUGGER),LLDB)
|
2016-09-27 11:20:16 -07:00
|
|
|
DEBUG_CMD ?= lldb -b -o run
|
2016-09-09 11:59:04 -07:00
|
|
|
else
|
|
|
|
DEBUG_CMD ?=
|
|
|
|
endif
|
2016-05-18 11:37:03 -07:00
|
|
|
endif
|
2016-06-16 11:10:23 -07:00
|
|
|
|
2016-12-07 11:30:56 -08:00
|
|
|
CMAKE_OPTIONS ?=
|
|
|
|
|
|
|
|
GPROF ?=
|
2016-05-13 11:56:58 -07:00
|
|
|
BUILD_TYPE ?= Debug
|
2016-05-18 11:37:03 -07:00
|
|
|
# override this in your Makefile.local to use a different directory
|
|
|
|
BUILDDIRPATH ?= ./
|
2016-11-10 11:51:02 -08:00
|
|
|
#BUILDDIR ?= $(BUILDDIRPATH)build-$(shell echo $(BUILD_TYPE) | tr '[:upper:]' '[:lower:]')
|
2016-12-07 11:30:56 -08:00
|
|
|
ifeq ($(GPROF),)
|
2016-11-10 11:51:02 -08:00
|
|
|
BUILDDIR ?= $(BUILDDIRPATH)build/$(BUILD_TYPE)
|
2016-12-07 11:30:56 -08:00
|
|
|
else
|
|
|
|
BUILDDIR ?= $(BUILDDIRPATH)build/$(BUILD_TYPE)/gprof
|
|
|
|
CMAKE_OPTIONS += -DUSE_GPROF=True
|
|
|
|
endif
|
2016-07-18 11:26:40 -07:00
|
|
|
|
2017-03-30 13:19:53 -07:00
|
|
|
ifneq ($(THREADS),)
|
|
|
|
BUILDDIR ?= $(BUILDDIRPATH)build/$(BUILD_TYPE)/threads
|
|
|
|
CMAKE_OPTIONS += -DSANITIZER_THREADS=True
|
|
|
|
endif
|
|
|
|
|
2016-06-16 11:10:23 -07:00
|
|
|
#VOGL_OPTIONS ?= --vogl_force_debug_context --vogl_exit_after_x_frames 2000
|
|
|
|
VOGL_OPTIONS ?= --vogl_force_debug_context
|
|
|
|
VOGL ?=
|
|
|
|
ifeq ($(VOGL),)
|
|
|
|
VOGL_CMD ?=
|
|
|
|
else
|
2016-06-16 11:11:29 -07:00
|
|
|
VOGL_BIN ?= vogl
|
2016-06-17 11:29:55 -07:00
|
|
|
VOGL_CMD ?= $(VOGL_BIN) trace --vogl_tracepath $(BUILDDIR) --vogl_tracefile $@.trace.bin $(VOGL_OPTIONS)
|
2016-06-16 11:10:23 -07:00
|
|
|
ARGS_TMP := $(ARGS)
|
|
|
|
ARGS = "--args $(ARGS_TMP)"
|
|
|
|
endif
|
|
|
|
|
2016-07-29 11:47:07 -07:00
|
|
|
MAKE_PID := $$PPID
|
|
|
|
JOB_FLAG := $(filter -j%, $(subst -j ,-j,$(shell ps T | grep "^\s*$(MAKE_PID).*$(MAKE)")))
|
|
|
|
MAKE_OPTIONS := --no-print-directory -C $(BUILDDIR)
|
2016-04-28 12:58:25 -07:00
|
|
|
|
2016-09-04 13:15:17 -07:00
|
|
|
ifeq ($(OS),Darwin)
|
2016-09-04 13:15:54 -07:00
|
|
|
CMAKE_GENERATOR ?= "Xcode"
|
2017-08-27 08:50:19 -07:00
|
|
|
CMAKE_BINARY ?= $(shell which cmake)
|
|
|
|
ifeq ($(CMAKE_BINARY),)
|
2016-09-04 13:26:07 -07:00
|
|
|
CMAKE_BINARY ?= /Applications/CMake.app/Contents/bin/cmake
|
2017-08-27 08:50:19 -07:00
|
|
|
endif
|
2016-09-05 11:52:02 -07:00
|
|
|
DARWIN := 1
|
2016-09-09 11:59:04 -07:00
|
|
|
else ifeq ($(OS),Linux)
|
2016-09-04 13:15:54 -07:00
|
|
|
CMAKE_GENERATOR ?= "Eclipse CDT4 - Unix Makefiles"
|
2016-09-04 13:26:07 -07:00
|
|
|
CMAKE_BINARY ?= cmake
|
2016-09-05 11:52:02 -07:00
|
|
|
LINUX := 1
|
2016-09-09 11:59:04 -07:00
|
|
|
else
|
|
|
|
CMAKE_GENERATOR ?= "MSYS Makefiles"
|
|
|
|
CMAKE_BINARY ?= cmake
|
|
|
|
WINDOWS := 1
|
2016-09-04 13:15:17 -07:00
|
|
|
endif
|
2016-09-04 13:26:07 -07:00
|
|
|
INSTALL_DIR ?= $(BUILDDIRPATH)$(OS)
|
2016-09-04 13:15:17 -07:00
|
|
|
|
2016-04-29 11:10:28 -07:00
|
|
|
all: build
|
2016-03-14 05:48:05 -07:00
|
|
|
|
2016-05-13 11:56:58 -07:00
|
|
|
run: shapetool
|
|
|
|
|
2016-11-27 10:48:04 -08:00
|
|
|
.PHONY: clangtidy
|
|
|
|
clangtidy:
|
|
|
|
$(Q)mkdir -p $(BUILDDIR)/tidy
|
2016-11-27 10:48:05 -08:00
|
|
|
$(Q)cd $(BUILDDIR)/tidy; $(CMAKE_BINARY) -DCMAKE_CXX_CLANG_TIDY:STRING="clang-tidy-4.0;-checks=readability-uniqueptr-delete-release,readability-non-const-parameter,readability-redundant-smartptr-get,performance-unnecessary-value-param,performance-unnecessary-copy-initialization,performance-inefficient-string-concatenation,performance-implicit-cast-in-loop,performance-for-range-copy,performance-faster-string-find,modernize-make-shared,clang-analyzer-security.*;-fix" $(CURDIR) $(CMAKE_OPTIONS) && cmake --build .
|
2016-11-27 10:48:04 -08:00
|
|
|
|
2016-05-20 11:43:29 -07:00
|
|
|
.PHONY: cmake
|
|
|
|
cmake:
|
2016-05-13 11:56:58 -07:00
|
|
|
$(Q)mkdir -p $(BUILDDIR)
|
2016-09-04 13:26:07 -07:00
|
|
|
$(Q)cd $(BUILDDIR); $(CMAKE_BINARY) -G$(CMAKE_GENERATOR) -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) $(CURDIR) $(CMAKE_OPTIONS)
|
2016-05-20 11:43:29 -07:00
|
|
|
|
2016-09-05 11:52:02 -07:00
|
|
|
define COMPILE
|
|
|
|
$(if $(LINUX),\
|
2016-09-07 13:13:40 -07:00
|
|
|
$(Q)$(MAKE) $(MAKE_OPTIONS) $(JOB_FLAG) $(1) \
|
2016-09-05 11:52:02 -07:00
|
|
|
$(else),\
|
|
|
|
$(if $(DARWIN),\
|
2017-10-12 09:25:47 -07:00
|
|
|
$(Q)cd $(BUILDDIR); xcodebuild build -target $(1) install -project tests.xcodeproj -configuration $(BUILD_TYPE) CODE_SIGNING_ALLOWED=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO && exit ${PIPESTATUS[0]} \
|
2016-09-05 11:52:02 -07:00
|
|
|
$(else),\
|
|
|
|
$(Q)$(MAKE) $(MAKE_OPTIONS) $(JOB_FLAG) $(1) \
|
|
|
|
)
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
2016-05-20 11:43:29 -07:00
|
|
|
.PHONY: build
|
|
|
|
build: cmake
|
2016-09-05 11:52:02 -07:00
|
|
|
$(call COMPILE, install)
|
2016-04-29 11:10:28 -07:00
|
|
|
|
2016-03-14 05:48:05 -07:00
|
|
|
clean:
|
2016-04-28 11:55:11 -07:00
|
|
|
$(Q)rm -rf $(BUILDDIR)
|
2016-03-14 05:48:05 -07:00
|
|
|
|
2016-04-22 11:33:15 -07:00
|
|
|
clean-local-config:
|
2016-05-02 11:19:52 -07:00
|
|
|
$(Q)rm -rf $(LOCAL_CONFIG_DIR)
|
2016-04-22 11:33:15 -07:00
|
|
|
|
2016-04-26 11:42:14 -07:00
|
|
|
edit-local-config:
|
2017-03-08 07:30:42 -08:00
|
|
|
$(Q)$(EDITOR) $(LOCAL_CONFIG_DIR)/worldrenderertool/worldrenderertool.vars
|
2016-04-26 11:42:14 -07:00
|
|
|
|
2016-08-05 11:05:55 -07:00
|
|
|
doc: cmake
|
2016-09-05 11:52:02 -07:00
|
|
|
$(call COMPILE, $@)
|
2016-08-05 11:55:11 -07:00
|
|
|
|
2017-12-31 08:22:32 -08:00
|
|
|
server client voxedit shapetool worldrenderertool shadertool noisetool noisetool2 databasetool uitool tests tests-math tests-core tests-persistence tests-voxel benchmarks-voxel tests-noise tests-computeshadertool testmesh testcamera testdepthbuffer testnuklear testtexture testvoxelfont testplane testimgui testoctree testluaui testoctreevisit testshapebuilder tests-shadertool flatc computeshadertool: cmake
|
2016-09-05 11:52:02 -07:00
|
|
|
$(call COMPILE, $@)
|
|
|
|
$(call COMPILE, copy-data-shared)
|
|
|
|
$(call COMPILE, copy-data-$@)
|
2017-06-28 12:12:02 -07:00
|
|
|
$(Q)cd $(BUILDDIR); $(PERF_CMD) $(VALGRIND_CMD) $(DEBUG_CMD) $(VOGL_CMD) ./$@ $(ARGS)
|
2016-03-29 23:37:05 -07:00
|
|
|
|
2018-01-12 06:15:04 -08:00
|
|
|
assimp backward benchmark dearimgui flatbuffers glm gtest libcurl libenet libturbobadger libuv lua53 nativefiledialog restclient-cpp sdl2 selene simplecpp zlib: cmake
|
2017-02-25 06:01:49 -08:00
|
|
|
$(call COMPILE, $@)
|
|
|
|
|
2017-10-09 08:07:50 -07:00
|
|
|
rcon: cmake
|
2016-09-05 11:52:02 -07:00
|
|
|
$(call COMPILE, $@)
|
2016-09-09 11:59:04 -07:00
|
|
|
$(Q)cd $(BUILDDIR); $(VALGRIND_CMD) $(DEBUG_CMD) $(VOGL_CMD) ./$@ $(ARGS)
|
2016-04-19 11:18:28 -07:00
|
|
|
|
2016-12-03 10:38:38 -08:00
|
|
|
define UPDATE_GIT
|
2017-06-04 01:12:06 -07:00
|
|
|
$(Q)if [ ! -d $(UPDATEDIR)/$(1).sync ]; then \
|
2017-08-08 23:54:36 -07:00
|
|
|
git clone --depth=1 $(2) $(UPDATEDIR)/$(1).sync; \
|
2016-12-03 10:38:38 -08:00
|
|
|
else \
|
2017-08-08 23:54:36 -07:00
|
|
|
cd $(UPDATEDIR)/$(1).sync && git pull --depth=1 --rebase; \
|
2016-12-03 10:38:38 -08:00
|
|
|
fi;
|
|
|
|
endef
|
|
|
|
|
|
|
|
define UPDATE_HG
|
2017-06-04 01:12:06 -07:00
|
|
|
$(Q)if [ ! -d $(UPDATEDIR)/$(1).sync ]; then \
|
|
|
|
hg clone $(2) $(UPDATEDIR)/$(1).sync; \
|
2016-12-03 10:38:38 -08:00
|
|
|
else \
|
2017-06-04 01:12:06 -07:00
|
|
|
cd $(UPDATEDIR)/$(1).sync && hg pull && hg update; \
|
2016-12-03 10:38:38 -08:00
|
|
|
fi;
|
|
|
|
endef
|
|
|
|
|
2017-09-10 21:47:47 -07:00
|
|
|
update-restclient-cpp:
|
2017-09-10 10:33:17 -07:00
|
|
|
$(call UPDATE_GIT,restclient-cpp,https://github.com/mrtazz/restclient-cpp.git)
|
|
|
|
rm -rf contrib/libs/restclient-cpp/restclient-cpp/*.h
|
|
|
|
rm -rf contrib/libs/restclient-cpp/*.cc
|
|
|
|
cp $(UPDATEDIR)/restclient-cpp.sync/include/restclient-cpp/*.h contrib/libs/restclient-cpp/restclient-cpp
|
|
|
|
cp $(UPDATEDIR)/restclient-cpp.sync/source/*.cc contrib/libs/restclient-cpp
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-libuv:
|
2017-09-06 10:34:12 -07:00
|
|
|
$(call UPDATE_GIT,libuv,https://github.com/libuv/libuv.git)
|
2017-09-10 10:33:17 -07:00
|
|
|
rm -rf contrib/libs/libuv/include/*.[ch]
|
|
|
|
rm -rf contrib/libs/libuv/src/unix/*.[ch]
|
|
|
|
rm -rf contrib/libs/libuv/src/win32/*.[ch]
|
|
|
|
rm -rf contrib/libs/libuv/src/*.[ch]
|
2017-09-06 10:34:12 -07:00
|
|
|
cp $(UPDATEDIR)/libuv.sync/include/*.h contrib/libs/libuv/include
|
|
|
|
cp $(UPDATEDIR)/libuv.sync/src/unix/*.[ch] contrib/libs/libuv/src/unix
|
|
|
|
cp $(UPDATEDIR)/libuv.sync/src/win/*.[ch] contrib/libs/libuv/src/win
|
|
|
|
cp $(UPDATEDIR)/libuv.sync/src/*.[ch] contrib/libs/libuv/src
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-stb:
|
2017-08-20 11:25:59 -07:00
|
|
|
$(call UPDATE_GIT,stb,https://github.com/nothings/stb.git)
|
|
|
|
cp $(UPDATEDIR)/stb.sync/stb_image.h src/modules/image/stb_image.h
|
|
|
|
cp $(UPDATEDIR)/stb.sync/stb_image_write.h src/modules/image/stb_image_write.h
|
|
|
|
cp $(UPDATEDIR)/stb.sync/stb_truetype.h src/modules/voxel/font/stb_truetype.h
|
2017-09-10 10:33:17 -07:00
|
|
|
cp $(UPDATEDIR)/stb.sync/stb_image.h contrib/libs/turbobadger/tb/thirdparty
|
2017-09-10 11:23:06 -07:00
|
|
|
cp $(UPDATEDIR)/stb.sync/stb_truetype.h contrib/libs/turbobadger/tb/thirdparty
|
2018-01-09 07:36:49 -08:00
|
|
|
# TODO: dearimgui
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-simplecpp:
|
2017-08-06 21:52:03 -07:00
|
|
|
$(call UPDATE_GIT,simplecpp,https://github.com/danmar/simplecpp.git)
|
|
|
|
cp $(UPDATEDIR)/simplecpp.sync/simplecpp.* contrib/libs/simplecpp
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-googletest:
|
2017-06-26 20:58:18 -07:00
|
|
|
$(call UPDATE_GIT,googletest,https://github.com/google/googletest.git)
|
2017-07-24 12:40:17 -07:00
|
|
|
rm -rf contrib/libs/gtest/src
|
|
|
|
rm -rf contrib/libs/gtest/include
|
|
|
|
cp -r $(UPDATEDIR)/googletest.sync/googletest/src contrib/libs/gtest
|
|
|
|
cp -r $(UPDATEDIR)/googletest.sync/googletest/include contrib/libs/gtest/include
|
2017-07-19 06:33:05 -07:00
|
|
|
git checkout -f contrib/libs/gtest/include/gtest/internal/custom
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-benchmark:
|
2017-06-20 11:35:23 -07:00
|
|
|
$(call UPDATE_GIT,benchmark,https://github.com/google/benchmark.git)
|
|
|
|
cp -r $(UPDATEDIR)/benchmark.sync/src/* contrib/libs/benchmark/src
|
|
|
|
cp -r $(UPDATEDIR)/benchmark.sync/include/* contrib/libs/benchmark/include
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-backward:
|
2017-06-11 10:41:00 -07:00
|
|
|
$(call UPDATE_GIT,backward-cpp,https://github.com/bombela/backward-cpp.git)
|
|
|
|
cp $(UPDATEDIR)/backward-cpp.sync/backward.cpp contrib/libs/backward
|
|
|
|
cp -f $(UPDATEDIR)/backward-cpp.sync/backward.hpp contrib/libs/backward/backward.h
|
|
|
|
sed -i 's/backward.hpp/backward.h/g' contrib/libs/backward/backward.cpp
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-dearimgui:
|
2017-08-08 23:54:36 -07:00
|
|
|
$(call UPDATE_GIT,imgui-addons,https://github.com/Flix01/imgui.git)
|
2017-06-04 01:12:06 -07:00
|
|
|
$(call UPDATE_GIT,imgui,https://github.com/ocornut/imgui.git)
|
2017-06-11 10:41:00 -07:00
|
|
|
cp $(UPDATEDIR)/imgui.sync/imgui*.h $(UPDATEDIR)/imgui.sync/imgui*.cpp $(UPDATEDIR)/imgui.sync/stb_*.h contrib/libs/dearimgui/dearimgui
|
2017-08-08 23:27:47 -07:00
|
|
|
mv contrib/libs/dearimgui/dearimgui/imgui_demo.cpp src/tests/testimgui/Demo.cpp
|
2018-01-09 07:36:49 -08:00
|
|
|
sed -i 's/"imgui.h"/"ui\/imgui\/IMGUI.h"/g' src/tests/testimgui/Demo.cpp
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-assimp:
|
2016-12-03 10:38:38 -08:00
|
|
|
$(call UPDATE_GIT,assimp,https://github.com/assimp/assimp.git)
|
|
|
|
rm -rf contrib/libs/assimp/code/* contrib/libs/assimp/include/*
|
2017-06-04 01:12:06 -07:00
|
|
|
cp -r $(UPDATEDIR)/assimp.sync/code/* contrib/libs/assimp/code
|
|
|
|
cp -r $(UPDATEDIR)/assimp.sync/include/* contrib/libs/assimp/include
|
2016-12-03 10:38:38 -08:00
|
|
|
git checkout contrib/libs/assimp/include/assimp/revision.h
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-flatbuffers:
|
2016-12-03 10:38:38 -08:00
|
|
|
$(call UPDATE_GIT,flatbuffers,https://github.com/google/flatbuffers.git)
|
|
|
|
rm -rf contrib/libs/flatbuffers/flatbuffers/* contrib/libs/flatbuffers/compiler/*
|
|
|
|
mkdir -p contrib/libs/flatbuffers/compiler/src
|
2017-06-04 01:12:06 -07:00
|
|
|
cp -r $(UPDATEDIR)/flatbuffers.sync/include/flatbuffers/* contrib/libs/flatbuffers/flatbuffers
|
|
|
|
cp -r $(UPDATEDIR)/flatbuffers.sync/src/* contrib/libs/flatbuffers/compiler
|
|
|
|
cp -r $(UPDATEDIR)/flatbuffers.sync/grpc/src/* contrib/libs/flatbuffers/compiler/src
|
2016-12-03 10:38:38 -08:00
|
|
|
rm contrib/libs/flatbuffers/compiler/flathash.cpp
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-enet:
|
2016-12-03 10:38:38 -08:00
|
|
|
$(call UPDATE_GIT,libenet,https://github.com/lsalzman/enet.git)
|
2017-06-04 01:12:06 -07:00
|
|
|
cp -r $(UPDATEDIR)/libenet.sync/*.[ch] contrib/libs/libenet
|
|
|
|
cp -r $(UPDATEDIR)/libenet.sync/include/* contrib/libs/libenet/include
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-glm:
|
2016-12-03 10:38:38 -08:00
|
|
|
$(call UPDATE_GIT,glm,https://github.com/g-truc/glm.git)
|
|
|
|
rm -rf contrib/libs/glm/glm/*
|
2017-06-04 01:12:06 -07:00
|
|
|
cp -r $(UPDATEDIR)/glm.sync/glm/* contrib/libs/glm/glm
|
2016-12-03 10:38:38 -08:00
|
|
|
rm contrib/libs/glm/glm/CMakeLists.txt
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-sdl2:
|
2016-12-03 10:38:38 -08:00
|
|
|
$(call UPDATE_HG,sdl2,https://hg.libsdl.org/SDL)
|
2017-10-15 03:55:18 -07:00
|
|
|
rm -rf contrib/libs/sdl2/src/* contrib/libs/sdl2/include/* contrib/libs/sdl2/cmake/*
|
2017-06-04 01:12:06 -07:00
|
|
|
cp -r $(UPDATEDIR)/sdl2.sync/src/* contrib/libs/sdl2/src
|
|
|
|
cp -r $(UPDATEDIR)/sdl2.sync/include/* contrib/libs/sdl2/include
|
2017-10-15 03:55:18 -07:00
|
|
|
cp -r $(UPDATEDIR)/sdl2.sync/cmake/* contrib/libs/sdl2/cmake
|
2017-09-10 21:47:47 -07:00
|
|
|
|
|
|
|
update-turbobadger:
|
2016-12-12 11:26:15 -08:00
|
|
|
$(call UPDATE_GIT,turbobadger,https://github.com/fruxo/turbobadger.git)
|
2018-01-09 07:36:49 -08:00
|
|
|
rm -rf contrib/libs/libturbobadger/tb/*
|
|
|
|
cp -r $(UPDATEDIR)/turbobadger.sync/src/tb/* contrib/libs/libturbobadger/tb
|
|
|
|
git checkout master contrib/libs/libturbobadger/tb/tb_clipboard_sdl.cpp
|
|
|
|
git checkout master contrib/libs/libturbobadger/tb/tb_system_sdl.cpp
|
|
|
|
git checkout master contrib/libs/libturbobadger/tb/tb_file_sdl.cpp
|
|
|
|
git checkout contrib/libs/libturbobadger/tb/thirdparty/
|
|
|
|
rm contrib/libs/libturbobadger/tb/CMakeLists.txt
|
|
|
|
rm -rf contrib/libs/libturbobadger/tb/utf8/test\ files
|
|
|
|
rm -rf contrib/libs/libturbobadger/tb/tests
|
|
|
|
git diff contrib/libs/libturbobadger/ > $(UPDATEDIR)/turbobadger.sync/upstream.diff
|
|
|
|
git checkout contrib/libs/libturbobadger/tb/tb_id.cpp
|
2017-01-17 11:19:45 -08:00
|
|
|
|
2017-09-11 07:54:07 -07:00
|
|
|
update-glslang:
|
|
|
|
$(call UPDATE_GIT,glslang,https://github.com/KhronosGroup/glslang.git)
|
|
|
|
rm -rf src/tools/glslang/External
|
|
|
|
cp -r $(UPDATEDIR)/glslang.sync/External src/tools/glslang/
|
|
|
|
rm -rf src/tools/glslang/glslang
|
|
|
|
cp -r $(UPDATEDIR)/glslang.sync/glslang src/tools/glslang/
|
|
|
|
rm -rf src/tools/glslang/OGLCompilersDLL
|
|
|
|
cp -r $(UPDATEDIR)/glslang.sync/OGLCompilersDLL src/tools/glslang/
|
|
|
|
rm -rf src/tools/glslang/SPIRV
|
|
|
|
cp -r $(UPDATEDIR)/glslang.sync/SPIRV src/tools/glslang/
|
|
|
|
rm -rf src/tools/glslang/StandAlone
|
|
|
|
cp -r $(UPDATEDIR)/glslang.sync/StandAlone src/tools/glslang/
|
|
|
|
|
2017-12-31 08:22:32 -08:00
|
|
|
update-nuklear:
|
|
|
|
$(call UPDATE_GIT,nuklear,https://github.com/vurtun/nuklear.git)
|
2018-01-09 07:36:49 -08:00
|
|
|
cp $(UPDATEDIR)/nuklear.sync/nuklear.h src/modules/ui/nuklear/private
|
2017-12-31 08:22:32 -08:00
|
|
|
cp $(UPDATEDIR)/nuklear.sync/demo/overview.c src/tests/testnuklear
|
|
|
|
|
2017-09-10 22:28:06 -07:00
|
|
|
update-json:
|
|
|
|
$(call UPDATE_GIT,json,https://github.com/nlohmann/json)
|
|
|
|
cp $(UPDATEDIR)/json.sync/src/json.hpp src/modules/core
|
|
|
|
|
2017-09-10 21:47:47 -07:00
|
|
|
# currently not part of updatelibs - intentional - we adopted the original code.
|
|
|
|
update-simplexnoise:
|
|
|
|
$(call UPDATE_GIT,simplexnoise,https://github.com/simongeilfus/SimplexNoise.git)
|
|
|
|
cp $(UPDATEDIR)/simplexnoise.sync/include/Simplex.h src/modules/noise
|
|
|
|
|
2017-10-08 11:00:56 -07:00
|
|
|
update-stringview:
|
|
|
|
$(call UPDATE_GIT,string_view,https://github.com/satoren/string_view.git)
|
|
|
|
cp $(UPDATEDIR)/string_view.sync/string_view.hpp contrib/libs/string_view
|
|
|
|
|
2018-01-10 00:15:11 -08:00
|
|
|
# TODO native file dialog support
|
2018-01-12 06:15:04 -08:00
|
|
|
# TODO simpleai support
|
2017-12-31 08:22:32 -08:00
|
|
|
updatelibs: update-nuklear update-stringview update-restclient-cpp update-libuv update-stb update-googletest update-benchmark update-backward update-dearimgui update-flatbuffers update-assimp update-enet update-glm update-sdl2 update-turbobadger update-glslang
|
2017-08-16 12:06:05 -07:00
|
|
|
|
2017-01-17 11:19:45 -08:00
|
|
|
updategl:
|
|
|
|
cd tools/flextGL && ./flextgl.sh
|