makefile 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. #
  2. # Copyright 2011-2017 Branimir Karadzic. All rights reserved.
  3. # License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
  4. #
  5. UNAME := $(shell uname)
  6. ifeq ($(UNAME),$(filter $(UNAME),Linux Darwin FreeBSD GNU/kFreeBSD))
  7. ifeq ($(UNAME),$(filter $(UNAME),Darwin))
  8. OS=darwin
  9. else
  10. ifeq ($(UNAME),$(filter $(UNAME),FreeBSD GNU/kFreeBSD))
  11. OS=bsd
  12. else
  13. OS=linux
  14. endif
  15. endif
  16. else
  17. OS=windows
  18. help: projgen
  19. endif
  20. # $(info $(OS))
  21. BX_DIR?=../bx
  22. GENIE?=$(BX_DIR)/tools/bin/$(OS)/genie
  23. NINJA?=$(BX_DIR)/tools/bin/$(OS)/ninja
  24. .PHONY: help
  25. help:
  26. @echo Available targets:
  27. @grep -E "^[a-zA-Z0-9_-]+:.*?## .*$$" $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
  28. clean: ## Clean all intermediate files.
  29. @echo Cleaning...
  30. -@rm -rf .build
  31. @mkdir .build
  32. projgen: ## Generate project files for all configurations.
  33. $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2012
  34. $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2013
  35. $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2015
  36. $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2017
  37. $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=mingw-gcc gmake
  38. $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake
  39. $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx gmake
  40. $(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=osx xcode4
  41. $(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=ios xcode4
  42. $(GENIE) --with-combined-examples --with-shared-lib --gcc=freebsd gmake
  43. $(GENIE) --with-combined-examples --gcc=android-arm gmake
  44. $(GENIE) --with-combined-examples --gcc=android-mips gmake
  45. $(GENIE) --with-combined-examples --gcc=android-x86 gmake
  46. $(GENIE) --with-combined-examples --gcc=asmjs gmake
  47. $(GENIE) --with-combined-examples --gcc=ios-arm gmake
  48. $(GENIE) --with-combined-examples --gcc=ios-arm64 gmake
  49. $(GENIE) --with-combined-examples --gcc=ios-simulator gmake
  50. $(GENIE) --with-combined-examples --gcc=rpi gmake
  51. .build/projects/gmake-android-arm:
  52. $(GENIE) --gcc=android-arm gmake
  53. android-arm-debug: .build/projects/gmake-android-arm ## Build - Android ARM Debug
  54. $(MAKE) -R -C .build/projects/gmake-android-arm config=debug
  55. android-arm-release: .build/projects/gmake-android-arm ## Build - Android ARM Release
  56. $(MAKE) -R -C .build/projects/gmake-android-arm config=release
  57. android-arm: android-arm-debug android-arm-release ## Build - Android ARM Debug and Release
  58. .build/projects/gmake-android-mips:
  59. $(GENIE) --gcc=android-mips gmake
  60. android-mips-debug: .build/projects/gmake-android-mips ## Build - Android MIPS Debug
  61. $(MAKE) -R -C .build/projects/gmake-android-mips config=debug
  62. android-mips-release: .build/projects/gmake-android-mips ## Build - Android MIPS Release
  63. $(MAKE) -R -C .build/projects/gmake-android-mips config=release
  64. android-mips: android-mips-debug android-mips-release ## Build - Android MIPS Debug and Release
  65. .build/projects/gmake-android-x86:
  66. $(GENIE) --gcc=android-x86 gmake
  67. android-x86-debug: .build/projects/gmake-android-x86 ## Build - Android x86 Debug and Release
  68. $(MAKE) -R -C .build/projects/gmake-android-x86 config=debug
  69. android-x86-release: .build/projects/gmake-android-x86 ## Build - Android x86 Debug and Release
  70. $(MAKE) -R -C .build/projects/gmake-android-x86 config=release
  71. android-x86: android-x86-debug android-x86-release ## Build - Android x86 Debug and Release
  72. .build/projects/gmake-asmjs:
  73. $(GENIE) --gcc=asmjs gmake
  74. asmjs-debug: .build/projects/gmake-asmjs ## Build - Emscripten Debug
  75. $(MAKE) -R -C .build/projects/gmake-asmjs config=debug
  76. asmjs-release: .build/projects/gmake-asmjs ## Build - Emscripten Release
  77. $(MAKE) -R -C .build/projects/gmake-asmjs config=release
  78. asmjs: asmjs-debug asmjs-release ## Build - Emscripten Debug and Release
  79. .build/projects/gmake-linux:
  80. $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake
  81. linux-debug32: .build/projects/gmake-linux ## Build - Linux x86 Debug
  82. $(MAKE) -R -C .build/projects/gmake-linux config=debug32
  83. linux-release32: .build/projects/gmake-linux ## Build - Linux x86 Release
  84. $(MAKE) -R -C .build/projects/gmake-linux config=release32
  85. linux-debug64: .build/projects/gmake-linux ## Build - Linux x64 Debug
  86. $(MAKE) -R -C .build/projects/gmake-linux config=debug64
  87. linux-release64: .build/projects/gmake-linux ## Build - Linux x64 Release
  88. $(MAKE) -R -C .build/projects/gmake-linux config=release64
  89. linux: linux-debug32 linux-release32 linux-debug64 linux-release64 ## Build - Linux x86/x64 Debug and Release
  90. .build/projects/gmake-freebsd:
  91. $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=freebsd gmake
  92. freebsd-debug32: .build/projects/gmake-freebsd ## Build - FreeBSD x86 Debug
  93. $(MAKE) -R -C .build/projects/gmake-freebsd config=debug32
  94. freebsd-release32: .build/projects/gmake-freebsd ## Build - FreeBSD x86 Release
  95. $(MAKE) -R -C .build/projects/gmake-freebsd config=release32
  96. freebsd-debug64: .build/projects/gmake-freebsd ## Build - FreeBSD x86 Debug
  97. $(MAKE) -R -C .build/projects/gmake-freebsd config=debug64
  98. freebsd-release64: .build/projects/gmake-freebsd ## Build - FreeBSD x86 Release
  99. $(MAKE) -R -C .build/projects/gmake-freebsd config=release64
  100. freebsd: freebsd-debug32 freebsd-release32 freebsd-debug64 freebsd-release64 ## Build - FreeBSD x86/x64 Debug and Release
  101. .build/projects/gmake-mingw-gcc:
  102. $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=mingw-gcc gmake
  103. mingw-gcc-debug32: .build/projects/gmake-mingw-gcc ## Build - MinGW GCC x86 Debug
  104. $(MAKE) -R -C .build/projects/gmake-mingw-gcc config=debug32
  105. mingw-gcc-release32: .build/projects/gmake-mingw-gcc ## Build - MinGW GCC x86 Release
  106. $(MAKE) -R -C .build/projects/gmake-mingw-gcc config=release32
  107. mingw-gcc-debug64: .build/projects/gmake-mingw-gcc ## Build - MinGW GCC x64 Debug
  108. $(MAKE) -R -C .build/projects/gmake-mingw-gcc config=debug64
  109. mingw-gcc-release64: .build/projects/gmake-mingw-gcc ## Build - MinGW GCC x64 Release
  110. $(MAKE) -R -C .build/projects/gmake-mingw-gcc config=release64
  111. mingw-gcc: mingw-gcc-debug32 mingw-gcc-release32 mingw-gcc-debug64 mingw-gcc-release64 ## Build - MinGW GCC x86/x64 Debug and Release
  112. .build/projects/gmake-mingw-clang:
  113. $(GENIE) --gcc=mingw-clang gmake
  114. mingw-clang-debug32: .build/projects/gmake-mingw-clang ## Build - MinGW Clang x86 Debug
  115. $(MAKE) -R -C .build/projects/gmake-mingw-clang config=debug32
  116. mingw-clang-release32: .build/projects/gmake-mingw-clang ## Build - MinGW Clang x86 Release
  117. $(MAKE) -R -C .build/projects/gmake-mingw-clang config=release32
  118. mingw-clang-debug64: .build/projects/gmake-mingw-clang ## Build - MinGW Clang x64 Debug
  119. $(MAKE) -R -C .build/projects/gmake-mingw-clang config=debug64
  120. mingw-clang-release64: .build/projects/gmake-mingw-clang ## Build - MinGW Clang x64 Release
  121. $(MAKE) -R -C .build/projects/gmake-mingw-clang config=release64
  122. mingw-clang: mingw-clang-debug32 mingw-clang-release32 mingw-clang-debug64 mingw-clang-release64 ## Build - MinGW Clang x86/x64 Debug and Release
  123. .build/projects/vs2012:
  124. $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2012
  125. vs2012-debug32: .build/projects/vs2012 ## Build - VS2012 x86 Debug
  126. devenv .build/projects/vs2012/bgfx.sln /Build "Debug|Win32"
  127. vs2012-release32: .build/projects/vs2012 ## Build - VS2012 x86 Release
  128. devenv .build/projects/vs2012/bgfx.sln /Build "Release|Win32"
  129. vs2012-debug64: .build/projects/vs2012 ## Build - VS2012 x64 Debug
  130. devenv .build/projects/vs2012/bgfx.sln /Build "Debug|x64"
  131. vs2012-release64: .build/projects/vs2012 ## Build - VS2012 x64 Release
  132. devenv .build/projects/vs2012/bgfx.sln /Build "Release|x64"
  133. vs2012: vs2012-debug32 vs2012-release32 vs2012-debug64 vs2012-release64 ## Build - VS2012 x86/x64 Debug and Release
  134. .build/projects/vs2013:
  135. $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2013
  136. vs2013-debug32: .build/projects/vs2013 ## Build - VS2013 x86 Debug
  137. devenv .build/projects/vs2013/bgfx.sln /Build "Debug|Win32"
  138. vs2013-release32: .build/projects/vs2013 ## Build - VS2013 x86 Release
  139. devenv .build/projects/vs2013/bgfx.sln /Build "Release|Win32"
  140. vs2013-debug64: .build/projects/vs2013 ## Build - VS2013 x64 Debug
  141. devenv .build/projects/vs2013/bgfx.sln /Build "Debug|x64"
  142. vs2013-release64: .build/projects/vs2013 ## Build - VS2013 x64 Release
  143. devenv .build/projects/vs2013/bgfx.sln /Build "Release|x64"
  144. vs2013: vs2013-debug32 vs2013-release32 vs2013-debug64 vs2013-release64 ## Build - VS2013 x86/x64 Debug and Release
  145. .build/projects/vs2015:
  146. $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2015
  147. vs2015-debug32: .build/projects/vs2015 ## Build - VS2015 x86 Debug
  148. devenv .build/projects/vs2015/bgfx.sln /Build "Debug|Win32"
  149. vs2015-release32: .build/projects/vs2015 ## Build - VS2015 x86 Release
  150. devenv .build/projects/vs2015/bgfx.sln /Build "Release|Win32"
  151. vs2015-debug64: .build/projects/vs2015 ## Build - VS2015 x64 Debug
  152. devenv .build/projects/vs2015/bgfx.sln /Build "Debug|x64"
  153. vs2015-release64: .build/projects/vs2015 ## Build - VS2015 x64 Release
  154. devenv .build/projects/vs2015/bgfx.sln /Build "Release|x64"
  155. vs2015: vs2015-debug32 vs2015-release32 vs2015-debug64 vs2015-release64 ## Build - VS2015 x86/x64 Debug and Release
  156. .build/projects/vs2017:
  157. $(GENIE) --with-tools --with-combined-examples --with-shared-lib vs2017
  158. vs2017-debug32: .build/projects/vs2017 ## Build - vs2017 x86 Debug
  159. devenv .build/projects/vs2017/bgfx.sln /Build "Debug|Win32"
  160. vs2017-release32: .build/projects/vs2017 ## Build - vs2017 x86 Release
  161. devenv .build/projects/vs2017/bgfx.sln /Build "Release|Win32"
  162. vs2017-debug64: .build/projects/vs2017 ## Build - vs2017 x64 Debug
  163. devenv .build/projects/vs2017/bgfx.sln /Build "Debug|x64"
  164. vs2017-release64: .build/projects/vs2017 ## Build - vs2017 x64 Release
  165. devenv .build/projects/vs2017/bgfx.sln /Build "Release|x64"
  166. vs2017: vs2017-debug32 vs2017-release32 vs2017-debug64 vs2017-release64 ## Build - vs2017 x86/x64 Debug and Release
  167. .build/projects/gmake-osx:
  168. $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx gmake
  169. osx-debug32: .build/projects/gmake-osx ## Build - OSX x86 Debug
  170. $(MAKE) -C .build/projects/gmake-osx config=debug32
  171. osx-release32: .build/projects/gmake-osx ## Build - OSX x86 Release
  172. $(MAKE) -C .build/projects/gmake-osx config=release32
  173. osx-debug64: .build/projects/gmake-osx ## Build - OSX x64 Debug
  174. $(MAKE) -C .build/projects/gmake-osx config=debug64
  175. osx-release64: .build/projects/gmake-osx ## Build - OSX x64 Release
  176. $(MAKE) -C .build/projects/gmake-osx config=release64
  177. osx: osx-debug32 osx-release32 osx-debug64 osx-release64 ## Build - OSX x86/x64 Debug and Release
  178. .build/projects/gmake-ios-arm:
  179. $(GENIE) --gcc=ios-arm gmake
  180. ios-arm-debug: .build/projects/gmake-ios-arm ## Build - iOS ARM Debug
  181. $(MAKE) -R -C .build/projects/gmake-ios-arm config=debug
  182. ios-arm-release: .build/projects/gmake-ios-arm ## Build - iOS ARM Release
  183. $(MAKE) -R -C .build/projects/gmake-ios-arm config=release
  184. ios-arm: ios-arm-debug ios-arm-release ## Build - iOS ARM Debug and Release
  185. .build/projects/gmake-ios-arm64:
  186. $(GENIE) --gcc=ios-arm64 gmake
  187. ios-arm64-debug: .build/projects/gmake-ios-arm64 ## Build - iOS ARM64 Debug
  188. $(MAKE) -R -C .build/projects/gmake-ios-arm64 config=debug
  189. ios-arm64-release: .build/projects/gmake-ios-arm64 ## Build - iOS ARM64 Release
  190. $(MAKE) -R -C .build/projects/gmake-ios-arm64 config=release
  191. ios-arm64: ios-arm64-debug ios-arm64-release ## Build - iOS ARM64 Debug and Release
  192. .build/projects/gmake-ios-simulator:
  193. $(GENIE) --gcc=ios-simulator gmake
  194. ios-simulator-debug: .build/projects/gmake-ios-simulator ## Build - iOS Simulator Debug
  195. $(MAKE) -R -C .build/projects/gmake-ios-simulator config=debug
  196. ios-simulator-release: .build/projects/gmake-ios-simulator ## Build - iOS Simulator Release
  197. $(MAKE) -R -C .build/projects/gmake-ios-simulator config=release
  198. ios-simulator: ios-simulator-debug ios-simulator-release ## Build - iOS Simulator Debug and Release
  199. .build/projects/gmake-rpi:
  200. $(GENIE) --gcc=rpi gmake
  201. rpi-debug: .build/projects/gmake-rpi ## Build - RasberryPi Debug
  202. $(MAKE) -R -C .build/projects/gmake-rpi config=debug
  203. rpi-release: .build/projects/gmake-rpi ## Build - RasberryPi Release
  204. $(MAKE) -R -C .build/projects/gmake-rpi config=release
  205. rpi: rpi-debug rpi-release ## Build - RasberryPi Debug and Release
  206. build-darwin: osx
  207. build-linux: linux-debug64 linux-release64
  208. build-windows: mingw-gcc
  209. build: build-$(OS)
  210. rebuild-shaders:
  211. $(MAKE) -R -C examples rebuild
  212. assets: # Build assets.
  213. $(NINJA) -C scripts
  214. analyze:
  215. cppcheck src/
  216. cppcheck examples/
  217. docs:
  218. doxygen scripts/bgfx.doxygen
  219. markdown README.md > .build/docs/readme.html
  220. ###
  221. SILENT ?= @
  222. UNAME := $(shell uname)
  223. ifeq ($(UNAME),$(filter $(UNAME),Linux Darwin FreeBSD GNU/kFreeBSD))
  224. ifeq ($(UNAME),$(filter $(UNAME),Darwin))
  225. OS=darwin
  226. BUILD_PROJECT_DIR=gmake-osx
  227. BUILD_OUTPUT_DIR=osx64_clang
  228. BUILD_TOOLS_CONFIG=release64
  229. BUILD_TOOLS_SUFFIX=Release
  230. EXE=
  231. else
  232. ifeq ($(UNAME),$(filter $(UNAME),FreeBSD GNU/kFreeBSD))
  233. OS=bsd
  234. BUILD_PROJECT_DIR=gmake-freebsd
  235. BUILD_OUTPUT_DIR=freebsd64_gcc
  236. BUILD_TOOLS_CONFIG=release64
  237. BUILD_TOOLS_SUFFIX=Release
  238. EXE=
  239. else
  240. OS=linux
  241. BUILD_PROJECT_DIR=gmake-linux
  242. BUILD_OUTPUT_DIR=linux64_gcc
  243. BUILD_TOOLS_CONFIG=release64
  244. BUILD_TOOLS_SUFFIX=Release
  245. EXE=
  246. endif
  247. endif
  248. else
  249. OS=windows
  250. BUILD_PROJECT_DIR=gmake-mingw-gcc
  251. BUILD_OUTPUT_DIR=win64_mingw-gcc
  252. BUILD_TOOLS_CONFIG=release64
  253. BUILD_TOOLS_SUFFIX=Release
  254. EXE=.exe
  255. endif
  256. geometryc: .build/projects/$(BUILD_PROJECT_DIR) ## Build geometryc tool.
  257. $(SILENT) $(MAKE) -C .build/projects/$(BUILD_PROJECT_DIR) geometryc config=$(BUILD_TOOLS_CONFIG)
  258. $(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/geometryc$(BUILD_TOOLS_SUFFIX)$(EXE) tools/bin/$(OS)/geometryc$(EXE)
  259. shaderc: .build/projects/$(BUILD_PROJECT_DIR) ## Build shaderc tool.
  260. $(SILENT) $(MAKE) -C .build/projects/$(BUILD_PROJECT_DIR) shaderc config=$(BUILD_TOOLS_CONFIG)
  261. $(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/shaderc$(BUILD_TOOLS_SUFFIX)$(EXE) tools/bin/$(OS)/shaderc$(EXE)
  262. texturec: .build/projects/$(BUILD_PROJECT_DIR) ## Build texturec tool.
  263. $(SILENT) $(MAKE) -C .build/projects/$(BUILD_PROJECT_DIR) texturec config=$(BUILD_TOOLS_CONFIG)
  264. $(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/texturec$(BUILD_TOOLS_SUFFIX)$(EXE) tools/bin/$(OS)/texturec$(EXE)
  265. texturev: .build/projects/$(BUILD_PROJECT_DIR) ## Build texturev tool.
  266. $(SILENT) $(MAKE) -C .build/projects/$(BUILD_PROJECT_DIR) texturev config=$(BUILD_TOOLS_CONFIG)
  267. $(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/texturev$(BUILD_TOOLS_SUFFIX)$(EXE) tools/bin/$(OS)/texturev$(EXE)
  268. tools: geometryc shaderc texturec texturev ## Build tools.
  269. clean-tools: ## Clean tools projects.
  270. -$(SILENT) rm -r .build/projects/$(BUILD_PROJECT_DIR)
  271. dist-windows: .build/projects/gmake-mingw-gcc
  272. $(SILENT) $(MAKE) -C .build/projects/gmake-mingw-gcc config=release64 -j 6 geometryc
  273. $(SILENT) cp .build/win64_mingw-gcc/bin/geometrycRelease.exe tools/bin/windows/geometryc.exe
  274. $(SILENT) $(MAKE) -C .build/projects/gmake-mingw-gcc config=release64 -j 6 shaderc
  275. $(SILENT) cp .build/win64_mingw-gcc/bin/shadercRelease.exe tools/bin/windows/shaderc.exe
  276. $(SILENT) $(MAKE) -C .build/projects/gmake-mingw-gcc config=release64 -j 6 texturec
  277. $(SILENT) cp .build/win64_mingw-gcc/bin/texturecRelease.exe tools/bin/windows/texturec.exe
  278. $(SILENT) $(MAKE) -C .build/projects/gmake-mingw-gcc config=release64 -j 6 texturev
  279. $(SILENT) cp .build/win64_mingw-gcc/bin/texturevRelease.exe tools/bin/windows/texturev.exe
  280. dist-linux: .build/projects/gmake-linux
  281. $(SILENT) $(MAKE) -C .build/projects/gmake-linux config=release64 -j 6 geometryc
  282. $(SILENT) cp .build/linux64_gcc/bin/geometrycRelease tools/bin/linux/geometryc
  283. $(SILENT) $(MAKE) -C .build/projects/gmake-linux config=release64 -j 6 shaderc
  284. $(SILENT) cp .build/linux64_gcc/bin/shadercRelease tools/bin/linux/shaderc
  285. $(SILENT) $(MAKE) -C .build/projects/gmake-linux config=release64 -j 6 texturec
  286. $(SILENT) cp .build/linux64_gcc/bin/texturecRelease tools/bin/linux/texturec
  287. $(SILENT) $(MAKE) -C .build/projects/gmake-linux config=release64 -j 6 texturev
  288. $(SILENT) cp .build/linux64_gcc/bin/texturevRelease tools/bin/linux/texturev
  289. dist-darwin: .build/projects/gmake-osx
  290. $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 geometryc
  291. $(SILENT) cp .build/osx64_clang/bin/geometrycRelease tools/bin/darwin/geometryc
  292. $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 shaderc
  293. $(SILENT) cp .build/osx64_clang/bin/shadercRelease tools/bin/darwin/shaderc
  294. $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 texturec
  295. $(SILENT) cp .build/osx64_clang/bin/texturecRelease tools/bin/darwin/texturec
  296. $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 texturev
  297. $(SILENT) cp .build/osx64_clang/bin/texturevRelease tools/bin/darwin/texturev
  298. dist: clean dist-windows dist-linux dist-darwin