-
Notifications
You must be signed in to change notification settings - Fork 88
/
Makefile
33 lines (25 loc) · 864 Bytes
/
Makefile
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
SHELL := /bin/bash
# simple makefile for development.
SRC=msprime/_msprimemodule.c
# The default target builds the C module in the simplest way.
cmodule: ${SRC}
python3 setup.py build_ext --inplace
# allchecks turns on as many checks as make sense when building
# Python-C extensions.
allchecks: ${SRC}
CFLAGS="-std=c99 -Wall -Wextra -Werror -Wno-unused-parameter" && \
CFLAGS+=" -Wno-missing-field-initializers -Wno-cast-function-type" && \
CFLAGS+=" --coverage" && \
export CFLAGS && python3 setup.py build_ext --inplace
# Turn on coverage builds
coverage: ${SRC}
rm -fR build
CFLAGS="-coverage" python3 setup.py build_ext --inplace
# Format the C code ready for a PR
clang-format:
clang-format -i lib/tests/* lib/*.[c,h]
tags:
ctags -f TAGS msprime/*.c lib/*.[c,h] msprime/*.py tests/*.py algorithms.py
clean:
rm -fR build
rm -f msprime/*.so