PageRenderTime 38ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Lib/python/Makefile.in

#
Autoconf | 135 lines | 53 code | 39 blank | 43 comment | 0 complexity | 40cff0cdca689e4d22569b73ea5fbba2 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. # ---------------------------------------------------------------
  2. # SWIG Python Makefile
  3. #
  4. # This file can be used to build various Python 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 = mypython # 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 = -python
  42. SWIGCC = $(CC)
  43. # SWIG Library files. Uncomment if rebuilding the Python interpreter
  44. #SWIGLIB = -lembed.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 (needed if rebuilding Python + tkinter)
  60. XLIB = @XLIBSW@
  61. XINCLUDE = @XINCLUDES@
  62. # Python installation
  63. PY_INCLUDE = -DHAVE_CONFIG_H @PYINCLUDE@
  64. PY_LIB = @PYLIB@
  65. # Tcl installation. Needed if rebuilding Python with tkinter.
  66. TCL_INCLUDE = @TCLINCLUDE@
  67. TCL_LIB = @TCLLIB@
  68. # Build libraries (needed for static builds)
  69. LIBM = @LIBM@
  70. LIBC = @LIBC@
  71. SYSLIBS = $(LIBM) $(LIBC) @LIBS@
  72. # Build options (uncomment only one these)
  73. #TKINTER = $(TCL_LIB) -ltk -ltcl $(XLIB)
  74. BUILD_LIBS = $(LIBS) # Dynamic loading
  75. #BUILD_LIBS = $(PY_LIB) @PYLINK@ $(TKINTER) $(LIBS) $(SYSLIBS)
  76. # Compilation rules for non-SWIG components
  77. .SUFFIXES: .c .cxx .m
  78. .c.o:
  79. $(CC) $(CCSHARED) $(CFLAGS) $(INCLUDES) -c $<
  80. .cxx.o:
  81. $(CXX) $(CCSHARED) $(CXXFLAGS) $(INCLUDES) -c $<
  82. .m.o:
  83. $(OBJC) $(CCSHARED) $(CFLAGS) $(INCLUDES) -c $<
  84. # ----------------------------------------------------------------------
  85. # Rules for building the extension
  86. # ----------------------------------------------------------------------
  87. all: $(TARGET)
  88. # Convert the wrapper file into an object file
  89. $(WRAPOBJ) : $(WRAPFILE)
  90. $(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(WRAPFILE) $(INCLUDES) $(PY_INCLUDE)
  91. $(WRAPFILE) : $(INTERFACE)
  92. $(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIB) $(INTERFACE)
  93. $(TARGET): $(WRAPOBJ) $(ALLOBJS)
  94. $(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET)
  95. clean:
  96. rm -f $(COBJS) $(CXXOBJS) $(OBJCOBJS) $(WRAPOBJ) $(WRAPFILE) $(TARGET)