Makefile_nf_dynbuf.mk 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2015 ONERA
  4. # Copyright (C) 2015-2016 Inria
  5. #
  6. # StarPU is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; either version 2.1 of the License, or (at
  9. # your option) any later version.
  10. #
  11. # StarPU is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. PROG = nf_dynbuf
  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_dynbuf_cl.f90 \
  19. nf_dynbuf.f90
  20. FC = gfortran
  21. FCFLAGS = -fdefault-real-8 -J. -g
  22. LDLIBS = $(shell pkg-config --libs starpu-1.3)
  23. OBJS = fstarpu_mod.o $(SRCSF:%.f90=%.o)
  24. .phony: all clean
  25. all: $(PROG)
  26. $(PROG): $(OBJS)
  27. $(FC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  28. fstarpu_mod.o: $(FSTARPU_MOD)
  29. $(FC) $(FCFLAGS) -c -o $@ $<
  30. %.o: %.f90
  31. $(FC) $(FCFLAGS) -c -o $@ $<
  32. clean:
  33. rm -fv *.o *.mod $(PROG)
  34. # modfiles generation dependences
  35. nf_dynbuf_cl.o: nf_dynbuf_cl.f90 fstarpu_mod.o
  36. nf_dynbuf.o: nf_dynbuf.f90 nf_types.o fstarpu_mod.o