Makefile_nf_matrix.mk 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2017 CNRS
  4. # Copyright (C) 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. #
  17. PROG = nf_matrix
  18. FSTARPU_MOD = $(shell pkg-config --cflags-only-I starpu-1.3|sed -e 's/^\([^ ]*starpu\/1.3\).*$$/\1/;s/^.* //;s/^-I//')/fstarpu_mod.f90
  19. SRCSF = nf_matrix.f90 \
  20. nf_codelets.f90
  21. FC = gfortran
  22. CC = gcc
  23. CFLAGS = -g $(shell pkg-config --cflags starpu-1.3)
  24. FCFLAGS = -fdefault-real-8 -J. -g
  25. LDLIBS = $(shell pkg-config --libs starpu-1.3)
  26. OBJS = $(SRCSC:%.c=%.o) fstarpu_mod.o $(SRCSF:%.f90=%.o)
  27. .phony: all clean
  28. all: $(PROG)
  29. $(PROG): $(OBJS)
  30. $(FC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  31. %.o: %.c
  32. $(CC) $(CFLAGS) -c -o $@ $<
  33. fstarpu_mod.o: $(FSTARPU_MOD)
  34. $(FC) $(FCFLAGS) -c -o $@ $<
  35. %.o: %.f90
  36. $(FC) $(FCFLAGS) -c -o $@ $<
  37. clean:
  38. rm -fv *.o *.mod $(PROG)
  39. nf_matrix.o: nf_matrix.f90 nf_codelets.o fstarpu_mod.o
  40. nf_codelets.o: fstarpu_mod.o