-
Notifications
You must be signed in to change notification settings - Fork 0
/
libraries.Makefile
51 lines (41 loc) · 1.28 KB
/
libraries.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# libraries.Makefile
# 2d-treecodes
#
# Created and authored by Diego Rossinelli on 2015-09-25.
# Copyright 2015. All rights reserved.
#
# Users are NOT authorized
# to employ the present software for their own publications
# before getting a written permission from the author of this file.
#
real ?= double
order ?= 12
mrag-blocksize ?= 32
mixprec ?= 0
instrumentation ?= 0
OBJS = drivers/order$(order)-upward.o drivers/sort-sources.o
ifeq "$(MAKECMDGOALS)" "lib2d-treecodes-force.so"
OBJS += drivers/treecode-force.o
TARGET=force
else
OBJS += drivers/treecode-potential.o
TARGET=potential
endif
OBJS += $(wildcard kernels/order$(order)-*.o) kernels/upward-common.o
lib2d-treecodes-potential.so: drivers/treecode-potential.h alldrivers
m4 -D realtype=$(real) drivers/treecode-potential.h | \
sed '/typedef/d' | sed '/attribute/d' > 2d-treecodes-potential.h
g++ -shared -o $@ $(OBJS)
lib2d-treecodes-force.so: drivers/treecode-force.h alldrivers
m4 -D realtype=$(real) drivers/treecode-force.h | \
sed '/typedef/d' | sed '/attribute/d' > 2d-treecodes-force.h
g++ -shared -o $@ $(OBJS)
alldrivers: allkernels
make -C drivers $(TARGET)
allkernels:
make -C kernels $(TARGET)
clean:
rm -f test *.so 2d-treecodes-potential.h 2d-treecodes-force.h
make -C drivers clean
make -C kernels clean