Makefile 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. # change references from nuget to projectreferences for Samples/
  68. RemoveNugetFromSamples:
  69. csc Bindings/RemoveNugetFromSamples.cs && ./RemoveNugetFromSamples.exe -refsonly && rm -f RemoveNugetFromSamples.exe
  70. # change references from nuget to projectreferences for Samples/
  71. RemoveNugetFromSamplesMono:
  72. mcs Bindings/RemoveNugetFromSamples.cs -r:System.Xml.dll -r:System.Xml.Linq.dll && mono RemoveNugetFromSamples.exe -refsonly && rm -f Bindings/RemoveNugetFromSamples.exe
  73. refresh-docs: Generated
  74. xbuild /target:clean bindings/Urho.Desktop.csproj
  75. xbuild bindings/Urho.Desktop.csproj
  76. (cd docs; make update)