1# Makefile for DAVID
2
3include ../../make.inc
4
5# location of needed modules and included files (if any)
6MODFLAGS=$(MOD_FLAG). $(MOD_FLAG)../
7
8DFLAGS=$$DFLAGMATRIX
9LDFLAGS:=$(LDFLAGS) $(DFLAGS)
10
11SRCS = test_mp_count_nodes.f90 \
12       test_mp_bcast_i1.f90 \
13       test_mp_bcast_i1_gpu.f90 \
14       test_mp_bcast_iv.f90 \
15       test_mp_bcast_iv_gpu.f90 \
16       test_mp_bcast_im.f90 \
17       test_mp_bcast_im_gpu.f90 \
18       test_mp_bcast_it.f90 \
19       test_mp_bcast_it_gpu.f90 \
20       test_mp_bcast_i4d_gpu.f90 \
21       test_mp_bcast_r4d_gpu.f90 \
22       test_mp_bcast_c4d_gpu.f90 \
23       test_mp_bcast_c5d_gpu.f90 \
24       test_mp_bcast_r5d_gpu.f90 \
25       test_mp_bcast_c6d_gpu.f90 \
26       test_mp_bcast_iv_buffer.f90 \
27       test_mp_bcast_iv_buffer_gpu.f90 \
28       test_mp_bcast_lv_buffer.f90 \
29       test_mp_bcast_lv_buffer_gpu.f90 \
30       test_mp_bcast_rv_buffer.f90 \
31       test_mp_bcast_rv_buffer_gpu.f90 \
32       test_mp_max_iv_buffer_gpu.f90 \
33       test_mp_max_iv_buffer.f90 \
34       test_mp_max_rv_buffer.f90 \
35       test_mp_max_rv_buffer_gpu.f90 \
36       test_mp_min_iv_buffer_gpu.f90 \
37       test_mp_min_iv_buffer.f90 \
38       test_mp_min_rv_buffer.f90 \
39       test_mp_min_rv_buffer_gpu.f90 \
40       test_mp_sum_iv_buffer.f90 \
41       test_mp_sum_rv_buffer.f90 \
42       test_mp_sum_iv_buffer_gpu.f90 \
43       test_mp_sum_rv_buffer_gpu.f90
44
45# include auto generate source files. This will only work with GNU Make!
46sinclude ./autotest.inc
47
48EXECS = $(SRCS:.f90=.x)
49
50all: common $(EXECS)
51
52generate:
53	python gen_tests.py
54
55common: tester.o mp_world.o utils.o
56
57%.x: %.o
58	$(LD) $(LDFLAGS) $< tester.o mp_world.o utils.o -o $@ ../libutil.a
59
60
61clean :
62	- /bin/rm -f *.o *.a *.d *.i *~ *_tmp.f90 *.mod *.L *.x rnd_seed_*
63
64