Makefile_nf_vector.mk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2016-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. #
  5. # StarPU is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or (at
  8. # your option) any later version.
  9. #
  10. # StarPU is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. #
  16. PROG = nf_vector
  17. FSTARPU_MOD = $(shell pkg-config --cflags-only-I starpu-1.3|sed -e 's/^\([^ ]*starpu\/1.3\).*$$/\1/;s/^.* //;s/^-I//')/fstarpu_mod.f90
  18. SRCSF = nf_vector.f90 \
  19. nf_codelets.f90
  20. FC = gfortran
  21. CC = gcc
  22. CFLAGS = -g $(shell pkg-config --cflags starpu-1.3)
  23. FCFLAGS = -fdefault-real-8 -J. -g
  24. LDLIBS = $(shell pkg-config --libs starpu-1.3)
  25. OBJS = $(SRCSC:%.c=%.o) fstarpu_mod.o $(SRCSF:%.f90=%.o)
  26. .phony: all clean
  27. all: $(PROG)
  28. $(PROG): $(OBJS)
  29. $(FC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  30. %.o: %.c
  31. $(CC) $(CFLAGS) -c -o $@ $<
  32. fstarpu_mod.o: $(FSTARPU_MOD)
  33. $(FC) $(FCFLAGS) -c -o $@ $<
  34. %.o: %.f90
  35. $(FC) $(FCFLAGS) -c -o $@ $<
  36. clean:
  37. rm -fv *.o *.mod $(PROG)
  38. nf_vector.o: nf_vector.f90 nf_codelets.o fstarpu_mod.o
  39. nf_codelets.o: fstarpu_mod.o