Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2015-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. # Copyright (C) 2015 ONERA
  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 = f90_example
  18. STARPU_MOD = $(shell pkg-config --cflags-only-I starpu-1.3|sed -e 's/^-I//;s/ *//g')/starpu_mod.f90
  19. SRCSF = mod_types.f90 \
  20. mod_interface.f90 \
  21. mod_compute.f90 \
  22. f90_example.f90
  23. SRCSC = marshalling.c
  24. FC = gfortran
  25. CC = gcc
  26. CFLAGS = -g $(shell pkg-config --cflags starpu-1.3)
  27. FCFLAGS = -fdefault-real-8 -J. -g
  28. LDLIBS = $(shell pkg-config --libs starpu-1.3)
  29. OBJS = $(SRCSC:%.c=%.o) starpu_mod.o $(SRCSF:%.f90=%.o)
  30. .phony: all clean
  31. all: $(PROG)
  32. $(PROG): $(OBJS)
  33. $(FC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  34. %.o: %.c
  35. $(CC) $(CFLAGS) -c -o $@ $<
  36. starpu_mod.o: $(STARPU_MOD)
  37. $(FC) $(FCFLAGS) -c -o $@ $<
  38. %.o: %.f90
  39. $(FC) $(FCFLAGS) -c -o $@ $<
  40. clean:
  41. rm -fv *.o *.mod $(PROG)
  42. # modfiles generation dependences
  43. mod_compute.o: mod_compute.f90 mod_types.o mod_interface.o starpu_mod.o
  44. f90_example.o: f90_example.f90 mod_types.o mod_interface.o mod_compute.o