Makefile 1.5 KB

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