blob: 0210cf254a797b7013df098141d28ed2b1652bf5 (
plain) (
blame)
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
|
DO != echo -n > deps.mk
DEBUGFLAGS != [ $(RELEASE) ] && echo "-flto=auto -O2 -DNODEBUG" || echo "-O0 -g -DDEBUG"
CFLAGS = -Wall -Wextra
DEPFLAGS = -MT $@ -MMD -MP -MF $@.d
INCLUDEFLAGS = -Iinclude
COMPILEFLAGS =
LINKFLAGS =
# should the compiler be renamed ctc? C with Traits Compiler?
all: cu
# default values
CROSS_COMPILE ?=
# common programs
CC = gcc
SOURCES :=
include src/source.mk
include gen/source.mk
COMPILE = $(CROSS_COMPILE)$(CC) $(DEBUGFLAGS)\
$(CFLAGS) $(DEPFLAGS) $(COMPILEFLAGS) $(INCLUDEFLAGS)
OBJS != ./scripts/gen-deps --sources "$(SOURCES)"
include deps.mk
.PHONY: format
format:
@cd src; find . -iname '*.[ch]' |\
xargs -n 10 -P 0 uncrustify -c ../uncrustify.conf --no-backup -F -
@cd include; find . -iname '*.[ch]' |\
xargs -n 10 -P 0 uncrustify -c ../uncrustify.conf --no-backup -F -
.PHONY: license
license:
@find . -iname '*.[ch]' |\
xargs -n 10 -P 0 ./scripts/license
.PHONY: docs
docs:
@./scripts/warn-undocumented
@doxygen docs/doxygen.conf
.PHONY: check
check: cu
./tests/check.sh
cu: $(OBJS)
$(COMPILE) $(OBJS) -o $@
.PHONY: clean
clean:
@$(RM) -r build cu deps.mk
.PHONY: clean_docs
clean_docs:
@$(RM) -r docs/output
|