Alternative library and kernel for add-in development on fx-9860G and fx-CG50 under Linux.
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.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #! /usr/bin/make -f
  2. builds := $(wildcard build*)
  3. ifeq "$(builds)" ""
  4. nobuild:
  5. @ echo "error: you don't seem to have any build directory (build*)" >&2
  6. @ echo "" >&2
  7. @ echo "You can configure one like this:" >&2
  8. @ echo " mkdir build && cd build && ../configure [options...]" >&2
  9. @ echo "" >&2
  10. @ false
  11. endif
  12. #
  13. # all targets
  14. #
  15. all-targets := $(foreach b,$(builds),all-$b)
  16. all: $(all-targets)
  17. all-build%: build%
  18. @ echo -e "\n$B::$W Making into $<$N"
  19. @ $(MAKE) --no-print-directory -C $<
  20. #
  21. # install targets
  22. #
  23. install-targets := $(foreach b,$(builds),install-$b)
  24. install: $(install-targets)
  25. install-build%: build%
  26. @ echo -e "\n$B::$W Installing from $<$N"
  27. @ $(MAKE) --no-print-directory -C $< install
  28. #
  29. # uninstall targets
  30. #
  31. uninstall-targets := $(foreach b,$(builds),uninstall-$b)
  32. uninstall: $(uninstall-targets)
  33. uninstall-build%: build%
  34. @ echo -e "\n$B::$W Uninstalling from $<$N"
  35. @ $(MAKE) --no-print-directory -C $< uninstall
  36. #
  37. # Coloring tools
  38. #
  39. B = \e[34;1m
  40. W = \e[39;1m
  41. N = \e[0m
  42. .PHONY: nobuild all all-build% install install-build%