makefile 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. UNAME := $(shell uname)
  2. ifeq ($(UNAME), $(filter $(UNAME), Linux))
  3. OS=linux
  4. else
  5. OS=windows
  6. endif
  7. PREMAKE=bin/$(OS)/premake4
  8. luajit-linux32:
  9. make -R -C third/luajit CC="gcc -m32" BUILDMODE="static"
  10. luajit-linux64:
  11. make -R -C third/luajit CC="gcc -m64" BUILDMODE="static"
  12. luajit-windows32:
  13. cd third/luajit/src && msvcbuild
  14. luajit-windows64:
  15. cd third/luajit/src && msvcbuild
  16. luajit-arm:
  17. make -R -C third/luajit HOST_CC="gcc -m32" \
  18. CROSS=$(ANDROID_NDK_ARM)/bin/arm-linux-androideabi- \
  19. TARGET_FLAGS="--sysroot $(ANDROID_NDK_ROOT)/platforms/android-14/arch-arm \
  20. -march=armv7-a -mfloat-abi=softfp -Wl,--fix-cortex-a8"
  21. luajit-clean:
  22. make -R -C third/luajit clean
  23. bgfx-linux-debug32:
  24. make -R -C third/bgfx linux-debug32
  25. bgfx-linux-debug64:
  26. make -R -C third/bgfx linux-debug64
  27. bgfx-linux-release32:
  28. make -R -C third/bgfx linux-release32
  29. bgfx-linux-release64:
  30. make -R -C third/bgfx linux-release64
  31. bgfx-vs2008-debug32:
  32. make -R -C third/bgfx && make -R -C third/bgfx vs2008-debug32
  33. bgfx-vs2008-release32:
  34. make -R -C third/bgfx && make -R -C third/bgfx vs2008-release32
  35. bgfx-vs2008-debug64:
  36. make -R -C third/bgfx && make -R -C third/bgfx vs2008-debug64
  37. bgfx-vs2008-release64:
  38. make -R -C third/bgfx && make -R -C third/bgfx vs2008-release64
  39. bgfx-android-arm:
  40. make -R -C third/bgfx android-arm-release
  41. bgfx-clean:
  42. make -R -C third/bgfx clean
  43. deps-linux-debug32: luajit-linux32 bgfx-linux-debug32
  44. deps-linux-debug64: luajit-linux64 bgfx-linux-debug64
  45. deps-linux-release32: luajit-linux32 bgfx-linux-release32
  46. deps-linux-release64: luajit-linux64 bgfx-linux-release64
  47. deps-windows-debug32: luajit-windows32 bgfx-vs2008-debug32
  48. deps-windows-debug64: luajit-windows64 bgfx-vs2008-debug64
  49. deps-windows-release32: luajit-windows32 bgfx-vs2008-release32
  50. deps-windows-release64: luajit-windows64 bgfx-vs2008-release64
  51. deps-android-arm: luajit-arm bgfx-android-arm
  52. deps-clean: luajit-clean bgfx-clean
  53. linux-build:
  54. $(PREMAKE) --file=premake/premake4.lua --compiler=linux-gcc gmake
  55. linux-debug32: deps-linux-debug32 linux-build
  56. make -R -C .build/linux config=debug32
  57. linux-development32: deps-linux-debug32 linux-build
  58. make -R -C .build/linux config=development32
  59. linux-release32: deps-linux-release32 linux-build
  60. make -R -C .build/linux config=release32
  61. linux-debug64: deps-linux-debug64 linux-build
  62. make -R -C .build/linux config=debug64
  63. linux-development64: deps-linux-debug64 linux-build
  64. make -R -C .build/linux config=development64
  65. linux-release64: deps-linux-release64 linux-build
  66. make -R -C .build/linux config=release64
  67. linux: linux-debug32 linux-development32 linux-release32 linux-debug64 linux-development64 linux-release64
  68. android-build:
  69. $(PREMAKE) --file=premake/premake4.lua --compiler=android gmake
  70. android-debug: deps-android-arm android-build
  71. make -R -C .build/android config=debug
  72. android-development: deps-android-arm android-build
  73. make -R -C .build/android config=development
  74. android-release: deps-android-arm android-build
  75. make -R -C .build/android config=release
  76. android: android-debug android-development android-release
  77. windows-build:
  78. $(PREMAKE) --file=premake\premake4.lua vs2012
  79. windows-debug32: windows-build
  80. devenv .build/windows/crown.sln /Build "debug|x32"
  81. windows-development32: deps-windows-debug32 windows-build
  82. devenv .build/windows/crown.sln /Build "development|x32"
  83. windows-release32: deps-windows-release32 windows-build
  84. devenv .build/windows/crown.sln /Build "release|x32"
  85. windows-debug64: deps-windows-debug64 windows-build
  86. devenv .build/windows/crown.sln /Build "debug|x64"
  87. windows-development64: deps-windows-debug64 windows-build
  88. devenv .build/windows/crown.sln /Build "development|x64"
  89. windows-release64: deps-windows-release64 windows-build
  90. devenv .build/windows/crown.sln /Build "release|x64"
  91. docs:
  92. doxygen Doxyfile.doxygen
  93. cp -r .build/documentation $(CROWN_INSTALL_DIR)
  94. clean: deps-clean
  95. @echo Cleaning...
  96. @rm -rf .build
  97. @rm -rf .installation
  98. starter:
  99. xbuild /p:OutputPath=$(CROWN_INSTALL_DIR)/tools tools/gui/starter/starter.sln
  100. console:
  101. xbuild /p:OutputPath=$(CROWN_INSTALL_DIR)/tools tools/gui/console/console.sln
  102. tools: starter console