2020-07-26 07:58:15 +00:00
|
|
|
BUILD_TARGET_DIR=build
|
|
|
|
ODY_DIR=..
|
2020-08-08 16:00:31 +00:00
|
|
|
BUILD_TYPE=Release
|
2020-10-26 05:00:17 +00:00
|
|
|
CMAKE_FLAGS:=
|
2020-07-26 07:58:15 +00:00
|
|
|
|
2020-10-26 05:00:17 +00:00
|
|
|
cleanup-docker:
|
|
|
|
./cleanup-docker.sh
|
|
|
|
|
|
|
|
clean: cleanup-docker
|
2020-07-26 07:58:15 +00:00
|
|
|
rm -fr build
|
|
|
|
|
|
|
|
local_build: clean
|
|
|
|
mkdir -p $(BUILD_TARGET_DIR)
|
2020-10-26 05:00:17 +00:00
|
|
|
cd $(BUILD_TARGET_DIR) && cmake -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) $(ODY_DIR) && make -j4
|
2020-07-26 07:58:15 +00:00
|
|
|
|
|
|
|
local_run: local_build
|
|
|
|
$(BUILD_TARGET_DIR)/sources/odyssey ./odyssey-dev.conf
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
run-clang-format/run-clang-format.py -r --clang-format-executable clang-format-9 modules sources stress test third_party
|
|
|
|
|
|
|
|
apply_fmt:
|
|
|
|
clang-format-9 ./third_party/machinarium/sources/*.c -i && clang-format-9 ./third_party/machinarium/sources/*.h -i
|
|
|
|
clang-format-9 ./sources/*.c -i && clang-format-9 ./sources/*.h -i
|
|
|
|
|
|
|
|
run_test:
|
2020-10-26 05:00:17 +00:00
|
|
|
rm -fr $(BUILD_TARGET_DIR) && mkdir $(BUILD_TARGET_DIR) && cd $(BUILD_TARGET_DIR) && cmake -DCMAKE_BUILD_TYPE=Release "$(CMAKE_FLAGS)" .. && make -j2 && cd test && ./odyssey_test
|
2020-07-26 07:58:15 +00:00
|
|
|
docker-compose -f docker-compose-test.yml up --force-recreate --build
|