-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (40 loc) · 1.52 KB
/
Makefile
File metadata and controls
53 lines (40 loc) · 1.52 KB
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
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(ARGS):;@:)
makefileDir := $(dir $(firstword $(MAKEFILE_LIST)))
EMCMAKE := $(makefileDir)emsdk/upstream/emscripten/emcmake
CMAKE := /usr/bin/cmake
default: build
#
# Clean up
#
.PHONY: cleanAll
cleanAll:
rm -rf build
.PHONY: cleanOurs
cleanOurs:
@find build -mindepth 1 -maxdepth 1 ! -name '_deps' -exec rm -rf {} +
.PHONY: clean
clean: cleanOurs
.PHONY: configureDebugLib
configureDebugLib:
@$(CMAKE) -S . -B build -DCMAKE_VERBOSE_MAKEFILE=ON -D CMAKE_BUILD_TYPE=Debug -DNATIVE=ON -DBUILD_EXECUTABLE=OFF -DCMAKE_INSTALL_PREFIX=build/install
.PHONY: configureDebug
configureDebug:
@$(CMAKE) -S . -B build -DCMAKE_VERBOSE_MAKEFILE=ON -D CMAKE_BUILD_TYPE=Debug -DNATIVE=ON -DBUILD_EXECUTABLE=ON
.PHONY: configure
configure:
@$(CMAKE) -S . -B build -D CMAKE_BUILD_TYPE=Release -DNATIVE=ON -DBUILD_EXECUTABLE=ON
.PHONY: configureWASMDebug
configureWASMDebug:
@$(EMCMAKE) cmake -S . -B build -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_EXE_LINKER_FLAGS=\"-static\"-D CMAKE_BUILD_TYPE=Debug -DNATIVE=OFF -DWEB_TARGET=1
.PHONY: configureWASM
configureWASM:
@$(EMCMAKE) cmake -S . -B build -DCMAKE_EXE_LINKER_FLAGS=\"-static\" -D CMAKE_BUILD_TYPE=Release -DNATIVE=OFF -DWEB_TARGET=1
.PHONY: build
build:
@$(CMAKE) --build build
# This currently create a package and cmake when not building an execut5able and not targetting the emscripten cross-compiler
# The goal is to allow the use of this as a library to other cmake projects
.PHONY: install
install:
@$(CMAKE) --install build