PageRenderTime 52ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/Source/Makefile.am

https://github.com/sunaku/swig-ruby-ffi
Makefile | 145 lines | 117 code | 17 blank | 11 comment | 10 complexity | b57093322c09c4742ec501cf11210a5c MD5 | raw file
Possible License(s): 0BSD, GPL-2.0, LGPL-2.1
  1. ## Process this file with automake to produce Makefile.in
  2. # subdir-objects generates object files using the directory structure of the source files.
  3. AUTOMAKE_OPTIONS = foreign nostdinc subdir-objects 1.7.2
  4. SOURCE_DIR=$(top_srcdir)/Source
  5. BUILD_SOURCE_DIR=$(top_builddir)/Source
  6. SWIG_CXX_DEFS = @SWILL@
  7. AM_CPPFLAGS = -I$(BUILD_SOURCE_DIR)/Include \
  8. -I$(BUILD_SOURCE_DIR)/CParse \
  9. -I$(SOURCE_DIR)/Include \
  10. -I$(SOURCE_DIR)/DOH \
  11. -I$(SOURCE_DIR)/CParse \
  12. -I$(SOURCE_DIR)/Preprocessor \
  13. -I$(SOURCE_DIR)/Swig \
  14. -I$(SOURCE_DIR)/Modules
  15. AM_CXXFLAGS = $(SWIG_CXX_DEFS)
  16. AM_YFLAGS = -d
  17. BUILT_SOURCES = CParse/parser.h
  18. eswig_SOURCES = CParse/cscanner.c \
  19. CParse/parser.y \
  20. CParse/templ.c \
  21. CParse/util.c \
  22. DOH/base.c \
  23. DOH/file.c \
  24. DOH/fio.c \
  25. DOH/hash.c \
  26. DOH/list.c \
  27. DOH/memory.c \
  28. DOH/string.c \
  29. DOH/void.c \
  30. Modules/allegrocl.cxx \
  31. Modules/allocate.cxx \
  32. Modules/browser.cxx \
  33. Modules/cffi.cxx \
  34. Modules/chicken.cxx \
  35. Modules/clisp.cxx \
  36. Modules/contract.cxx \
  37. Modules/csharp.cxx \
  38. Modules/directors.cxx \
  39. Modules/emit.cxx \
  40. Modules/guile.cxx \
  41. Modules/java.cxx \
  42. Modules/lang.cxx \
  43. Modules/lua.cxx \
  44. Modules/main.cxx \
  45. Modules/modula3.cxx \
  46. Modules/module.cxx \
  47. Modules/mzscheme.cxx \
  48. Modules/ocaml.cxx \
  49. Modules/octave.cxx \
  50. Modules/overload.cxx \
  51. Modules/perl5.cxx \
  52. Modules/php.cxx \
  53. Modules/pike.cxx \
  54. Modules/python.cxx \
  55. Modules/r.cxx \
  56. Modules/ruby.cxx \
  57. Modules/ruby-ffi.cxx \
  58. Modules/s-exp.cxx \
  59. Modules/swigmain.cxx \
  60. Modules/tcl8.cxx \
  61. Modules/typepass.cxx \
  62. Modules/uffi.cxx \
  63. Modules/utils.cxx \
  64. Modules/xml.cxx \
  65. Preprocessor/cpp.c \
  66. Preprocessor/expr.c \
  67. Swig/cwrap.c \
  68. Swig/deprecate.c \
  69. Swig/error.c \
  70. Swig/fragment.c \
  71. Swig/getopt.c \
  72. Swig/include.c \
  73. Swig/misc.c \
  74. Swig/naming.c \
  75. Swig/parms.c \
  76. Swig/scanner.c \
  77. Swig/stype.c \
  78. Swig/symbol.c \
  79. Swig/tree.c \
  80. Swig/typeobj.c \
  81. Swig/typemap.c \
  82. Swig/typesys.c \
  83. Swig/warn.c \
  84. Swig/wrapfunc.c
  85. bin_PROGRAMS = eswig
  86. eswig_LDADD = @SWIGLIBS@
  87. # Override the link stage to avoid using Libtool
  88. CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
  89. # The executable is copied to the root directory for installation and running the test-suite.
  90. # This occurs on each invocation of make and is a step towards providing support for multiple
  91. # build directories.
  92. all-local: eswig@EXEEXT@
  93. cp -f $(top_builddir)/Source/eswig@EXEEXT@ $(top_builddir)/swig@EXEEXT@
  94. clean-local:
  95. rm -f $(top_builddir)/swig@EXEEXT@
  96. rm -f core @EXTRA_CLEAN@
  97. # Beautify the code.
  98. # Note that this works well on C code, but does some odd joining of lines for C++ code.
  99. # Compiling with -DNDEBUG and no optimisations will allow one to do a binary diff of the
  100. # swig executable as a way of checking before and after the 'beautifying'.
  101. # Single files can be beautified with the beautify-file target, eg: 'make beautify-file INDENTFILE=chosenfile.c'
  102. SWIGTYPEDEFS=-T File -T DohObjInfo -T Parm -T Language -T List -T Typetab -T ModuleFactory -T ErrorMessageFormat -T Symtab -T Hash -T String -T DohBase -T Node -T String_or_char -T SwigType -T Dispatcher -T Wrapper -T DohStringMethods -T DohFileMethods -T DohListMethods -T DohHashMethods -T DOH -T DohIterator -T ParmList -T FILE -T HashNode -T DOHString_or_char
  103. INDENTBAKSDIR=../IndentBaks
  104. beautify:
  105. rm -rf $(INDENTBAKSDIR)
  106. mkdir $(INDENTBAKSDIR)
  107. mkdir $(INDENTBAKSDIR)/CParse
  108. mkdir $(INDENTBAKSDIR)/DOH
  109. mkdir $(INDENTBAKSDIR)/Modules
  110. mkdir $(INDENTBAKSDIR)/Preprocessor
  111. mkdir $(INDENTBAKSDIR)/Swig
  112. mkdir $(INDENTBAKSDIR)/Include
  113. (csources=`find . -name "*.c"` && \
  114. hsources=`find . -name "*.h"` && \
  115. cxxsources=`find . -name "*.cxx"` && \
  116. for file in $$csources $$hsources $$cxxsources; do \
  117. $(MAKE) beautify-file INDENTFILE=$$file; \
  118. done; )
  119. beautify-file:
  120. test -e $(INDENTBAKSDIR) || (echo $(INDENTBAKSDIR) directory does not exist && exit 1;)
  121. test -n "$(INDENTFILE)" || (echo INDENTFILE not defined && exit 1;)
  122. test -e $(INDENTFILE) || (echo File does not exist: $(INDENTFILE) && exit 1;)
  123. cp $(INDENTFILE) $(INDENTBAKSDIR)/$(INDENTFILE);
  124. unix2dos $(INDENTFILE)
  125. dos2unix $(INDENTFILE)
  126. indent -kr --honour-newlines --line-length160 --indent-level2 --braces-on-func-def-line --leave-optional-blank-lines $(SWIGTYPEDEFS) $(INDENTFILE) -o $(INDENTFILE).tmp;
  127. cat $(INDENTFILE).tmp | sed -e 's/const const /const /' > $(INDENTFILE);
  128. rm $(INDENTFILE).tmp;