generic.tpl 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. [+ autogen5 template -*- Scheme -*- am +]
  2. [+ #|
  3. generic.tpl - template to be included by main.tpl
  4. Copyright (C) 2015 Alex Vong
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software Foundation,
  15. Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |# +]
  16. [+ #| What get cleaned by `$ make mostlyclean' |# +]
  17. [+ (if-use-threads
  18. "MOSTLYCLEANFILES = mlucas.cfg TRICKY_O.tmp TRICKY_O.stamp"
  19. " NORMAL_O-THREADS_O.tmp NORMAL_O-THREADS_O.stamp"
  20. " NORMAL_O.tmp NORMAL_O.stamp") +]
  21. [+ #| Recipe of mlucas (binary) |# +]
  22. bin_PROGRAMS = mlucas
  23. mlucas_SOURCES = [+ #| '() |# +]
  24. [+ (if-use-threads
  25. (list "mlucas_LDADD="
  26. (source-name->object-name (get "normal_c") (get "tricky_c")))
  27. (list (source-name->object-name (get "threads_c"))
  28. " -lpthread -lrt")
  29. "") +]
  30. [+ (if-use-threads
  31. (list "mlucas_DEPENDENCIES="
  32. (source-name->object-name (get "normal_c") (get "tricky_c")))
  33. (source-name->object-name (get "threads_c"))
  34. "") +]
  35. [+ #| Recipe of object files |# +]
  36. [+ (if-use-threads
  37. ""
  38. (generate-compilation-rule
  39. (source-name->path-name (get "normal_c") (get "threads_c"))
  40. "$(NORMALCFLAGS)"
  41. "NORMAL_O-THREADS_O"
  42. (source-name->object-name (get "normal_c") (get "threads_c"))
  43. (source-name->path-name (get "normal_c") (get "threads_c"))
  44. "echo ' CC $$NORMAL_O $$THREADS_O'"
  45. "./")
  46. (generate-compilation-rule
  47. (source-name->path-name (get "normal_c"))
  48. "$(NORMALCFLAGS)"
  49. "NORMAL_O"
  50. (source-name->object-name (get "normal_c"))
  51. (source-name->path-name (get "normal_c"))
  52. "echo ' CC $$NORMAL_O'"
  53. "./")) +]
  54. [+ (generate-compilation-rule
  55. (source-name->path-name (get "tricky_c"))
  56. "$(TRICKYCFLAGS)"
  57. "TRICKY_O"
  58. (source-name->object-name (get "tricky_c"))
  59. (source-name->path-name (get "tricky_c"))
  60. "echo ' CC $$TRICKY_O'"
  61. "./") +]