Makefile 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. BREW_MONO_PREFIX=$(shell brew --prefix mono)
  9. BREW_MONO=$(BREW_MONO_PREFIX)/bin/mono
  10. BREW_XBUILD=$(BREW_MONO_PREFIX)/bin/xbuild
  11. NUGET=$(BREW_MONO) ../Nuget/.nuget/Nuget.exe
  12. endif
  13. .PHONY : SharpieBinder
  14. Android_armeabi:
  15. make -j1 libmono-urho.so -f MakeAndroid ABI="armeabi"
  16. Android_armeabi-v7a:
  17. make -j1 libmono-urho.so -f MakeAndroid ABI="armeabi-v7a"
  18. Android_x86:
  19. make -j1 libmono-urho.so -f MakeAndroid ABI="x86"
  20. Android_x86_64:
  21. make -j1 libmono-urho.so -f MakeAndroid ABI="x86_64"
  22. Android_arm64-v8a:
  23. make -j1 libmono-urho.so -f MakeAndroid ABI="arm64-v8a"
  24. # Make -j4 Android
  25. Android: Android_x86_64 Android_x86 Android_armeabi Android_armeabi-v7a Android_arm64-v8a
  26. Mac:
  27. make -j1 libmono-urho.dylib -f MakeMac
  28. iOS:
  29. make -j1 Urho.framework -f MakeiOS
  30. tvOS:
  31. make -j1 fat-libmono-urho.dylib -f MaketvOS
  32. Windows32:
  33. make -j1 libUrho3D.a -f MakeWindows TARGET="Visual Studio 14" RENDERER=OPENGL && make -j1 CoreData.pak -f MakeWindows
  34. Windows64:
  35. make -j1 libUrho3D.a -f MakeWindows TARGET="Visual Studio 14 Win64" RENDERER=OPENGL && make -j1 CoreData.pak -f MakeWindows
  36. UWP32:
  37. make -j1 libUrho3D.a -f MakeUWP TARGET="Visual Studio 14"
  38. UWP64:
  39. make -j1 libUrho3D.a -f MakeUWP TARGET="Visual Studio 14 Win64"
  40. Windows: Windows32 Windows64
  41. All-Macos: Android Mac iOS
  42. All-Windows: Android Windows
  43. $(LOCAL_CLANG):
  44. 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
  45. tar xzvf clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz
  46. #compile Urho.pch for SharpieBinder on Mac
  47. PchMac: $(LOCAL_CLANG)
  48. if test ! -e /usr/include; then xcode-select --install; fi
  49. 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
  50. SharpieBinder: Bindings/Urho.pch
  51. cd SharpieBinder && $(NUGET) restore SharpieBinder.sln && $(BREW_XBUILD) SharpieBinder.csproj && cd bin && $(BREW_MONO) SharpieBinder.exe
  52. ParseEventsMac:
  53. @if test ! -d Bindings/Portable/Generated; then echo "Please generate the C# files using SharpieBinder or use 'make SharpieBinder'" && exit 1; fi
  54. cd Bindings && perl ParseEvents.pl ../Urho3D/Urho3D_Mac/include/Urho3d/*/*h
  55. Generated: PchMac SharpieBinder ParseEventsMac
  56. # change references from nuget to projectreferences for Samples/
  57. RemoveNugetFromSamples:
  58. csc Bindings/RemoveNugetFromSamples.cs && ./RemoveNugetFromSamples.exe -refsonly && rm -f RemoveNugetFromSamples.exe
  59. # change references from nuget to projectreferences for Samples/
  60. RemoveNugetFromSamplesMono:
  61. mcs Bindings/RemoveNugetFromSamples.cs -r:System.Xml.dll -r:System.Xml.Linq.dll && mono RemoveNugetFromSamples.exe -refsonly && rm -f Bindings/RemoveNugetFromSamples.exe
  62. refresh-docs:
  63. make PchMac
  64. make ParseEventsMac
  65. xbuild /target:clean bindings/Urho.Desktop.csproj
  66. xbuild bindings/Urho.Desktop.csproj
  67. (cd docs; make update)