-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (24 loc) · 773 Bytes
/
Makefile
File metadata and controls
32 lines (24 loc) · 773 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
CFLAGS=-Wall -O2 -g -fPIC
# We use two posix extensions, strdup() and newlocale()/uselocale().
CC=gcc -std=c11 -D_POSIX_C_SOURCE=200809L
resolve: resolve.c libdemes.a
$(CC) $(CFLAGS) resolve.c -o $@ -L. -ldemes -lyaml
libdemes.a: demes.o unicodectype.o
$(AR) r $@ $^
demes.o: demes.c demes.h
unicodectype.o: unicodectype.c unicodetype_db.h
alltests: test memcheck pytest
test:
$(MAKE) -C tests
gcov *.c
# Resolve the test models under valgrind to check for memory errors.
memcheck: resolve
cd tests && bash memcheck.sh
# Compare resolution of graphs to the reference implementation.
pytest: resolve
pytest -n auto tests/compare-reference-implementation.py
clean:
rm -f resolve libdemes.a *.o
rm -f *.gcda *.gcno *.gcov
rm -f core.*
$(MAKE) -C tests clean