Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright 2011-2014 Mario Mulansky
  2. # Copyright 2011-2014 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. # make sure BOOST_ROOT is pointing to your boost directory
  8. # otherwise, set it here:
  9. # BOOST_ROOT = /path/to/boost
  10. INCLUDES += -I../../include/ -I$(BOOST_ROOT)
  11. GCCFLAGS = -O3 -ffast-math -DNDEBUG
  12. # disabling -ffast-math might give slightly better performance
  13. ICCFLAGS = -Ofast -xHost -ip -inline-forceinline -DNDEBUG
  14. # Possible options: -fp-model source -no-fma
  15. GFORTFLAGS = -Ofast
  16. bin/gcc:
  17. mkdir -p bin/gcc
  18. bin/intel:
  19. mkdir -p bin/intel
  20. bin/gfort:
  21. mkdir -p bin/gfort
  22. bin/gcc/odeint_rk4_array: odeint_rk4_array.cpp bin/gcc
  23. g++ ${GCCFLAGS} ${INCLUDES} -o bin/gcc/odeint_rk4_array odeint_rk4_array.cpp
  24. bin/gcc/c_lorenz: c_lorenz.c bin/gcc
  25. gcc -std=c99 -Ofast -mtune=corei7-avx c_lorenz.c -o bin/gcc/c_lorenz
  26. bin/intel/odeint_rk4_array: odeint_rk4_array.cpp bin/intel
  27. icpc ${ICCFLAGS} ${INCLUDES} -o bin/intel/odeint_rk4_array odeint_rk4_array.cpp
  28. bin/intel/c_lorenz: c_lorenz.c bin/intel
  29. icc -std=c99 -Ofast -xHost -ansi-alias -o bin/intel/c_lorenz c_lorenz.c
  30. bin/gfort/fortran_lorenz: fortran_lorenz.f90 bin/gfort
  31. gfortran ${GFORTFLAGS} fortran_lorenz.f90 -o bin/gfort/fortran_lorenz
  32. all: bin/gcc/odeint_rk4_array bin/intel/odeint_rk4_array bin/gcc/c_lorenz bin/intel/c_lorenz bin/gfort/fortran_lorenz