-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (62 loc) · 2.04 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
.PHONY: all genbuild delbuild build run clean install help sln docs
# see https://gist.github.com/sighingnow/deee806603ec9274fd47
# for details on the following snippet to get the OS
# (removed the flags about arch as it is not needed for now)
OSFLAG :=
ifeq ($(OS),Windows_NT)
OSFLAG = WIN32
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
OSFLAG = LINUX
endif
ifeq ($(UNAME_S),Darwin)
OSFLAG = OSX
endif
endif
all: clean build run
genbuild:
ifeq ($(OSFLAG),WIN32)
cmake . -B ./build -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=./install -DENABLE_TESTS=On -DENABLE_LUA=On
else
cmake . -B ./build -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=./install -DENABLE_TESTS=On -DENABLE_LUA=On
endif
delbuild:
rm -fR ./build
build:
cmake --build ./build
run:
ifeq ($(OSFLAG),WIN32)
./build/bin/Debug/clibdocker_test
else
./build/bin/clibdocker_test
endif
clean:
cmake --build ./build --target clean
install:
cmake --build ./build --target install
sln:
ifeq ($(OSFLAG),WIN32)
cygstart ".\build\clibdocker.sln"
else
echo "No solution file available on this platform"
endif
docs:
doxygen
help:
@echo "********************************************************"
@echo " Makefile to build [clibdocker]"
@echo " (generated by gen-makefile.lua script)"
@echo "********************************************************"
@echo " (The project uses CMake. This Makefile provides"
@echo " convenient shortcuts to common build tasks.)"
@echo ""
@echo " all: Runs the clean, build, and run targets."
@echo " build: Runs the cmake project build target."
@echo " run: Runs the debug executable."
@echo " clean: Runs the cmake project clean target."
@echo " install: Runs the cmake project install target."
@echo " delbuild: Deletes the cmake build directory!"
@echo " genbuild: Generates the cmake build."
@echo " docs: Generates the doxygen docs."
@echo "********************************************************"