protot/3rdparty/bx/makefile

215 lines
7.4 KiB
Makefile
Raw Permalink Normal View History

2016-08-29 22:31:11 +02:00
#
2017-04-11 08:16:10 +02:00
# Copyright 2011-2017 Branimir Karadzic. All rights reserved.
# License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
2016-08-29 22:31:11 +02:00
#
GENIE=../bx/tools/bin/$(OS)/genie
all:
$(GENIE) vs2012
$(GENIE) vs2013
$(GENIE) --gcc=android-arm gmake
$(GENIE) --gcc=android-mips gmake
$(GENIE) --gcc=android-x86 gmake
$(GENIE) --gcc=nacl gmake
$(GENIE) --gcc=nacl-arm gmake
$(GENIE) --gcc=pnacl gmake
$(GENIE) --gcc=mingw-gcc gmake
$(GENIE) --gcc=linux-gcc gmake
$(GENIE) --gcc=osx gmake
$(GENIE) --gcc=ios-arm gmake
$(GENIE) --gcc=ios-simulator gmake
$(GENIE) xcode4
.build/projects/gmake-android-arm:
$(GENIE) --gcc=android-arm gmake
android-arm-debug: .build/projects/gmake-android-arm
make -R -C .build/projects/gmake-android-arm config=debug
android-arm-release: .build/projects/gmake-android-arm
make -R -C .build/projects/gmake-android-arm config=release
android-arm: android-arm-debug android-arm-release
.build/projects/gmake-android-mips:
$(GENIE) --gcc=android-mips gmake
android-mips-debug: .build/projects/gmake-android-mips
make -R -C .build/projects/gmake-android-mips config=debug
android-mips-release: .build/projects/gmake-android-mips
make -R -C .build/projects/gmake-android-mips config=release
android-mips: android-mips-debug android-mips-release
.build/projects/gmake-android-x86:
$(GENIE) --gcc=android-x86 gmake
android-x86-debug: .build/projects/gmake-android-x86
make -R -C .build/projects/gmake-android-x86 config=debug
android-x86-release: .build/projects/gmake-android-x86
make -R -C .build/projects/gmake-android-x86 config=release
android-x86: android-x86-debug android-x86-release
.build/projects/gmake-linux:
$(GENIE) --gcc=linux-gcc gmake
linux-debug32: .build/projects/gmake-linux
make -R -C .build/projects/gmake-linux config=debug32
linux-release32: .build/projects/gmake-linux
make -R -C .build/projects/gmake-linux config=release32
linux-debug64: .build/projects/gmake-linux
make -R -C .build/projects/gmake-linux config=debug64
linux-release64: .build/projects/gmake-linux
make -R -C .build/projects/gmake-linux config=release64
linux: linux-debug32 linux-release32 linux-debug64 linux-release64
.build/projects/gmake-mingw-gcc:
$(GENIE) --gcc=mingw-gcc gmake
mingw-gcc-debug32: .build/projects/gmake-mingw-gcc
make -R -C .build/projects/gmake-mingw-gcc config=debug32
mingw-gcc-release32: .build/projects/gmake-mingw-gcc
make -R -C .build/projects/gmake-mingw-gcc config=release32
mingw-gcc-debug64: .build/projects/gmake-mingw-gcc
make -R -C .build/projects/gmake-mingw-gcc config=debug64
mingw-gcc-release64: .build/projects/gmake-mingw-gcc
make -R -C .build/projects/gmake-mingw-gcc config=release64
mingw-gcc: mingw-gcc-debug32 mingw-gcc-release32 mingw-gcc-debug64 mingw-gcc-release64
.build/projects/gmake-mingw-clang:
$(GENIE) --clang=mingw-clang gmake
mingw-clang-debug32: .build/projects/gmake-mingw-clang
make -R -C .build/projects/gmake-mingw-clang config=debug32
mingw-clang-release32: .build/projects/gmake-mingw-clang
make -R -C .build/projects/gmake-mingw-clang config=release32
mingw-clang-debug64: .build/projects/gmake-mingw-clang
make -R -C .build/projects/gmake-mingw-clang config=debug64
mingw-clang-release64: .build/projects/gmake-mingw-clang
make -R -C .build/projects/gmake-mingw-clang config=release64
mingw-clang: mingw-clang-debug32 mingw-clang-release32 mingw-clang-debug64 mingw-clang-release64
.build/projects/vs2012:
$(GENIE) vs2012
.build/projects/vs2013:
$(GENIE) vs2013
.build/projects/gmake-nacl:
$(GENIE) --gcc=nacl gmake
nacl-debug32: .build/projects/gmake-nacl
make -R -C .build/projects/gmake-nacl config=debug32
nacl-release32: .build/projects/gmake-nacl
make -R -C .build/projects/gmake-nacl config=release32
nacl-debug64: .build/projects/gmake-nacl
make -R -C .build/projects/gmake-nacl config=debug64
nacl-release64: .build/projects/gmake-nacl
make -R -C .build/projects/gmake-nacl config=release64
nacl: nacl-debug32 nacl-release32 nacl-debug64 nacl-release64
.build/projects/gmake-nacl-arm:
$(GENIE) --gcc=nacl-arm gmake
nacl-arm-debug: .build/projects/gmake-nacl-arm
make -R -C .build/projects/gmake-nacl-arm config=debug
nacl-arm-release: .build/projects/gmake-nacl-arm
make -R -C .build/projects/gmake-nacl-arm config=release
nacl-arm: nacl-arm-debug32 nacl-arm-release32
.build/projects/gmake-pnacl:
$(GENIE) --gcc=pnacl gmake
pnacl-debug: .build/projects/gmake-pnacl
make -R -C .build/projects/gmake-pnacl config=debug
pnacl-release: .build/projects/gmake-pnacl
make -R -C .build/projects/gmake-pnacl config=release
pnacl: pnacl-debug pnacl-release
.build/projects/gmake-osx:
$(GENIE) --gcc=osx gmake
osx-debug32: .build/projects/gmake-osx
make -C .build/projects/gmake-osx config=debug32
osx-release32: .build/projects/gmake-osx
make -C .build/projects/gmake-osx config=release32
osx-debug64: .build/projects/gmake-osx
make -C .build/projects/gmake-osx config=debug64
osx-release64: .build/projects/gmake-osx
make -C .build/projects/gmake-osx config=release64
osx: osx-debug32 osx-release32 osx-debug64 osx-release64
.build/projects/gmake-ios-arm:
$(GENIE) --gcc=ios-arm gmake
ios-arm-debug: .build/projects/gmake-ios-arm
make -R -C .build/projects/gmake-ios-arm config=debug
ios-arm-release: .build/projects/gmake-ios-arm
make -R -C .build/projects/gmake-ios-arm config=release
ios-arm: ios-arm-debug ios-arm-release
.build/projects/gmake-ios-simulator:
$(GENIE) --gcc=ios-simulator gmake
ios-simulator-debug: .build/projects/gmake-ios-simulator
make -R -C .build/projects/gmake-ios-simulator config=debug
ios-simulator-release: .build/projects/gmake-ios-simulator
make -R -C .build/projects/gmake-ios-simulator config=release
ios-simulator: ios-simulator-debug ios-simulator-release
rebuild-shaders:
make -R -C examples rebuild
analyze:
cppcheck src/
cppcheck examples/
docs:
doxygen scripts/bgfx.doxygen
markdown README.md > .build/docs/readme.html
clean:
@echo Cleaning...
-@rm -rf .build
@mkdir .build
###
SILENT ?= @
UNAME := $(shell uname)
ifeq ($(UNAME),$(filter $(UNAME),Linux GNU Darwin))
ifeq ($(UNAME),$(filter $(UNAME),Darwin))
OS=darwin
BUILD_PROJECT_DIR=gmake-osx
BUILD_OUTPUT_DIR=osx64_clang
BUILD_TOOLS_CONFIG=release64
EXE=
else
OS=linux
BUILD_PROJECT_DIR=gmake-linux
BUILD_OUTPUT_DIR=linux64_gcc
BUILD_TOOLS_CONFIG=release64
EXE=
endif
else
OS=windows
BUILD_PROJECT_DIR=gmake-mingw-gcc
BUILD_OUTPUT_DIR=win32_mingw-gcc
BUILD_TOOLS_CONFIG=release32
EXE=.exe
endif
.build/osx64_clang/bin/bin2cRelease: .build/projects/gmake-osx
$(SILENT) make -C .build/projects/gmake-osx bin2c config=$(BUILD_TOOLS_CONFIG)
tools/bin/darwin/bin2c: .build/osx64_clang/bin/bin2cRelease
$(SILENT) cp $(<) $(@)
.build/linux64_gcc/bin/bin2cRelease: .build/projects/gmake-linux
$(SILENT) make -C .build/projects/gmake-linux bin2c config=$(BUILD_TOOLS_CONFIG)
tools/bin/linux/bin2c: .build/linux64_gcc/bin/bin2cRelease
$(SILENT) cp $(<) $(@)
.build/win64_mingw-gcc/bin/bin2cRelease.exe: .build/projects/gmake-mingw-gcc
$(SILENT) make -C .build/projects/gmake-mingw-gcc bin2c config=$(BUILD_TOOLS_CONFIG)
tools/bin/windows/bin2c.exe: .build/win64_mingw-gcc/bin/bin2cRelease
$(SILENT) cp $(<) $(@)
tools: tools/bin/$(OS)/bin2c$(EXE)
dist: tools/bin/darwin/bin2c tools/bin/linux/bin2c tools/bin/windows/bin2c.exe
.build/$(BUILD_OUTPUT_DIR)/bin/bx.testRelease$(EXE): .build/projects/$(BUILD_PROJECT_DIR)
$(SILENT) make -C .build/projects/$(BUILD_PROJECT_DIR) bx.test config=$(BUILD_TOOLS_CONFIG)
test: .build/$(BUILD_OUTPUT_DIR)/bin/bx.testRelease$(EXE)