Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #download clang 3.7 from here: http://llvm.org/releases/download.html
  2. #CUSTOM_CLANG=/tools/clang370/bin/clang
  3. LOCAL_CLANG=clang+llvm-3.7.0-x86_64-apple-darwin/bin/clang
  4. CUSTOM_CLANG=`pwd`/$(LOCAL_CLANG)
  5. ifeq (, $(shell which brew))
  6. # Running on Windows, let's not care.
  7. else
  8. ifeq (, $(shell which mono64))
  9. # Use default mono installation.
  10. MONO64=mono64
  11. XBUILD=xbuild
  12. else
  13. MONO64=mono64
  14. XBUILD=xbuild
  15. endif
  16. NUGET=$(MONO64) ../Nuget/.nuget/Nuget.exe
  17. endif
  18. ifeq ($(OS),Windows_NT)
  19. OSNAME=Windows
  20. else
  21. OSNAME=Mac
  22. endif
  23. .PHONY : SharpieBinder
  24. Android_armeabi:
  25. make -j1 libmono-urho.so -f MakeAndroid ABI="armeabi"
  26. Android_armeabi-v7a:
  27. make -j1 libmono-urho.so -f MakeAndroid ABI="armeabi-v7a"
  28. Android_x86:
  29. make -j1 libmono-urho.so -f MakeAndroid ABI="x86"
  30. Android_x86_64:
  31. make -j1 libmono-urho.so -f MakeAndroid ABI="x86_64"
  32. Android_arm64-v8a:
  33. make -j1 libmono-urho.so -f MakeAndroid ABI="arm64-v8a"
  34. # Make -j4 Android
  35. Android: Android_x86_64 Android_x86 Android_armeabi Android_armeabi-v7a Android_arm64-v8a
  36. Mac:
  37. make -j1 libmono-urho.dylib -f MakeMac
  38. iOS:
  39. make -j1 Urho.framework -f MakeiOS
  40. tvOS:
  41. make -j1 fat-libmono-urho.dylib -f MaketvOS
  42. Windows: Windows32 Windows64
  43. Windows32:
  44. make -j1 libUrho3D.a -f MakeWindows ARCH="Win32" RENDERER=OPENGL
  45. Windows64:
  46. make -j1 libUrho3D.a -f MakeWindows ARCH="Win64" RENDERER=OPENGL
  47. Windows_D3D11: Windows32_D3D11 Windows64_D3D11
  48. Windows32_D3D11:
  49. make -j1 libUrho3D.a -f MakeWindows ARCH="Win32" RENDERER=D3D11
  50. Windows64_D3D11:
  51. make -j1 libUrho3D.a -f MakeWindows ARCH="Win64" RENDERER=D3D11
  52. UWP: UWP32 UWP64
  53. UWP32:
  54. make -j1 libUrho3D.a -f MakeUWP ARCH=x86
  55. UWP64:
  56. make -j1 libUrho3D.a -f MakeUWP ARCH=x64
  57. SharpReality: SharpReality32 SharpReality64
  58. SharpReality32:
  59. make -j1 libUrho3D.a -f MakeSharpReality ARCH=x86
  60. SharpReality64:
  61. make -j1 libUrho3D.a -f MakeSharpReality ARCH=x64
  62. HoloLens32: HoloLens
  63. HoloLens64: HoloLens
  64. HoloLens:
  65. @echo "HoloLens was renamed to SharpReality"
  66. All-Macos: Android Mac iOS
  67. All-Windows: Windows Windows_D3D11 UWP SharpReality
  68. UpdateCoreDataPak:
  69. make -j1 CoreData.pak -f MakeWindows
  70. Tools:
  71. make -j1 Tools -f Make$(OSNAME)
  72. Linux:
  73. make -j1 libmono-urho.so -f MakeLinux
  74. $(LOCAL_CLANG):
  75. 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
  76. tar xzvf clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz
  77. #compile Urho.pch for SharpieBinder on Mac
  78. PchMac: $(LOCAL_CLANG)
  79. if test ! -e /usr/include; then xcode-select --install; fi
  80. make -j1 Urho3D_Mac -f MakeMac && $(CUSTOM_CLANG) -cc1 -stdlib=libc++ -std=c++0x -emit-pch -DURHO3D_OPENGL -DURHO3D_CXX11=1 -o Bindings/Urho.pch Bindings/Native/all-urho.cpp -IUrho3D/Urho3D_Mac/include -IUrho3D/Urho3D_Mac/include/Urho3D/ThirdParty
  81. SharpieBinder: Bindings/Urho.pch
  82. cd SharpieBinder && $(NUGET) restore SharpieBinder.sln && $(XBUILD) SharpieBinder.csproj && cd bin && $(MONO64) SharpieBinder.exe
  83. ParseEventsMac:
  84. @if test ! -d Bindings/Portable/Generated; then echo "Please generate the C# files using SharpieBinder or use 'make SharpieBinder'" && exit 1; fi
  85. cd Bindings && perl ParseEvents.pl ../Urho3D/Urho3D_Mac/include/Urho3d/*/*h
  86. Generated: PchMac SharpieBinder ParseEventsMac
  87. refresh-docs: Generated
  88. xbuild /target:clean bindings/Desktop/Urho.Desktop.csproj
  89. xbuild bindings/Desktop/Urho.Desktop.csproj
  90. (cd docs; make update)