From a6052938015c10464c88f623fe8ffd82a7cd8987 Mon Sep 17 00:00:00 2001 From: Stefano D'Angelo Date: Thu, 12 Dec 2024 11:34:17 +0100 Subject: [PATCH] hopefully updated to latest tibia --- examples/common/src/ios-make-cxx-fx.json | 14 ----------- examples/common/src/ios-make-cxx-synth.json | 14 ----------- examples/common/src/make-cxx-fx.json | 6 ++--- examples/common/src/make-cxx-synth.json | 6 ++--- examples/common/src/make.json | 3 ++- examples/common/src/vars-pre.mk | 26 +++++++++++++++++++-- examples/tibia_gen.sh | 2 +- 7 files changed, 31 insertions(+), 40 deletions(-) delete mode 100644 examples/common/src/ios-make-cxx-fx.json delete mode 100644 examples/common/src/ios-make-cxx-synth.json diff --git a/examples/common/src/ios-make-cxx-fx.json b/examples/common/src/ios-make-cxx-fx.json deleted file mode 100644 index f976ac4..0000000 --- a/examples/common/src/ios-make-cxx-fx.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "ios_make": { - "headerSearchPaths": [ - "../../../../../../miniaudio", - "../../../../common/src", - "../../../../../include" - ], - "deploymentTarget": 14.0, - "commonDir": "../../common/ios", - "pluginDir": "../../common/src/cxx-fx", - "cSrcs": "../../common/src/cxx-fx/impl.h", - "cxxSrcs": "../src/impl.cpp" - } -} diff --git a/examples/common/src/ios-make-cxx-synth.json b/examples/common/src/ios-make-cxx-synth.json deleted file mode 100644 index ce1725c..0000000 --- a/examples/common/src/ios-make-cxx-synth.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "ios_make": { - "headerSearchPaths": [ - "../../../../../../miniaudio", - "../../../../common/src", - "../../../../../include" - ], - "deploymentTarget": 14.0, - "commonDir": "../../common/ios", - "pluginDir": "../../common/src/cxx-synth", - "cSrcs": "../../common/src/cxx-synth/impl.h", - "cxxSrcs": "../src/impl.cpp" - } -} diff --git a/examples/common/src/make-cxx-fx.json b/examples/common/src/make-cxx-fx.json index a6d2b58..a824612 100644 --- a/examples/common/src/make-cxx-fx.json +++ b/examples/common/src/make-cxx-fx.json @@ -1,8 +1,6 @@ { "make": { - "cxxSrcs": "../src/impl.cpp", - "cflags": "-I../../../include -I../../common/src -I../../common/src/cxx-fx -I../common/src", - "cxxflags": "-I../../../include -I../../common/src -I../../common/src/cxx-fx -I../common/src -std=c++11", - "pluginDir": "../../common/src/cxx-fx" + "mkincDir": "../../common/src", + "extra": "EXAMPLE_TYPE := cxx-fx" } } diff --git a/examples/common/src/make-cxx-synth.json b/examples/common/src/make-cxx-synth.json index 2ece5a4..3a0f5df 100644 --- a/examples/common/src/make-cxx-synth.json +++ b/examples/common/src/make-cxx-synth.json @@ -1,8 +1,6 @@ { "make": { - "cxxSrcs": "../src/impl.cpp", - "cflags": "-I../../../include -I../../common/src -I../../common/src/cxx-synth -I../common/src", - "cxxflags": "-I../../../include -I../../common/src -I../../common/src/cxx-synth -I../common/src -std=c++11", - "pluginDir": "../../common/src/cxx-synth" + "mkincDir": "../../common/src", + "extra": "EXAMPLE_TYPE := cxx-synth" } } diff --git a/examples/common/src/make.json b/examples/common/src/make.json index 7771d8b..6e28364 100644 --- a/examples/common/src/make.json +++ b/examples/common/src/make.json @@ -1,5 +1,6 @@ { "make": { - "mkincDir": "../../common/src" + "mkincDir": "../../common/src", + "extra": "EXAMPLE_TYPE := c" } } diff --git a/examples/common/src/vars-pre.mk b/examples/common/src/vars-pre.mk index 9817a32..88fcbd8 100644 --- a/examples/common/src/vars-pre.mk +++ b/examples/common/src/vars-pre.mk @@ -1,5 +1,21 @@ -CFLAGS_EXTRA := -I../../../include -I../../common/src -I../common/src -PLUGIN_DIR := ../src +ifeq ($(EXAMPLE_TYPE), c) + PLUGIN_DIR := ../src + CFLAGS_EXTRA := -I../../../include -I../../common/src -I../common/src +endif + +ifeq ($(EXAMPLE_TYPE), cxx-fx) + PLUGIN_DIR := ../../common/src/cxx-fx + CXX_SRCS_EXTRA := ../src/impl.cpp + CFLAGS_EXTRA := -I../../../include -I../../common/src -I../../common/src/cxx-fx -I../common/src + CXXFLAGS_EXTRA := -I../../../include -I../../common/src -I../../common/src/cxx-fx -I../common/src -std=c++11 +endif + +ifeq ($(EXAMPLE_TYPE), cxx-synth) + PLUGIN_DIR := ../../common/src/cxx-synth + CXX_SRCS_EXTRA := ../src/impl.cpp + CFLAGS_EXTRA := -I../../../include -I../../common/src -I../../common/src/cxx-synth -I../common/src + CXXFLAGS_EXTRA := -I../../../include -I../../common/src -I../../common/src/cxx-synth -I../common/src -std=c++11 +endif ifeq ($(TEMPLATE), cmd) COMMON_DIR := ../../common/cmd @@ -29,6 +45,12 @@ endif ifeq ($(TEMPLATE), ios) COMMON_DIR := ../../common/ios + ifeq ($(EXAMPLE_TYPE), cxx-fx) + C_SRCS_EXTRA := ../../common/src/cxx-fx/impl.h + endif + ifeq ($(EXAMPLE_TYPE), cxx-synth) + C_SRCS_EXTRA := ../../common/src/cxx-synth/impl.h + endif endif ifeq ($(TEMPLATE), android) diff --git a/examples/tibia_gen.sh b/examples/tibia_gen.sh index a715357..e3e5f48 100755 --- a/examples/tibia_gen.sh +++ b/examples/tibia_gen.sh @@ -81,6 +81,6 @@ for d in $dirs; do echo "include ../../common/android/Makefile" > $d/android/Makefile cd $d && $TIBIA_DIR/tibia --data ../common/src/company.json,src/product.json,src/ios.json $TIBIA_DIR/templates/ios ios && cd .. - cd $d && $TIBIA_DIR/tibia --data ../common/src/company.json,src/product.json,src/ios.json,../common/src/ios-$make_json $TIBIA_DIR/templates/ios-make ios && cd .. + cd $d && $TIBIA_DIR/tibia --data ../common/src/company.json,src/product.json,src/ios.json,../common/src/$make_json,../common/src/ios-make.json $TIBIA_DIR/templates/ios-make ios && cd .. echo "include ../../common/ios/Makefile" > $d/ios/Makefile done