-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.Maintainer
More file actions
44 lines (33 loc) · 895 Bytes
/
Makefile.Maintainer
File metadata and controls
44 lines (33 loc) · 895 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
42
43
44
SHELL=zsh
UNAME_S := $(shell uname -s)
LIBSUFFIX=so # default
ifeq ($(UNAME_S),Linux)
LIBSUFFIX=so
endif
ifeq ($(UNAME_S),Darwin)
LIBSUFFIX=dylib
endif
CPPFLAGS=-Iinclude
CFLAGS=-O2
.PHONY: format clean
exportedsymbols: builddir/libdna.${LIBSUFFIX}
nm $^ | awk '$$2 ~ /R|T|i/' > $@
format:
clang-format -i src/*.h src/*.c include/*.h include/*.hpp
clang-format -i bench/*.cxx bench/*.h
clang-format -i test/*.cxx test/*.h
clang-format -i rttest/*.c rttest/*.cxx
clang-format -i examples/*.c examples/*.cxx
ruff format python/libdna
builddir:
meson $@
builddir_wtests:
meson $@ -Dwith-tests=true --buildtype=debugoptimized
builddir_wbench:
meson $@ -Dwith-benchmarks=true
drunken: examples/drunken.o
cc $^ -o $@ -Lbuilddir -ldna -lmurmurhash
validate-source: exportedsymbols
python3 meta/validate-source.py . > $@
clean:
$(RM) exportedsymbols drunken examples/drunken.o