Makefile_nf_partition.mk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2016 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. PROG = nf_partition
  16. FSTARPU_MOD = $(shell pkg-config --cflags-only-I starpu-1.3|sed -e 's/^\([^ ]*starpu\/1.3\).*$$/\1/;s/^.* //;s/^-I//')/fstarpu_mod.f90
  17. SRCSF = nf_partition_cl.f90 \
  18. nf_partition.f90
  19. FC = gfortran
  20. CC = gcc
  21. CFLAGS = -g $(shell pkg-config --cflags starpu-1.3)
  22. FCFLAGS = -fdefault-real-8 -J. -g
  23. LDLIBS = $(shell pkg-config --libs starpu-1.3)
  24. OBJS = $(SRCSC:%.c=%.o) fstarpu_mod.o $(SRCSF:%.f90=%.o)
  25. .phony: all clean
  26. all: $(PROG)
  27. $(PROG): $(OBJS)
  28. $(FC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  29. %.o: %.c
  30. $(CC) $(CFLAGS) -c -o $@ $<
  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. nf_parition_cl.o: nf_partition_cl.f90 fstarpu_mod.o
  38. nf_partition.o: nf_partition.f90 nf_parition_cl.o fstarpu_mod.o