Makefile 810 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ALL: libmbfluid.so libscontact2.so libscontact3.so

CFLAGS=-Wno-unused-function -O3 -march=native -mtune=native -fPIC -g -std=gnu99
LDFLAGS=-shared -lm

FLUID_C=src/fluid_problem.c src/linear_system_banded_avx.c src/mesh.c src/mesh_find.c src/quadtree.c
FLUID_H=src/tools.h src/fluid_problem.h src/linear_system.h src/mesh_find.h src/mesh.h src/quadtree.h src/vector.h

SCONTACT_C=src/quadtree.c src/scontact.c
SCONTACT_H=src/quadtree.h src/scontact.h

libmbfluid.so : ${FLUID_C} ${FLUID_H}
	${CC} ${FLUID_C} -o $@ ${CFLAGS} ${LDFLAGS} -DDIMENSION=2

libscontact2.so : ${SCONTACT_C} ${SCONTACT_H}
	${CC} ${SCONTACT_C} -o $@ ${CFLAGS} ${LDFLAGS} -DDIMENSION=2

libscontact3.so : ${SCONTACT_C} ${SCONTACT_H}
	${CC} ${SCONTACT_C} -o $@ ${CFLAGS} ${LDFLAGS} -DDIMENSION=3

clean :
	${RM} *.so *.pyc -r __pycache__