PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Lib/perl5/Makefile.in

#
Autoconf | 138 lines | 54 code | 41 blank | 43 comment | 0 complexity | 42c419bd520d01c19890baa402fa8ad7 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. # ---------------------------------------------------------------
  2. # SWIG Perl5 Makefile
  3. #
  4. # This file can be used to build various Perl5 extensions with SWIG.
  5. # By default this file is set up for dynamic loading, but it can
  6. # be easily customized for static extensions by modifying various
  7. # portions of the file.
  8. #
  9. # SRCS = C source files
  10. # CXXSRCS = C++ source files
  11. # OBJCSRCS = Objective-C source files
  12. # OBJS = Additional .o files (compiled previously)
  13. # INTERFACE = SWIG interface file
  14. # TARGET = Name of target module or executable
  15. #
  16. # Many portions of this file were created by the SWIG configure
  17. # script and should already reflect your machine.
  18. #----------------------------------------------------------------
  19. SRCS =
  20. CXXSRCS =
  21. OBJCSRCS =
  22. OBJS =
  23. INTERFACE =
  24. WRAPFILE = $(INTERFACE:.i=_wrap.c)
  25. WRAPOBJ = $(INTERFACE:.i=_wrap.o)
  26. TARGET = module@SO@ # Use this kind of target for dynamic loading
  27. #TARGET = myperl # Use this target for static linking
  28. prefix = @prefix@
  29. exec_prefix = @exec_prefix@
  30. CC = @CC@
  31. CXX = @CXX@
  32. OBJC = @CC@ -Wno-import # -Wno-import needed for gcc
  33. CFLAGS =
  34. INCLUDES =
  35. LIBS =
  36. # SWIG Options
  37. # SWIG = location of the SWIG executable
  38. # SWIGOPT = SWIG compiler options
  39. # SWIGCC = Compiler used to compile the wrapper file
  40. SWIG = $(exec_prefix)/bin/swig
  41. SWIGOPT = -perl5
  42. SWIGCC = $(CC)
  43. # SWIG Library files. Uncomment this to staticly rebuild Perl
  44. #SWIGLIB = -static -lperlmain.i
  45. # Rules for creating .o files from source.
  46. COBJS = $(SRCS:.c=.o)
  47. CXXOBJS = $(CXXSRCS:.cxx=.o)
  48. OBJCOBJS = $(OBJCSRCS:.m=.o)
  49. ALLOBJS = $(COBJS) $(CXXOBJS) $(OBJCOBJS) $(OBJS)
  50. # Command that will be used to build the final extension.
  51. BUILD = $(SWIGCC)
  52. # Uncomment the following if you are using dynamic loading
  53. CCSHARED = @CCSHARED@
  54. BUILD = @LDSHARED@
  55. # Uncomment the following if you are using dynamic loading with C++ and
  56. # need to provide additional link libraries (this is not always required).
  57. #DLL_LIBS = -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \
  58. -L/usr/local/lib -lg++ -lstdc++ -lgcc
  59. # X11 installation (possibly needed if using Perl-Tk)
  60. XLIB = @XLIBSW@
  61. XINCLUDE = @XINCLUDES@
  62. # Perl installation
  63. PERL_INCLUDE = -I@PERL5EXT@
  64. PERL_LIB = -L@PERL5EXT@ -lperl
  65. PERL_FLAGS = -Dbool=char -Dexplicit=
  66. # Tcl installation. If using Tk you might need this
  67. TCL_INCLUDE = @TCLINCLUDE@
  68. TCL_LIB = @TCLLIB@
  69. # Build libraries (needed for static builds)
  70. LIBM = @LIBM@
  71. LIBC = @LIBC@
  72. SYSLIBS = $(LIBM) $(LIBC) @LIBS@
  73. # Build options (uncomment only one these)
  74. #TK_LIB = $(TCL_LIB) -ltcl -ltk $(XLIB)
  75. BUILD_LIBS = $(LIBS) # Dynamic loading
  76. #BUILD_LIBS = $(PERL_LIB) $(TK_LIB) $(LIBS) $(SYSLIBS) # Static linking
  77. # Compilation rules for non-SWIG components
  78. .SUFFIXES: .c .cxx .m
  79. .c.o:
  80. $(CC) $(CCSHARED) $(CFLAGS) $(INCLUDES) -c $<
  81. .cxx.o:
  82. $(CXX) $(CCSHARED) $(CXXFLAGS) $(INCLUDES) -c $<
  83. .m.o:
  84. $(OBJC) $(CCSHARED) $(CFLAGS) $(INCLUDES) -c $<
  85. # ----------------------------------------------------------------------
  86. # Rules for building the extension
  87. # ----------------------------------------------------------------------
  88. all: $(TARGET)
  89. # Convert the wrapper file into an object file
  90. $(WRAPOBJ) : $(WRAPFILE)
  91. $(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(PERL_INCLUDE) $(PERL_FLAGS) $(WRAPFILE)
  92. $(WRAPFILE) : $(INTERFACE)
  93. $(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIB) $(INTERFACE)
  94. $(TARGET): $(WRAPOBJ) $(ALLOBJS)
  95. $(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET)
  96. clean:
  97. rm -f $(COBJS) $(CXXOBJS) $(OBJCOBJS) $(WRAPOBJ) $(WRAPFILE) $(TARGET)