2020-12-08 10:52:35 -06:00
|
|
|
# Makefile
|
|
|
|
|
|
|
|
ifeq ($(origin CMAKE_COMMAND),undefined)
|
|
|
|
CMAKE_COMMAND := cmake
|
|
|
|
else
|
|
|
|
CMAKE_COMMAND := ${CMAKE_COMMAND}
|
|
|
|
endif
|
|
|
|
|
2020-12-14 11:25:50 -06:00
|
|
|
.PHONY: all checkout compile
|
2020-12-08 10:52:35 -06:00
|
|
|
|
2020-12-14 11:25:50 -06:00
|
|
|
all: checkout
|
|
|
|
mkdir -p build && cd build && $(CMAKE_COMMAND) ${CMAKE_FLAGS} ..
|
2020-12-21 01:05:52 -06:00
|
|
|
cd build && $(MAKE)
|
2020-12-08 10:52:35 -06:00
|
|
|
|
2020-12-21 01:05:52 -06:00
|
|
|
checkout:
|
2020-12-08 10:52:35 -06:00
|
|
|
git submodule init
|
|
|
|
git submodule update --init --recursive
|
2020-12-14 11:25:50 -06:00
|
|
|
|
|
|
|
compile:
|
2020-12-08 10:52:35 -06:00
|
|
|
mkdir -p build && cd build && $(CMAKE_COMMAND) ${CMAKE_FLAGS} ..
|
2020-12-21 01:05:52 -06:00
|
|
|
cd build && $(MAKE)
|
2020-12-14 11:25:50 -06:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf build
|
2020-12-08 10:52:35 -06:00
|
|
|
|
|
|
|
build/Makefile:
|
2020-12-14 11:25:50 -06:00
|
|
|
make checkout
|
2020-12-08 10:52:35 -06:00
|
|
|
|
|
|
|
.PHONY: Makefile
|
|
|
|
|
|
|
|
%: build/Makefile
|
|
|
|
cd build && $(MAKE) $@
|