-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (30 loc) · 749 Bytes
/
Makefile
File metadata and controls
41 lines (30 loc) · 749 Bytes
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
APP=DNA_Analizer
.PHONY: all app tests clean cppcheck style
CC=g++ -std=c++17 -Wall -Werror -Wextra
TEST_LIB:=./tests/tests_main.cc ./dna/dna.cc
CHECKFLAGS=-lgtest
CPPCHECKFLAG = --enable=all --language=c++ --suppress=missingIncludeSystem --std=c++17
OS = $(shell uname)
ifeq ($(OS), Linux)
CC+=-D OS_LINUX -g -s
CHECKFLAGS+=-lpthread
else
CC+=-D OS_MAC-
endif
all: clean app
app:
@cmake -S . -B build
@cmake --build build
dvi:
doxygen ./docs/Doxyfile
open ./docs/html/index.html
tests:
@$(CC) $(TEST_LIB) $(CHECKFLAGS) -o Test
@./Test
@rm -rf *.o Test
clean:
@rm -rf ./build ./docs/html
cppcheck:
@cppcheck $(CPPCHECKFLAG) */*.cc */*/*.cc *.cc */*.h */*/*.h *.h
style:
clang-format -style=google -n -verbose */*.cc */*.h