Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. SRCSF = mod_types.f90 \
  18. mod_interface.f90 \
  19. mod_compute.f90 \
  20. f90_example.f90
  21. SRCSC = marshalling.c
  22. FC = gfortran
  23. CC = gcc
  24. CFLAGS = -g $(shell pkg-config --cflags starpu-1.3)
  25. FCFLAGS = -fdefault-real-8 -J. -g
  26. LDLIBS = $(shell pkg-config --libs starpu-1.3)
  27. OBJS = $(SRCSC:%.c=%.o) $(SRCSF:%.f90=%.o)
  28. .phony: all clean
  29. all: $(PROG)
  30. $(PROG): $(OBJS)
  31. $(FC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  32. %.o: %.c
  33. $(CC) $(CFLAGS) -c -o $@ $<
  34. %.o: %.f90
  35. $(FC) $(FCFLAGS) -c -o $@ $<
  36. clean:
  37. rm -fv *.o *.mod $(PROG)
  38. # modfiles generation dependences
  39. mod_compute.o: mod_compute.f90 mod_types.o mod_interface.o
  40. f90_example.o: f90_example.f90 mod_types.o mod_interface.o mod_compute.o