diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-02-24 17:47:39 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-02-24 17:47:39 +0200 |
| commit | 6b5838f72fe535afb542e888d7d2d2da3571bea2 (patch) | |
| tree | aa615a75223027a87ff56c089c0c5b2cc45d00c7 /Makefile | |
| download | qbt-6b5838f72fe535afb542e888d7d2d2da3571bea2.tar.gz qbt-6b5838f72fe535afb542e888d7d2d2da3571bea2.zip | |
initial commit
+ Now to do the actual hard parts, heh
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e89237d --- /dev/null +++ b/Makefile @@ -0,0 +1,67 @@ +DO != echo -n > deps.mk + +DEBUGFLAGS != [ $(RELEASE) ] && echo "-flto=auto -O2 -DNODEBUG" || echo "-O0 -DDEBUG" +CFLAGS = -Wall -Wextra -g +DEPFLAGS = -MT $@ -MMD -MP -MF $@.d +LINTFLAGS = -fsyntax-only +INCLUDEFLAGS = -Iinclude +COMPILEFLAGS = +LINKFLAGS = + +all: qbt + +# default values +CROSS_COMPILE ?= + +# common programs +CC = gcc + +SOURCES := + +include src/source.mk + +COMPILE = $(CROSS_COMPILE)$(CC) $(DEBUGFLAGS)\ + $(CFLAGS) $(DEPFLAGS) $(COMPILEFLAGS) $(INCLUDEFLAGS) + +LINT = $(COMPILE) $(LINTFLAGS) + +OBJS != ./scripts/gen-deps --sources "$(SOURCES)" + +include deps.mk + +.PHONY: lint +lint: $(OBJS:.o=.o.l) + +.PHONY: format +format: + find src include tests -iname '*.[ch]' |\ + xargs -n 10 -P 0 uncrustify -c uncrustify.conf --no-backup -F - + +.PHONY: license +license: + find src include tests -iname '*.[ch]' |\ + xargs -n 10 -P 0 ./scripts/license + +.PHONY: docs +docs: + find src include -iname '*.[ch]' |\ + xargs ./scripts/warn-undocumented + doxygen docs/doxygen.conf + +.PHONY: check +check: ek + ./tests/check.sh + +qbt: $(OBJS) + $(COMPILE) $(OBJS) -o $@ + +.PHONY: clean +clean: + $(RM) -r build qbt deps.mk + +.PHONY: clean_docs +clean_docs: + $(RM) -r docs/output + +.PHONY: clean_all +clean_all: clean clean_docs |
