Updates for building wxSWIG on Linux
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		| @@ -1 +1,6 @@ | ||||
| Makefile | ||||
| config.cache | ||||
| config.log | ||||
| config.status | ||||
| wxSWIG.dsp | ||||
| wxswig | ||||
|   | ||||
							
								
								
									
										1
									
								
								wxPython/wxSWIG/Modules/.cvsignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								wxPython/wxSWIG/Modules/.cvsignore
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| Makefile | ||||
| @@ -11,12 +11,12 @@ | ||||
|  | ||||
| prefix      = /usr/local | ||||
| exec_prefix = ${prefix} | ||||
| CC          = cc | ||||
| CC          = gcc | ||||
| AR          = ar | ||||
| RANLIB      = ranlib | ||||
| SO          = .so | ||||
| CCSHARED    =  | ||||
| LDSHARED    = ld -G | ||||
| CCSHARED    = -fpic | ||||
| LDSHARED    = gcc -shared | ||||
| DYN_LIBS    = libswigtcl8$(SO) libswigtcl$(SO) libswigpl$(SO) libswigpy$(SO) | ||||
| STATIC_LIBS = libswigtcl8.a libswigtcl.a libswigpl.a libswigpy.a | ||||
| LIBS        = $(STATIC_LIBS) $(DYN_LIBS) | ||||
| @@ -54,7 +54,7 @@ clean:: | ||||
| # Tcl runtime library | ||||
| # ---------------------------------------------------------------------- | ||||
|  | ||||
| TCL_INCLUDE = -I/usr/local/include | ||||
| TCL_INCLUDE = -I/usr/include | ||||
| TCL_LIB     = -L/usr/local/lib | ||||
|  | ||||
| # Tcl 7.x shared | ||||
| @@ -87,8 +87,8 @@ tcl8_lib: | ||||
| # Python run-time library | ||||
| # ---------------------------------------------------------------------- | ||||
|  | ||||
| PYTHON_INCLUDE= -DHAVE_CONFIG_H -I/usr/local/include/python1.5 -I/usr/local/lib/python1.5/config | ||||
| PYTHON_LIB    = /usr/local/lib/python1.5/config | ||||
| PYTHON_INCLUDE= -DHAVE_CONFIG_H -I/usr/local/include/Py -I/usr/local/lib/python/lib | ||||
| PYTHON_LIB    = /usr/local/lib/python/lib | ||||
|  | ||||
| # Python shared | ||||
|  | ||||
| @@ -108,7 +108,7 @@ py_lib: | ||||
| # Perl run-time library | ||||
| # ---------------------------------------------------------------------- | ||||
|  | ||||
| PERL5_INCLUDE= -I/usr/local/lib/perl5/5.00503/sun4-solaris/CORE | ||||
| PERL5_INCLUDE= -I/usr/lib/perl5/5.6.1/i386-linux/CORE | ||||
|  | ||||
| # Perl shared | ||||
|  | ||||
|   | ||||
							
								
								
									
										1
									
								
								wxPython/wxSWIG/SWIG/.cvsignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								wxPython/wxSWIG/SWIG/.cvsignore
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| Makefile | ||||
| @@ -81,8 +81,10 @@ FILE  *swig_log; | ||||
|  | ||||
| char *SwigLib; | ||||
|  | ||||
| //char** __argv; | ||||
| //int    __argc; | ||||
| #ifndef MSDOS | ||||
| char** __argv; | ||||
| int    __argc; | ||||
| #endif | ||||
|  | ||||
| int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) { | ||||
|  | ||||
| @@ -114,8 +116,10 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) { | ||||
|   f_init = 0; | ||||
|   f_header = 0; | ||||
|  | ||||
|   //__argc = argc; | ||||
|   //__argv = argv; | ||||
| #ifndef MSDOS | ||||
|   __argc = argc; | ||||
|   __argv = argv; | ||||
| #endif | ||||
|   lang = l; | ||||
|   doc = d; | ||||
|   Status = 0; | ||||
|   | ||||
							
								
								
									
										405
									
								
								wxPython/wxSWIG/configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										405
									
								
								wxPython/wxSWIG/configure
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -47,7 +47,7 @@ dnl Checks for library functions. | ||||
|  | ||||
| AC_FUNC_ALLOCA | ||||
| AC_ARG_WITH(lang,[  --with-lang=LANG        Set SWIG target language (TCL,TCL8,PYTHON,PERL5,PERL4,GUILE)],[ | ||||
| 	AC_DEFINE_UNQUOTED(SWIG_LANG,$withval)], [AC_DEFINE(SWIG_LANG,TCL)]) | ||||
| 	AC_DEFINE_UNQUOTED(SWIG_LANG,$withval)], [AC_DEFINE(SWIG_LANG,PYTHON)]) | ||||
|  | ||||
| AC_ARG_WITH(doc,[  --with-doc=DOC          Set SWIG target documentation method (ASCII,LATEX,HTML,NODOC)], [ | ||||
| 	AC_DEFINE_UNQUOTED(SWIG_DOC,$withval)], [AC_DEFINE(SWIG_DOC,ASCII)]) | ||||
| @@ -327,7 +327,7 @@ AC_SUBST(TCLLIB) | ||||
| PYINCLUDE=nope | ||||
| PYLIB=nope | ||||
| PYPACKAGE=nope | ||||
| PYLINK="-lModules -lPython -lObjects -lParser"  | ||||
| PYLINK="-lModules -lPython -lObjects -lParser" | ||||
|  | ||||
| AC_ARG_WITH(py,[  --with-py=path          Set location of Python],[ | ||||
| 	PYPACKAGE="$withval"], [PYPACKAGE=nope]) | ||||
| @@ -372,7 +372,7 @@ for i in $dirs ; do | ||||
| 	    AC_MSG_RESULT($i) | ||||
| 	    PYLIB="$i" | ||||
| 	    PYINCLUDE="$PYINCLUDE -I$i" | ||||
|             PYLINK="-lpython1.5"	 | ||||
|             PYLINK="-lpython1.5" | ||||
| 	    break | ||||
| 	fi | ||||
| 	if test -r $i/libPython.a; then | ||||
| @@ -420,11 +420,11 @@ if test "$PERL" != nope; then | ||||
| 				PERL5EXT="$i" | ||||
| 				break; | ||||
| 			fi | ||||
| 		done	 | ||||
| 		done | ||||
| 		if test "$PERL5EXT" = none; then | ||||
| 			PERL5EXT="$PERL5DIR/CORE" | ||||
| 			AC_MSG_RESULT(could not locate perl.h...using $PERL5EXT) | ||||
| 		fi	 | ||||
| 		fi | ||||
| 	else | ||||
| 		AC_MSG_RESULT(unable to determine perl5 configuration) | ||||
| 		PERL5EXT=$PERL5DIR | ||||
| @@ -436,7 +436,7 @@ if test "$PERL" != nope; then | ||||
|  | ||||
| AC_SUBST(PERL5EXT) | ||||
|  | ||||
| AC_OUTPUT(Makefile SWIG/Makefile Modules/Makefile Runtime/Makefile swig_lib/tcl/Makefile swig_lib/python/Makefile swig_lib/perl5/Makefile Makefile.template) | ||||
| AC_OUTPUT(Makefile SWIG/Makefile Modules/Makefile Runtime/Makefile swig_lib/tcl/Makefile swig_lib/python/Makefile swig_lib/perl5/Makefile) | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -1,140 +0,0 @@ | ||||
| # Generated automatically from Makefile.in by configure. | ||||
| # --------------------------------------------------------------- | ||||
| # $Header$ | ||||
| # SWIG Perl5 Makefile | ||||
| #  | ||||
| # This file can be used to build various Perl5 extensions with SWIG. | ||||
| # By default this file is set up for dynamic loading, but it can | ||||
| # be easily customized for static extensions by modifying various | ||||
| # portions of the file. | ||||
| # | ||||
| #        SRCS       = C source files | ||||
| #        CXXSRCS    = C++ source files | ||||
| #        OBJCSRCS   = Objective-C source files | ||||
| #        OBJS       = Additional .o files (compiled previously) | ||||
| #        INTERFACE  = SWIG interface file | ||||
| #        TARGET     = Name of target module or executable | ||||
| # | ||||
| # Many portions of this file were created by the SWIG configure | ||||
| # script and should already reflect your machine. | ||||
| #---------------------------------------------------------------- | ||||
|  | ||||
| SRCS          =  | ||||
| CXXSRCS       =  | ||||
| OBJCSRCS      =  | ||||
| OBJS          =  | ||||
| INTERFACE     =  | ||||
| WRAPFILE      = $(INTERFACE:.i=_wrap.c) | ||||
| WRAPOBJ       = $(INTERFACE:.i=_wrap.o) | ||||
| TARGET        = module.so # Use this kind of target for dynamic loading | ||||
| #TARGET        = myperl  # Use this target for static linking | ||||
|  | ||||
| prefix        = /usr/local | ||||
| exec_prefix   = ${prefix} | ||||
|  | ||||
| CC            = cc | ||||
| CXX           = CC | ||||
| OBJC          = cc -Wno-import # -Wno-import needed for gcc  | ||||
| CFLAGS        =  | ||||
| INCLUDE       = | ||||
| LIBS          = | ||||
|  | ||||
| # SWIG Options | ||||
| #     SWIG      = location of the SWIG executable | ||||
| #     SWIGOPT   = SWIG compiler options | ||||
| #     SWIGCC    = Compiler used to compile the wrapper file | ||||
|  | ||||
| SWIG          = $(exec_prefix)/bin/swig  | ||||
| SWIGOPT       = -perl5  | ||||
| SWIGCC        = $(CC)  | ||||
|  | ||||
| # SWIG Library files.  Uncomment this to staticly rebuild Perl | ||||
| #SWIGLIB       = -static -lperlmain.i | ||||
|  | ||||
| # Rules for creating .o files from source. | ||||
|  | ||||
| COBJS         = $(SRCS:.c=.o) | ||||
| CXXOBJS       = $(CXXSRCS:.cxx=.o) | ||||
| OBJCOBJS      = $(OBJCSRCS:.m=.o) | ||||
| ALLOBJS       = $(COBJS) $(CXXOBJS) $(OBJCOBJS) $(OBJS) | ||||
|  | ||||
| # Command that will be used to build the final extension. | ||||
| BUILD         = $(SWIGCC) | ||||
|  | ||||
| # Uncomment the following if you are using dynamic loading | ||||
| CCSHARED      =  | ||||
| BUILD         = ld -G | ||||
|  | ||||
| # Uncomment the following if you are using dynamic loading with C++ and | ||||
| # need to provide additional link libraries (this is not always required). | ||||
|  | ||||
| #DLL_LIBS      = -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \ | ||||
|              -L/usr/local/lib -lg++ -lstdc++ -lgcc | ||||
|  | ||||
| # X11 installation (possibly needed if using Perl-Tk) | ||||
|  | ||||
| XLIB          = -L/usr/openwin/lib -lX11 | ||||
| XINCLUDE      = -I/usr/openwin/include | ||||
|  | ||||
| # Perl installation | ||||
|  | ||||
| PERL_INCLUDE  = -I/usr/local/lib/perl5/5.00503/sun4-solaris/CORE | ||||
| PERL_LIB      = -L/usr/local/lib/perl5/5.00503/sun4-solaris/CORE -lperl  | ||||
| PERL_FLAGS    = -Dbool=char -Dexplicit= | ||||
|  | ||||
| # Tcl installation.  If using Tk you might need this | ||||
|  | ||||
| TCL_INCLUDE   = -I/usr/local/include | ||||
| TCL_LIB       = -L/usr/local/lib | ||||
|  | ||||
| # Build libraries (needed for static builds) | ||||
|  | ||||
| LIBM          = -lm | ||||
| LIBC          =  | ||||
| SYSLIBS       = $(LIBM) $(LIBC) -lsocket -lnsl -ldl  | ||||
|  | ||||
| # Build options (uncomment only one these) | ||||
|  | ||||
| #TK_LIB        = $(TCL_LIB) -ltcl -ltk $(XLIB) | ||||
| BUILD_LIBS    = $(LIBS) # Dynamic loading | ||||
| #BUILD_LIBS    = $(PERL_LIB) $(TK_LIB) $(LIBS) $(SYSLIBS)  # Static linking | ||||
|  | ||||
| # Compilation rules for non-SWIG components | ||||
|  | ||||
| .SUFFIXES: .c .cxx .m | ||||
|  | ||||
| .c.o: | ||||
| 	$(CC) $(CCSHARED) $(CFLAGS) $(INCLUDE) -c $< | ||||
|  | ||||
| .cxx.o: | ||||
| 	$(CXX) $(CCSHARED) $(CXXFLAGS) $(INCLUDE) -c $< | ||||
|  | ||||
| .m.o: | ||||
| 	$(OBJC) $(CCSHARED) $(CFLAGS) $(INCLUDE) -c $< | ||||
|  | ||||
|  | ||||
| # ---------------------------------------------------------------------- | ||||
| # Rules for building the extension | ||||
| # ---------------------------------------------------------------------- | ||||
|  | ||||
| all: $(TARGET) | ||||
|  | ||||
| # Convert the wrapper file into an object file | ||||
|  | ||||
| $(WRAPOBJ) : $(WRAPFILE) | ||||
| 	$(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(INCLUDE) $(PERL_INCLUDE) $(PERL_FLAGS) $(WRAPFILE) | ||||
|  | ||||
| $(WRAPFILE) : $(INTERFACE) | ||||
| 	$(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIB) $(INTERFACE) | ||||
|  | ||||
| $(TARGET): $(WRAPOBJ) $(ALLOBJS) | ||||
| 	$(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET) | ||||
|  | ||||
| clean: | ||||
| 	rm -f $(COBJS) $(CXXOBJS) $(OBJCOBJS) $(WRAPOBJ) $(WRAPFILE) $(TARGET) | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| @@ -1,137 +0,0 @@ | ||||
| # Generated automatically from Makefile.in by configure. | ||||
| # --------------------------------------------------------------- | ||||
| # $Header$ | ||||
| # SWIG Python Makefile | ||||
| #  | ||||
| # This file can be used to build various Python extensions with SWIG. | ||||
| # By default this file is set up for dynamic loading, but it can | ||||
| # be easily customized for static extensions by modifying various | ||||
| # portions of the file. | ||||
| # | ||||
| #        SRCS       = C source files | ||||
| #        CXXSRCS    = C++ source files | ||||
| #        OBJCSRCS   = Objective-C source files | ||||
| #        OBJS       = Additional .o files (compiled previously) | ||||
| #        INTERFACE  = SWIG interface file | ||||
| #        TARGET     = Name of target module or executable | ||||
| # | ||||
| # Many portions of this file were created by the SWIG configure | ||||
| # script and should already reflect your machine. | ||||
| #---------------------------------------------------------------- | ||||
|  | ||||
| SRCS          =  | ||||
| CXXSRCS       =  | ||||
| OBJCSRCS      =  | ||||
| OBJS          =  | ||||
| INTERFACE     =  | ||||
| WRAPFILE      = $(INTERFACE:.i=_wrap.c) | ||||
| WRAPOBJ       = $(INTERFACE:.i=_wrap.o) | ||||
| TARGET        = module.so # Use this kind of target for dynamic loading | ||||
| #TARGET        = mypython  # Use this target for static linking | ||||
|  | ||||
| prefix        = /usr/local | ||||
| exec_prefix   = ${prefix} | ||||
|  | ||||
| CC            = cc | ||||
| CXX           = CC | ||||
| OBJC          = cc -Wno-import # -Wno-import needed for gcc  | ||||
| CFLAGS        =  | ||||
| INCLUDE       = | ||||
| LIBS          = | ||||
|  | ||||
| # SWIG Options | ||||
| #     SWIG      = location of the SWIG executable | ||||
| #     SWIGOPT   = SWIG compiler options | ||||
| #     SWIGCC    = Compiler used to compile the wrapper file | ||||
|  | ||||
| SWIG          = $(exec_prefix)/bin/swig  | ||||
| SWIGOPT       = -python  | ||||
| SWIGCC        = $(CC)  | ||||
|  | ||||
| # SWIG Library files.  Uncomment if rebuilding the Python interpreter | ||||
| #SWIGLIB       = -lembed.i | ||||
|  | ||||
| # Rules for creating .o files from source. | ||||
|  | ||||
| COBJS         = $(SRCS:.c=.o) | ||||
| CXXOBJS       = $(CXXSRCS:.cxx=.o) | ||||
| OBJCOBJS      = $(OBJCSRCS:.m=.o) | ||||
| ALLOBJS       = $(COBJS) $(CXXOBJS) $(OBJCOBJS) $(OBJS) | ||||
|  | ||||
| # Command that will be used to build the final extension. | ||||
| BUILD         = $(SWIGCC) | ||||
|  | ||||
| # Uncomment the following if you are using dynamic loading | ||||
| CCSHARED      =  | ||||
| BUILD         = ld -G | ||||
|  | ||||
| # Uncomment the following if you are using dynamic loading with C++ and | ||||
| # need to provide additional link libraries (this is not always required). | ||||
|  | ||||
| #DLL_LIBS      = -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \ | ||||
|              -L/usr/local/lib -lg++ -lstdc++ -lgcc | ||||
|  | ||||
| # X11 installation (needed if rebuilding Python + tkinter) | ||||
|  | ||||
| XLIB          = -L/usr/openwin/lib -lX11 | ||||
| XINCLUDE      = -I/usr/openwin/include | ||||
|  | ||||
| # Python installation | ||||
|  | ||||
| PY_INCLUDE    = -DHAVE_CONFIG_H -I/usr/local/include/python1.5 -I/usr/local/lib/python1.5/config  | ||||
| PY_LIB        = /usr/local/lib/python1.5/config | ||||
|  | ||||
| # Tcl installation.  Needed if rebuilding Python with tkinter. | ||||
|  | ||||
| TCL_INCLUDE   = -I/usr/local/include | ||||
| TCL_LIB       = -L/usr/local/lib | ||||
|  | ||||
| # Build libraries (needed for static builds) | ||||
|  | ||||
| LIBM          = -lm | ||||
| LIBC          =  | ||||
| SYSLIBS       = $(LIBM) $(LIBC) -lsocket -lnsl -ldl  | ||||
|  | ||||
| # Build options (uncomment only one these) | ||||
|  | ||||
| #TKINTER      = $(TCL_LIB) -ltk -ltcl $(XLIB) | ||||
| BUILD_LIBS    = $(LIBS) # Dynamic loading | ||||
| #BUILD_LIBS    = $(PY_LIB) -lpython1.5 $(TKINTER) $(LIBS) $(SYSLIBS) | ||||
|  | ||||
| # Compilation rules for non-SWIG components | ||||
|  | ||||
| .SUFFIXES: .c .cxx .m | ||||
|  | ||||
| .c.o: | ||||
| 	$(CC) $(CCSHARED) $(CFLAGS) $(INCLUDE) -c $< | ||||
|  | ||||
| .cxx.o: | ||||
| 	$(CXX) $(CCSHARED) $(CXXFLAGS) $(INCLUDE) -c $< | ||||
|  | ||||
| .m.o: | ||||
| 	$(OBJC) $(CCSHARED) $(CFLAGS) $(INCLUDE) -c $< | ||||
|  | ||||
|  | ||||
| # ---------------------------------------------------------------------- | ||||
| # Rules for building the extension | ||||
| # ---------------------------------------------------------------------- | ||||
|  | ||||
| all: $(TARGET) | ||||
|  | ||||
| # Convert the wrapper file into an object file | ||||
|  | ||||
| $(WRAPOBJ) : $(WRAPFILE) | ||||
| 	$(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(WRAPFILE) $(INCLUDE) $(PY_INCLUDE)  | ||||
|  | ||||
| $(WRAPFILE) : $(INTERFACE) | ||||
| 	$(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIB) $(INTERFACE) | ||||
|  | ||||
| $(TARGET): $(WRAPOBJ) $(ALLOBJS) | ||||
| 	$(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET) | ||||
|  | ||||
| clean: | ||||
| 	rm -f $(COBJS) $(CXXOBJS) $(OBJCOBJS) $(WRAPOBJ) $(WRAPFILE) $(TARGET) | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| @@ -1,135 +0,0 @@ | ||||
| # Generated automatically from Makefile.in by configure. | ||||
| # --------------------------------------------------------------- | ||||
| # $Header$ | ||||
| # SWIG Tcl/Tk Makefile | ||||
| #  | ||||
| # This file can be used to build various Tcl extensions with SWIG. | ||||
| # By default this file is set up for dynamic loading, but it can | ||||
| # be easily customized for static extensions by modifying various | ||||
| # portions of the file.   | ||||
| # | ||||
| #        SRCS       = C source files | ||||
| #        CXXSRCS    = C++ source files | ||||
| #        OBJCSRCS   = Objective-C source files | ||||
| #        OBJS       = Additional .o files (compiled previously) | ||||
| #        INTERFACE  = SWIG interface file | ||||
| #        TARGET     = Name of target module or executable | ||||
| # | ||||
| # Many portions of this file were created by the SWIG configure | ||||
| # script and should already reflect your machine. However, you | ||||
| # may need to modify the Makefile to reflect your specific | ||||
| # application. | ||||
| #---------------------------------------------------------------- | ||||
|  | ||||
| SRCS          =  | ||||
| CXXSRCS       =  | ||||
| OBJCSRCS      =  | ||||
| OBJS          =  | ||||
| INTERFACE     =  | ||||
| WRAPFILE      = $(INTERFACE:.i=_wrap.c) | ||||
| WRAPOBJ       = $(INTERFACE:.i=_wrap.o) | ||||
| TARGET        = module.so # Use this kind of target for dynamic loading | ||||
| #TARGET        = my_tclsh  # Use this target for static linking | ||||
|  | ||||
| prefix        = /usr/local | ||||
| exec_prefix   = ${prefix} | ||||
|  | ||||
| CC            = cc | ||||
| CXX           = CC | ||||
| OBJC          = cc -Wno-import # -Wno-import needed for gcc  | ||||
| CFLAGS        =  | ||||
| INCLUDE       = | ||||
| LIBS          = | ||||
|  | ||||
| # SWIG Options | ||||
| #     SWIG      = location of the SWIG executable | ||||
| #     SWIGOPT   = SWIG compiler options | ||||
| #     SWIGCC    = Compiler used to compile the wrapper file | ||||
|  | ||||
| SWIG          = $(exec_prefix)/bin/swig  | ||||
| SWIGOPT       = -tcl # use -tcl8 for Tcl 8.0 | ||||
| SWIGCC        = $(CC)  | ||||
|  | ||||
| # SWIG Library files.  Uncomment one of these for rebuilding tclsh or wish | ||||
| #SWIGLIB       = -ltclsh.i | ||||
| #SWIGLIB       = -lwish.i | ||||
|  | ||||
| # Rules for creating .o files from source. | ||||
|  | ||||
| COBJS         = $(SRCS:.c=.o) | ||||
| CXXOBJS       = $(CXXSRCS:.cxx=.o) | ||||
| OBJCOBJS      = $(OBJCSRCS:.m=.o) | ||||
| ALLOBJS       = $(COBJS) $(CXXOBJS) $(OBJCOBJS) $(OBJS) | ||||
|  | ||||
| # Command that will be used to build the final extension. | ||||
| BUILD         = $(SWIGCC) | ||||
|  | ||||
| # Uncomment the following if you are using dynamic loading | ||||
| CCSHARED      =  | ||||
| BUILD         = ld -G | ||||
|  | ||||
| # Uncomment the following if you are using dynamic loading with C++ and | ||||
| # need to provide additional link libraries (this is not always required). | ||||
|  | ||||
| #DLL_LIBS      = -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \ | ||||
|              -L/usr/local/lib -lg++ -lstdc++ -lgcc | ||||
|  | ||||
| # X11 installation (needed to rebuild Tk extensions) | ||||
|  | ||||
| XLIB          = -L/usr/openwin/lib -lX11 | ||||
| XINCLUDE      = -I/usr/openwin/include | ||||
|  | ||||
| # Tcl installation (where is Tcl/Tk located) | ||||
|  | ||||
| TCL_INCLUDE   = -I/usr/local/include | ||||
| TCL_LIB       = -L/usr/local/lib | ||||
|  | ||||
| # Build libraries (needed for static builds) | ||||
|  | ||||
| LIBM          = -lm | ||||
| LIBC          =  | ||||
| SYSLIBS       = $(LIBM) $(LIBC) -lsocket -lnsl -ldl  | ||||
|  | ||||
| # Build options (uncomment only one these) | ||||
|  | ||||
| BUILD_LIBS    = $(LIBS) # Dynamic loading | ||||
| #BUILD_LIBS    = $(TCL_LIB) -ltcl $(LIBS) $(SYSLIBS) # tclsh   | ||||
| #BUILD_LIBS    = $(TCL_LIB) -ltk -ltcl $(XLIB) $(LIBS) $(SYSLIBS) # wish | ||||
|  | ||||
| # Compilation rules for non-SWIG components | ||||
|  | ||||
| .SUFFIXES: .c .cxx .m | ||||
|  | ||||
| .c.o: | ||||
| 	$(CC) $(CCSHARED) $(CFLAGS) $(INCLUDE) -c $< | ||||
|  | ||||
| .cxx.o: | ||||
| 	$(CXX) $(CCSHARED) $(CXXFLAGS) $(INCLUDE) -c $< | ||||
|  | ||||
| .m.o: | ||||
| 	$(OBJC) $(CCSHARED) $(CFLAGS) $(INCLUDE) -c $< | ||||
|  | ||||
|  | ||||
| # ---------------------------------------------------------------------- | ||||
| # Rules for building the extension | ||||
| # ---------------------------------------------------------------------- | ||||
|  | ||||
| all: $(TARGET) | ||||
|  | ||||
| # Convert the wrapper file into an object file | ||||
|  | ||||
| $(WRAPOBJ) : $(WRAPFILE) | ||||
| 	$(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(WRAPFILE) $(INCLUDE) $(TCL_INCLUDE)  | ||||
|  | ||||
| $(WRAPFILE) : $(INTERFACE) | ||||
| 	$(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIB) $(INTERFACE) | ||||
|  | ||||
| $(TARGET): $(WRAPOBJ) $(ALLOBJS) | ||||
| 	$(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET) | ||||
|  | ||||
| clean: | ||||
| 	rm -f $(COBJS) $(CXXOBJS) $(OBJCOBJS) $(WRAPOBJ) $(WRAPFILE) $(TARGET) | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user