Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. # Make -j3 Android
  21. Android: Android_armeabi Android_armeabi-v7a Android_x86
  22. Mac:
  23. make -j1 libmono-urho.dylib -f MakeMac
  24. iOS:
  25. make -j1 Urho.framework -f MakeiOS
  26. tvOS:
  27. make -j1 fat-libmono-urho.dylib -f MaketvOS
  28. Windows32:
  29. make -j1 libUrho3D.a -f MakeWindows TARGET="Visual Studio 14" && make -j1 CoreData.pak -f MakeWindows
  30. Windows64:
  31. make -j1 libUrho3D.a -f MakeWindows TARGET="Visual Studio 14 Win64" && make -j1 CoreData.pak -f MakeWindows
  32. Windows: Windows32 Windows64
  33. All-Macos: Android Mac iOS
  34. All-Windows: Android Windows
  35. $(LOCAL_CLANG):
  36. 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
  37. tar xzvf clang+llvm-3.7.0-x86_64-apple-darwin.tar.xz
  38. #compile Urho.pch for SharpieBinder on Mac
  39. PchMac: $(LOCAL_CLANG)
  40. if test ! -e /usr/include; then xcode-select --install; fi
  41. make -j1 Urho3D_Mac -f MakeMac && $(CUSTOM_CLANG) -cc1 -emit-pch -o bindings/Urho.pch bindings/Native/all-urho.cpp -IUrho3D/Urho3D_Mac/include -IUrho3D/Urho3D_Mac/include/Urho3D/ThirdParty
  42. SharpieBinder: bindings/Urho.pch
  43. cd SharpieBinder && $(NUGET) restore SharpieBinder.sln && $(BREW_XBUILD) SharpieBinder.csproj && cd bin && $(BREW_MONO) SharpieBinder.exe
  44. ParseEventsMac:
  45. @if test ! -d bindings/Portable/Generated; then echo "Please generate the C# files using SharpieBinder or use 'make SharpieBinder'" && exit 1; fi
  46. cd bindings && perl ParseEvents.pl ../Urho3D/Urho3D_Mac/include/Urho3d/*/*h
  47. # change references from nuget to projectreferences for Samples/
  48. RemoveNugetFromSamples:
  49. csc bindings/RemoveNugetFromSamples.cs && ./RemoveNugetFromSamples.exe -refsonly && rm -f RemoveNugetFromSamples.exe
  50. # change references from nuget to projectreferences for Samples/
  51. RemoveNugetFromSamplesMono:
  52. mcs bindings/RemoveNugetFromSamples.cs -r:System.Xml.dll -r:System.Xml.Linq.dll && mono RemoveNugetFromSamples.exe -refsonly && rm -f bindings/RemoveNugetFromSamples.exe