(libtool_comp, libtool_link): New vars.
(GUILE_INCLUDE, GUILE_LIB, GUILE_LIBOPTS): New vars. (guile-hobbit, guile, guile_cpp, guile_static, guile_static_cpp): New targets. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@360 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
68e546db91
commit
3ae66c24ef
1 changed files with 89 additions and 24 deletions
|
|
@ -39,6 +39,9 @@ LIBC = @LIBC@
|
||||||
LIBCRYPT = @LIBCRYPT@
|
LIBCRYPT = @LIBCRYPT@
|
||||||
SYSLIBS = $(LIBM) $(LIBC) $(LIBCRYPT)
|
SYSLIBS = $(LIBM) $(LIBC) $(LIBCRYPT)
|
||||||
|
|
||||||
|
libtool_comp = $(TOP)/../Tools/libtool --mode compile
|
||||||
|
libtool_link = $(TOP)/../Tools/libtool --mode link
|
||||||
|
|
||||||
# X11 options
|
# X11 options
|
||||||
|
|
||||||
XLIB = @XLIBSW@
|
XLIB = @XLIBSW@
|
||||||
|
|
@ -231,6 +234,68 @@ python_static_cpp: $(SRCS)
|
||||||
$(PYTHON_INCLUDE) $(LIBS) -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET)
|
$(PYTHON_INCLUDE) $(LIBS) -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET)
|
||||||
|
|
||||||
|
|
||||||
|
##################################################################
|
||||||
|
##### GUILE ######
|
||||||
|
##################################################################
|
||||||
|
|
||||||
|
# Make sure these locate your Guile installation
|
||||||
|
GUILE_INCLUDE = @GUILEINCLUDE@
|
||||||
|
GUILE_LIB = @GUILELIB@
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# Build a C dynamically loadable module
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
|
guile-hobbit: $(SRCS)
|
||||||
|
$(SWIG) -guile -Linkage hobbit $(SWIGOPT) $(INTERFACE)
|
||||||
|
for f in $^ ; do $(libtool_comp) $(CC) -c -O2 $(INCLUDE) $$f ; done
|
||||||
|
$(libtool_link) $(CC) -g -O2 -o lib$^.la -rpath `pwd` $^
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
# Build a C dynamically loadable module
|
||||||
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
|
guile: $(SRCS)
|
||||||
|
$(SWIG) -guile $(SWIGOPT) $(INTERFACE)
|
||||||
|
for f in $(ISRCS) ; do $(libtool_comp) \
|
||||||
|
$(CC) -c $(INCLUDE) $(GUILE_INCLUDE) $(ISRCS) ; done
|
||||||
|
$(libtool_link) $(LDSHARED) -o lib$(TARGET)$(SO) \
|
||||||
|
$(OBJS) $(IOBJS) $(LIBS)
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
# Build a C++ dynamically loadable module
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
|
guile_cpp: $(SRCS)
|
||||||
|
$(SWIG) -c++ -guile $(SWIGOPT) $(INTERFACE)
|
||||||
|
$(libtool) compile \
|
||||||
|
$(CXX) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) \
|
||||||
|
$(INCLUDE) $(GUILE_INCLUDE)
|
||||||
|
$(libtool) link \
|
||||||
|
$(CXXSHARED) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) \
|
||||||
|
-o lib$(TARGET)$(SO)
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
# Build statically linked Guile interpreter
|
||||||
|
#
|
||||||
|
# These should only be used in conjunction with the %include embed.i
|
||||||
|
# library file
|
||||||
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
|
GUILE_LIBOPTS = @GUILELINK@ @LIBS@ $(TKINTER) $(SYSLIBS)
|
||||||
|
|
||||||
|
guile_static: $(SRCS)
|
||||||
|
$(SWIG) -guile -lembed.i $(SWIGOPT) $(INTERFACE)
|
||||||
|
$(CC) $(CFLAGS) @LINKFORSHARED@ $(ISRCS) $(SRCS) $(INCLUDE) \
|
||||||
|
$(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)
|
||||||
|
|
||||||
|
guile_static_cpp: $(SRCS)
|
||||||
|
$(SWIG) -c++ -guile -lembed.i $(SWIGOPT) $(INTERFACE)
|
||||||
|
$(CXX) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDE) \
|
||||||
|
$(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)
|
||||||
|
|
||||||
|
|
||||||
##################################################################
|
##################################################################
|
||||||
##### JAVA ######
|
##### JAVA ######
|
||||||
##################################################################
|
##################################################################
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue