Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / numeric / odeint / examples / thrust / Makefile
1 # Copyright 2011-2013 Mario Mulansky
2 # Copyright 2011-2012 Karsten Ahnert
3 #
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE_1_0.txt or
6 # copy at http://www.boost.org/LICENSE_1_0.txt)
7
8
9
10 # CUDA_ROOT = /home/karsten/boost/cuda4.1/cuda/
11 CUDA_ROOT = /usr/local/cuda
12 ARCH = sm_13
13
14 CC = gcc
15 CXX = g++
16 NVCC = $(CUDA_ROOT)/bin/nvcc
17 # NVCC = g++
18
19 INCLUDES += -I$(BOOST_ROOT) -I$(THRUST_ROOT) -I$(CUDA_ROOT)/include -I../../../../..
20
21 NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/opt/gcc4.6.2/bin/  -Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP
22 # NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/usr/bin/g++-4.3 -Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP 
23
24 # NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/usr/bin/g++-4.3
25
26 #--compiler-bindir=/usr/bin/g++-4.4 
27 #-Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP 
28 # NVCCFLAGS = -O3 $(INCLUDES) -arch $(ARCH) --compiler-bindir=/usr/bin/g++-4.3 
29 #-Xcompiler -fopenmp -DTHRUST_DEVICE_BACKEND=THRUST_DEVICE_BACKEND_OMP 
30
31
32 LDLIBS = -lstdc++ -lm -lcudart -lgomp
33 LDFLAGS = -L$(CUDA_ROOT)/lib64
34
35 %.co : %.cu
36         $(NVCC) $(NVCCFLAGS) -c $< -o $@
37
38
39 all : phase_oscillator_chain phase_oscillator_ensemble lorenz_parameters relaxation
40
41
42 phase_oscillator_chain.co : phase_oscillator_chain.cu
43 phase_oscillator_chain : phase_oscillator_chain.co
44         $(CC) -o phase_oscillator_chain $(LDFLAGS) $(LDLIBS) phase_oscillator_chain.co
45
46
47
48 phase_oscillator_ensemble.co : phase_oscillator_ensemble.cu
49 phase_oscillator_ensemble : phase_oscillator_ensemble.co
50         $(CC) -o phase_oscillator_ensemble $(LDFLAGS) $(LDLIBS) phase_oscillator_ensemble.co
51
52
53
54 lorenz_parameters : lorenz_parameters.co
55         $(CC) -o lorenz_parameters $(LDFLAGS) $(LDLIBS) lorenz_parameters.co
56 lorenz_parameters.co : lorenz_parameters.cu
57
58
59 relaxation : relaxation.co
60         $(CC) -o relaxation $(LDFLAGS) $(LDLIBS) relaxation.co
61 relaxation.co : relaxation.cu
62
63
64
65 clean :
66         -rm *~ *.o *.co phase_oscillator_chain phase_oscillator_ensemble lorenz_parameters relaxation