Makefile_nf_example.mk 1.5 KB

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