Advertisement
chemoelectric

Untitled

Feb 4th, 2013
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.55 KB | None | 0 0
  1. # Copyright (C) 2012 by Barry Schwartz
  2. #
  3. # Redistribution and use in source and binary forms, with or without
  4. # modification, are permitted provided that the following conditions are met:
  5. #
  6. # Redistributions of source code must retain the above copyright notice, this
  7. # list of conditions and the following disclaimer.
  8. #
  9. # Redistributions in binary form must reproduce the above copyright notice,
  10. # this list of conditions and the following disclaimer in the documentation
  11. # and/or other materials provided with the distribution.
  12. #
  13. # The name of the author may not be used to endorse or promote products
  14. # derived from this software without specific prior written permission.
  15. #
  16. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  17. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  18. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  19. # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  20. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  21. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  22. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  23. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  24. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  25. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26.  
  27. include $(top_srcdir)/mk/flags.am
  28. @includemk@ $(top_srcdir)/mk/scheme.mk
  29. @includemk@ $(top_srcdir)/mk/tig.mk
  30. @includemk@ $(top_srcdir)/mk/cython.mk
  31.  
  32. FFINCLDIRS = '-I$(top_builddir)/fontforge' \
  33. '-I$(top_srcdir)/fontforge'
  34.  
  35. AM_CYTHONFLAGS = '-I$(top_builddir)/inc' '-I$(top_srcdir)/inc' \
  36. '-I$(top_builddir)/python' '-I$(top_srcdir)/python'
  37.  
  38. EXTRA_DIST =
  39. MOSTLYCLEANFILES =
  40. CLEANFILES =
  41. DISTCLEANFILES =
  42.  
  43. EXTRA_DIST += tig.scm
  44.  
  45. #--------------------------------------------------------------------------
  46.  
  47. DIST_SCM_FILES =
  48. DIST_SCM_IN_FILES =
  49. CONFIGURE_GENERATED_SCM_FILES =
  50. MAKEFILE_GENERATED_SCM_FILES =
  51. GO_FILES =
  52.  
  53. nobase_dist_guilemodule_DATA = $(DIST_SCM_FILES)
  54. nobase_nodist_guilemodule_DATA = $(CONFIGURE_GENERATED_SCM_FILES) \
  55. $(MAKEFILE_GENERATED_SCM_FILES)
  56. EXTRA_DIST += $(DIST_SCM_IN_FILES)
  57. MOSTLYCLEANFILES += $(MAKEFILE_GENERATED_SCM_FILES) $(GO_FILES)
  58.  
  59. DIST_SCM_FILES += sortsmill/alloc.scm sortsmill/gsl.scm \
  60. sortsmill/iconv.scm sortsmill/linalg.scm sortsmill/polyspline.scm \
  61. sortsmill/brentroot.scm sortsmill/sfd-to-sxml.scm \
  62. sortsmill/views.scm sortsmill/api-syntax.scm \
  63. sortsmill/notices.scm sortsmill/strings.scm \
  64. sortsmill/ffcompat.scm sortsmill/i18n.scm sortsmill/dynlink.scm
  65. #sortsmill/precompute.scm
  66. GO_FILES += sortsmill/alloc.go sortsmill/gsl.go sortsmill/iconv.go \
  67. sortsmill/linalg.go sortsmill/polyspline.go \
  68. sortsmill/brentroot.go sortsmill/sfd-to-sxml.go \
  69. sortsmill/views.go sortsmill/api-syntax.go sortsmill/notices.go \
  70. sortsmill/strings.go sortsmill/ffcompat.go sortsmill/i18n.go \
  71. sortsmill/dynlink.go
  72.  
  73. DIST_SCM_IN_FILES += sortsmill/machine.scm.in \
  74. sortsmill/math-constants.scm.in sortsmill/pkg-info.scm.in
  75. CONFIGURE_GENERATED_SCM_FILES += sortsmill/machine.scm \
  76. sortsmill/math-constants.scm sortsmill/pkg-info.scm
  77. GO_FILES += sortsmill/machine.go sortsmill/math-constants.go \
  78. sortsmill/pkg-info.go
  79.  
  80. MAKEFILE_GENERATED_SCM_FILES += sortsmill/fontforge-api.scm
  81. GO_FILES += sortsmill/fontforge-api.go
  82.  
  83. if HAVE_PURE_API
  84. DIST_SCM_FILES += sortsmill/pure.scm
  85. GO_FILES += sortsmill/pure.go
  86. endif HAVE_PURE_API
  87.  
  88. if HAVE_PYTHON_API
  89. DIST_SCM_FILES += sortsmill/python.scm
  90. GO_FILES += sortsmill/python.go
  91. endif HAVE_PYTHON_API
  92.  
  93. if HAVE_GUI
  94.  
  95. DIST_SCM_FILES += sortsmill/usermenu.scm
  96. GO_FILES += sortsmill/usermenu.go
  97.  
  98. if HAVE_PURE_API
  99. DIST_SCM_FILES += sortsmill/usermenu/pure.scm
  100. GO_FILES += sortsmill/usermenu/pure.go
  101. endif HAVE_PURE_API
  102.  
  103. if HAVE_PYTHON_API
  104. DIST_SCM_FILES += sortsmill/usermenu/python.scm
  105. GO_FILES += sortsmill/usermenu/python.go
  106. endif HAVE_PYTHON_API
  107.  
  108. MAKEFILE_GENERATED_SCM_FILES += sortsmill/gdraw-api.scm
  109. GO_FILES += sortsmill/gdraw-api.go
  110.  
  111. endif HAVE_GUI
  112.  
  113. sortsmill/machine.go sortsmill/brentroot.go sortsmill/sfd-to-sxml.go: sortsmill/math-constants.go
  114. sortsmill/api-syntax.go sortsmill/usermenu.go sortsmill/usermenu/python.go: sortsmill/machine.go
  115. sortsmill/views.go: sortsmill/fontforge-api.go
  116. sortsmill/usermenu.go: sortsmill/fontforge-api.go sortsmill/gdraw-api.go
  117. sortsmill/usermenu/pure.go: sortsmill/fontforge-api.go sortsmill/gdraw-api.go
  118. sortsmill/usermenu/python.go: sortsmill/fontforge-api.go sortsmill/gdraw-api.go sortsmill/usermenu.go
  119.  
  120. sortsmill/fontforge-api.scm: \
  121. $(top_builddir)/fontforge/fontforge.types.apii \
  122. $(srcdir)/generate-guile-api.scm \
  123. ff-internal/generate-types.scm
  124. $(AM_V_GEN)
  125. $(AM_V_at)$(GUILE_INTERPRET) $(srcdir)/generate-guile-api.scm \
  126. '(sortsmill fontforge-api)' $(filter %.apii, $^) > $@-tmp
  127. $(AM_V_at)mv $@-tmp $@
  128.  
  129. sortsmill/gdraw-api.scm: $(top_builddir)/gdraw/gdraw.types.apii \
  130. $(srcdir)/generate-guile-api.scm \
  131. ff-internal/generate-types.scm
  132. $(AM_V_GEN)
  133. $(AM_V_at)$(GUILE_INTERPRET) $(srcdir)/generate-guile-api.scm \
  134. '(sortsmill gdraw-api)' $< > $@-tmp
  135. $(AM_V_at)mv $@-tmp $@
  136.  
  137. EXTRA_DIST += generate-guile-api.scm ff-internal/generate-types.scm
  138.  
  139. #--------------------------------------------------------------------------
  140.  
  141. nodist_pkgguiledata_DATA = site-init.scm site-final.scm
  142.  
  143. EXTRA_DIST += site-init.scm.in site-final.scm.in
  144. MOSTLYCLEANFILES += site-init.scm site-final.scm
  145.  
  146. #--------------------------------------------------------------------------
  147.  
  148. libguile_sortsmill_symbols.c: $(DIST_SCM_FILES) $(NODIST_SCM_FILES)
  149. $(AM_V_GEN)
  150. $(AM_V_at)$(GUILE_INTERPRET) \
  151. $(srcdir)/generate-libguile-sortsmill_symbols.scm $^ > $@-tmp
  152. $(AM_V_at)mv $@-tmp $@
  153.  
  154. CLEANFILES += libguile_sortsmill_symbols.c
  155.  
  156. AM_LDFLAGS = -module -release $(VERSION) $(MY_CFLAGS) $(MY_LIBS)
  157.  
  158. lib_LTLIBRARIES =
  159.  
  160. lib_LTLIBRARIES += libguile-sortsmill_symbols.la
  161. libguile_sortsmill_symbols_la_SOURCES = libguile_sortsmill_symbols.c
  162. libguile_sortsmill_symbols_la_CPPFLAGS = $(AM_CPPFLAGS) $(FFINCLDIRS)
  163. libguile_sortsmill_symbols_la_CFLAGS = $(AM_CFLAGS) \
  164. $(NO_OPTIMIZATION_EXTRA_CFLAGS)
  165. libguile_sortsmill_symbols_la_LIBADD = \
  166. $(top_builddir)/fontforge/libsortsmill_fontforgeexe.la \
  167. $(top_builddir)/fontforge/libsortsmill_fontforge.la \
  168. $(top_builddir)/auxiliary/libsortsmill_aux.la
  169.  
  170. if HAVE_PYTHON_API
  171.  
  172. lib_LTLIBRARIES += libguile-sortsmill_cython.la
  173. libguile_sortsmill_cython_la_SOURCES = libguile_sortsmill_cython.c
  174. libguile_sortsmill_cython_la_CFLAGS = $(AM_CFLAGS) \
  175. $(CYTHON_EXTRA_CFLAGS)
  176. libguile_sortsmill_cython_la_LDFLAGS = -module -release $(VERSION) \
  177. $(PYTHON_LIBS)
  178. libguile_sortsmill_cython_la_LIBADD = \
  179. $(top_builddir)/auxiliary/libsortsmill_aux.la \
  180. $(top_builddir)/lib/libgnu.la
  181.  
  182. libguile_sortsmill_cython.c: libguile_sortsmill_cython.pyx \
  183. $(top_builddir)/inc/sortsmill/cython/config.pxi \
  184. $(top_srcdir)/inc/sortsmill/cython/guile.pxd \
  185. $(top_srcdir)/inc/sortsmill/cython/xgc.pxd
  186.  
  187. EXTRA_DIST += libguile_sortsmill_cython.pyx
  188. MOSTLYCLEANFILES += libguile_sortsmill_cython.c \
  189. libguile_sortsmill_cython.h
  190.  
  191. endif HAVE_PYTHON_API
  192.  
  193. #--------------------------------------------------------------------------
  194.  
  195. all-local: $(GO_FILES)
  196.  
  197. # The following rules are unpleasant but avoid having to keep track of
  198. # dependencies. Consolation: it is no worse than if we used a
  199. # whole-program compiler.
  200. $(filter-out sortsmill/pkg-info.go sortsmill/dynlink.go, $(GO_FILES)): \
  201. $(DIST_SCM_FILES) $(CONFIGURE_GENERATED_SCM_FILES) \
  202. $(MAKEFILE_GENERATED_SCM_FILES) $(lib_LTLIBRARIES)
  203. $(filter sortsmill/pkg-info.go sortsmill/dynlink.go, $(GO_FILES)): \
  204. $(DIST_SCM_FILES) $(CONFIGURE_GENERATED_SCM_FILES) \
  205. $(MAKEFILE_GENERATED_SCM_FILES) $(filter-out \
  206. libguile_sortsmill_symbols.la, $(lib_LTLIBRARIES))
  207.  
  208. # Try to ensure that the installed bitcode files are newer than the
  209. # installed source files, by installing the bitcode files with this
  210. # hook.
  211. install-data-hook: $(GO_FILES)
  212. @(for f in $(GO_FILES); do \
  213. path="$(DESTDIR)$(guileobjmoduledir)/$${f}"; \
  214. d=`echo "$${path}" | LC_ALL=C $(SED) -e 's|[^/]*$$||'`; \
  215. $(MKDIR_P) "$${d}"; \
  216. echo "$(INSTALL_DATA) $${f} $${d}"; \
  217. $(INSTALL_DATA) "$${f}" "$${d}"; \
  218. done)
  219.  
  220. uninstall-local:
  221. @(for f in $(GO_FILES); do \
  222. path="$(DESTDIR)$(guileobjmoduledir)/$${f}"; \
  223. echo "rm -f $${path}"; \
  224. rm -f "$${path}" || : ; \
  225. done)
  226.  
  227. #--------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement