-
Notifications
You must be signed in to change notification settings - Fork 29
/
makefile
104 lines (89 loc) · 3.47 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#
# Copyright 2011-2024 Branimir Karadzic. All rights reserved.
# License: https://github.com/bkaradzic/bnet/blob/master/LICENSE
#
UNAME := $(shell uname)
ifeq ($(UNAME),$(filter $(UNAME),Linux Darwin))
ifeq ($(UNAME),$(filter $(UNAME),Darwin))
OS=darwin
else
OS=linux
endif
else
OS=windows
endif
BX_DIR?=../bx
GENIE?=$(BX_DIR)/tools/bin/$(OS)/genie
all:
$(GENIE) vs2017
$(GENIE) vs2019
$(GENIE) --gcc=android-arm gmake
$(GENIE) --gcc=android-x86 gmake
$(GENIE) --gcc=asmjs gmake
$(GENIE) --gcc=osx-x64 gmake
$(GENIE) --gcc=osx-arm64 gmake
$(GENIE) --gcc=ios-arm gmake
$(GENIE) --gcc=ios-arm64 gmake
$(GENIE) --gcc=rpi gmake
$(GENIE) xcode8
.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-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-osx-x64:
$(GENIE) --gcc=osx-x64 gmake
osx-x64-debug: .build/projects/gmake-osx-x64 ## Build - macOS x64 Debug
$(MAKE) -C .build/projects/gmake-osx-x64 config=debug
osx-x64-release: .build/projects/gmake-osx-x64 ## Build - macOS x64 Release
$(MAKE) -C .build/projects/gmake-osx-x64 config=release
osx-x64: osx-x64-debug osx-x64-release ## Build - macOS x64 Debug and Release
.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-darwin: osx-x64
build-linux: linux-debug64 linux-release64
build-windows: mingw
build: build-$(OS)
analyze:
cppcheck src/
cppcheck examples/
clean: ## Clean all intermediate files.
@echo Cleaning...
-@rm -rf .build
@mkdir .build