You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #
  2. # OpenCL for Lua.
  3. # Copyright © 2013–2015 Peter Colberg.
  4. # Distributed under the MIT license. (See accompanying file LICENSE.)
  5. #
  6. PREFIX = /usr/local
  7. LUADIR = $(PREFIX)/share/lua/5.1
  8. DOCDIR = $(PREFIX)/share/doc/lua-opencl
  9. INSTALL_D = mkdir -p
  10. INSTALL_F = install -m 644
  11. INSTALL_X = install -m 755
  12. FILES_LUA = C.lua init.lua
  13. FILES_DOC = index.mdwn INSTALL.mdwn README.mdwn mandelbrot.mdwn reference.mdwn CHANGES.mdwn
  14. FILES_DOC_HTML = index.html INSTALL.html README.html mandelbrot.html reference.html CHANGES.html pandoc.css lua-opencl.png mandelbrot.png parallel_sum.svg
  15. FILES_EXAMPLES_MANDELBROT_F = mandelbrot.cl config.lua
  16. FILES_EXAMPLES_MANDELBROT_X = mandelbrot.lua
  17. FILES_EXAMPLES_SUM_F = random.lua
  18. FILES_EXAMPLES_SUM_X = sum.lua
  19. all: test
  20. install:
  21. $(INSTALL_D) $(DESTDIR)$(LUADIR)/opencl
  22. cd opencl && $(INSTALL_F) $(FILES_LUA) $(DESTDIR)$(LUADIR)/opencl
  23. $(INSTALL_D) $(DESTDIR)$(DOCDIR)
  24. cd doc && $(INSTALL_F) $(FILES_DOC) $(FILES_DOC_HTML) $(DESTDIR)$(DOCDIR)
  25. $(INSTALL_D) $(DESTDIR)$(DOCDIR)/examples/mandelbrot
  26. cd examples/mandelbrot && $(INSTALL_F) $(FILES_EXAMPLES_MANDELBROT_F) $(DESTDIR)$(DOCDIR)/examples/mandelbrot
  27. cd examples/mandelbrot && $(INSTALL_X) $(FILES_EXAMPLES_MANDELBROT_X) $(DESTDIR)$(DOCDIR)/examples/mandelbrot
  28. $(INSTALL_D) $(DESTDIR)$(DOCDIR)/examples/sum
  29. cd examples/sum && $(INSTALL_F) $(FILES_EXAMPLES_SUM_F) $(DESTDIR)$(DOCDIR)/examples/sum
  30. cd examples/sum && $(INSTALL_X) $(FILES_EXAMPLES_SUM_X) $(DESTDIR)$(DOCDIR)/examples/sum
  31. clean:
  32. @$(MAKE) -C test clean
  33. SUBDIRS = test doc
  34. .PHONY: $(SUBDIRS)
  35. $(SUBDIRS):
  36. @$(MAKE) -C $@