Created
February 1, 2017 11:48
-
-
Save aktowns/3f8f44560efd16006f96dc30ff518203 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/MakeLinux b/MakeLinux | |
new file mode 100644 | |
index 0000000..8003e53 | |
--- /dev/null | |
+++ b/MakeLinux | |
@@ -0,0 +1,34 @@ | |
+URHO3D_SRC_DIR=Urho3D/Source | |
+URHO3D_LINUX_DIR=Urho3D/Urho3D_Linux | |
+OUTPUT_DIR=Bin/Desktop | |
+ | |
+URHO_FLAGS=-I$(URHO3D_LINUX_DIR)/include -I$(URHO3D_LINUX_DIR)/include/kNet -I$(URHO3D_LINUX_DIR)/include/Urho3D/ThirdParty -DURHO3D_OPENGL | |
+URHO_LIBS=-L$(URHO3D_LINUX_DIR)/lib -lUrho3D -ldl -lpthread -lGL | |
+CXXFLAGS=-g -fPIC -Wno-address-of-temporary -Wno-return-type-c-linkage -Wno-c++11-extensions $(URHO_FLAGS) | |
+ | |
+Urho3D_Linux: | |
+ $(URHO3D_SRC_DIR)/./cmake_generic.sh $(URHO3D_LINUX_DIR) -DURHO3D_PCH=0 -DURHO3D_TOOLS=0 -DURHO3D_LUA=0 -DURHO3D_ANGELSCRIPT=0 -DURHO3D_LIB_TYPE=STATIC -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC | |
+ | |
+libUrho3D.a: Urho3D_Linux | |
+ cd $(URHO3D_LINUX_DIR) && make | |
+ | |
+libmono-urho.so: MakeBinDirectory libUrho3D.a binding.o glue.o events.o ApplicationProxy.o vector.o | |
+ mkdir -p $(OUTPUT_DIR) && clang++ -g -shared -Wl,-soname,libmono-urho -Wl,-rpath -Wl,\$$ORIGIN -o $(OUTPUT_DIR)/libmono-urho.so -g -DURHO3D_OPENGL $(OUTPUT_DIR)/binding.o $(OUTPUT_DIR)/glue.o $(OUTPUT_DIR)/vector.o $(OUTPUT_DIR)/events.o $(OUTPUT_DIR)/ApplicationProxy.o $(URHO_LIBS) | |
+ | |
+MakeBinDirectory: | |
+ mkdir -p $(OUTPUT_DIR) | |
+ | |
+binding.o: | |
+ clang++ -g -c $(CXXFLAGS) -o $(OUTPUT_DIR)/binding.o Bindings/Portable/Generated/binding.cpp | |
+ | |
+glue.o: | |
+ clang++ -c $(CXXFLAGS) -o $(OUTPUT_DIR)/glue.o Bindings/Native/glue.cpp | |
+ | |
+vector.o: | |
+ clang++ -c $(CXXFLAGS) -o $(OUTPUT_DIR)/vector.o Bindings/Native/vector.cpp | |
+ | |
+events.o: | |
+ clang++ -c $(CXXFLAGS) -o $(OUTPUT_DIR)/events.o Bindings/Portable/Generated/events.cpp | |
+ | |
+ApplicationProxy.o: | |
+ clang++ -c $(CXXFLAGS) -o $(OUTPUT_DIR)/ApplicationProxy.o Bindings/Native/ApplicationProxy.cpp | |
diff --git a/Makefile b/Makefile | |
index ec4064a..e6366a7 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -1,4 +1,4 @@ | |
-#download clang 3.7 from here: http://llvm.org/releases/download.html | |
+#download clang 3.7 from here: http://llvm.org/releases/download.html | |
#CUSTOM_CLANG=/tools/clang370/bin/clang | |
LOCAL_CLANG=clang+llvm-3.7.0-x86_64-apple-darwin/bin/clang | |
CUSTOM_CLANG=`pwd`/$(LOCAL_CLANG) | |
@@ -35,6 +35,9 @@ Android: Android_x86_64 Android_x86 Android_armeabi Android_armeabi-v7a Android_ | |
Mac: | |
make -j1 libmono-urho.dylib -f MakeMac | |
+Linux: | |
+ make -j1 libmono-urho.so -f MakeLinux | |
+ | |
iOS: | |
make -j1 Urho.framework -f MakeiOS | |
@@ -50,10 +53,10 @@ Windows32_D3D11: | |
make -j1 libUrho3D.a -f MakeWindows TARGET="Visual Studio 14" RENDERER=D3D11 | |
Windows64_D3D11: | |
make -j1 libUrho3D.a -f MakeWindows TARGET="Visual Studio 14 Win64" RENDERER=D3D11 | |
- | |
+ | |
UWP32: | |
make -j1 libUrho3D.a -f MakeUWP TARGET="Visual Studio 14" | |
- | |
+ | |
HoloLens: | |
make -j1 libUrho3D.a -f MakeHoloLens TARGET="Visual Studio 14" | |
@@ -66,7 +69,7 @@ All-Windows: Android Windows | |
UpdateCoreDataPak: | |
make -j1 CoreData.pak -f MakeWindows | |
-$(LOCAL_CLANG): | |
+$(LOCAL_CLANG): | |
if test ! -e clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz; then curl -O http://releases.llvm.org/3.7.0/clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz; fi | |
tar xzvf clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz | |
@@ -83,7 +86,7 @@ ParseEventsMac: | |
cd Bindings && perl ParseEvents.pl ../Urho3D/Urho3D_Mac/include/Urho3d/*/*h | |
Generated: PchMac SharpieBinder ParseEventsMac | |
- | |
+ | |
refresh-docs: Generated | |
xbuild /target:clean bindings/Urho.Desktop.csproj | |
xbuild bindings/Urho.Desktop.csproj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment