Makefile 727 Bytes
Newer Older
Matteo Spanio's avatar
update    
Matteo Spanio committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
UNAME := $(shell uname)
FORMATTER = clang-format
DOCS_GEN = doxygen
FORMAT_OPT = -i -style="{BasedOnStyle: google,IndentWidth: 4,ColumnLimit: 120}"
TARGET = video_analyser

ifeq ($(UNAME), Linux)
	OPEN = xdg-open
endif
ifeq ($(UNAME), Darwin)
	OPEN = open
endif
ifeq ($(UNAME), Windows)
	OPEN = start
endif

.PHONY: all clean test docs run build

Matteo's avatar
update  
Matteo committed
19
20
21
22
23
build:
	cmake -S . -B build
	cmake --build build

test:
Matteo Spanio's avatar
update    
Matteo Spanio committed
24
	./bin/test_suite
Matteo's avatar
update  
Matteo committed
25
26
27
28

clean:
	rm -rf build
	rm -rf bin
Matteo Spanio's avatar
update    
Matteo Spanio committed
29
30
31
32
33
34
35
36
37
38
39
	rm -rf docs/html
	rm -rf docs/latex

format:
	$(FORMATTER) $(FORMAT_OPT) src/*.cpp src/*.h src/lib/*.cpp src/lib/*.hpp tests/*.cpp src/*.hpp

docs:
	$(DOCS_GEN) docs/Doxyfile && $(OPEN) docs/html/index.html

all:
	cd build && cmake .. && make
Matteo's avatar
update  
Matteo committed
40
41

run:
Matteo Spanio's avatar
update    
Matteo Spanio committed
42
	./bin/video_analyser