Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. .PHONY : SharpieBinder
  19. Android_armeabi:
  20. make -j1 libmono-urho.so -f MakeAndroid ABI="armeabi"
  21. Android_armeabi-v7a:
  22. make -j1 libmono-urho.so -f MakeAndroid ABI="armeabi-v7a"
  23. Android_x86:
  24. make -j1 libmono-urho.so -f MakeAndroid ABI="x86"
  25. Android_x86_64:
  26. make -j1 libmono-urho.so -f MakeAndroid ABI="x86_64"
  27. Android_arm64-v8a:
  28. make -j1 libmono-urho.so -f MakeAndroid ABI="arm64-v8a"
  29. # Make -j4 Android
  30. Android: Android_x86_64 Android_x86 Android_armeabi Android_armeabi-v7a Android_arm64-v8a
  31. Mac:
  32. make -j1 libmono-urho.dylib -f MakeMac
  33. iOS:
  34. make -j1 Urho.framework -f MakeiOS
  35. tvOS:
  36. make -j1 fat-libmono-urho.dylib -f MaketvOS
  37. Windows32:
  38. make -j1 libUrho3D.a -f MakeWindows TARGET="Visual Studio 14" RENDERER=OPENGL
  39. Windows64:
  40. make -j1 libUrho3D.a -f MakeWindows TARGET="Visual Studio 14 Win64" RENDERER=OPENGL
  41. Windows32_D3D11:
  42. make -j1 libUrho3D.a -f MakeWindows TARGET="Visual Studio 14" RENDERER=D3D11
  43. Windows64_D3D11:
  44. make -j1 libUrho3D.a -f MakeWindows TARGET="Visual Studio 14 Win64" RENDERER=D3D11
  45. UWP32:
  46. make -j1 libUrho3D.a -f MakeUWP TARGET="Visual Studio 14"
  47. HoloLens:
  48. make -j1 libUrho3D.a -f MakeHoloLens TARGET="Visual Studio 14"
  49. Windows: Windows32 Windows64
  50. All-Macos: Android Mac iOS
  51. All-Windows: Android Windows
  52. UpdateCoreDataPak:
  53. make -j1 CoreData.pak -f MakeWindows
  54. $(LOCAL_CLANG):
  55. if test ! -e clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz; then curl -O http://llvm.org/releases/3.7.0/clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz; fi
  56. tar xzvf clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz
  57. #compile Urho.pch for SharpieBinder on Mac
  58. PchMac: $(LOCAL_CLANG)
  59. if test ! -e /usr/include; then xcode-select --install; fi
  60. make -j1 Urho3D_Mac -f MakeMac && $(CUSTOM_CLANG) -cc1 -emit-pch -DURHO3D_OPENGL -o Bindings/Urho.pch Bindings/Native/all-urho.cpp -IUrho3D/Urho3D_Mac/include -IUrho3D/Urho3D_Mac/include/Urho3D/ThirdParty
  61. SharpieBinder: Bindings/Urho.pch
  62. cd SharpieBinder && $(NUGET) restore SharpieBinder.sln && $(XBUILD) SharpieBinder.csproj && cd bin && $(MONO64) SharpieBinder.exe
  63. ParseEventsMac:
  64. @if test ! -d Bindings/Portable/Generated; then echo "Please generate the C# files using SharpieBinder or use 'make SharpieBinder'" && exit 1; fi
  65. cd Bindings && perl ParseEvents.pl ../Urho3D/Urho3D_Mac/include/Urho3d/*/*h
  66. Generated: PchMac SharpieBinder ParseEventsMac
  67. refresh-docs: Generated
  68. xbuild /target:clean bindings/Urho.Desktop.csproj
  69. xbuild bindings/Urho.Desktop.csproj
  70. (cd docs; make update)