Old Makefile.in saved in Makefile.in.python
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@165 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d0ab9150f3
commit
a8a25ef4ee
1 changed files with 127 additions and 0 deletions
127
Source/Swig/Makefile.in.python
Normal file
127
Source/Swig/Makefile.in.python
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
# ---------------------------------------------------------------
|
||||
# $Header$
|
||||
# SWIG 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
|
||||
#
|
||||
#----------------------------------------------------------------
|
||||
|
||||
SRCS = types.c scanner.c include.c getopt.c misc.c super.c type.c
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
INTERFACE = swig.i
|
||||
WRAPFILE = $(INTERFACE:.i=_wrap.c)
|
||||
WRAPOBJ = $(INTERFACE:.i=_wrap.o)
|
||||
TARGET = swigmodule@SO@ # Use this kind of target for dynamic loading
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
CC = @CC@
|
||||
AR = @AR@
|
||||
RANLIB = @RANLIB@
|
||||
RPATH = @RPATH@
|
||||
CC = @CC@
|
||||
CFLAGS = -g
|
||||
INCLUDE = -I. -I../DOH/Include
|
||||
LIBS = -L. -L../DOH/ -ldoh
|
||||
|
||||
# SWIG Options
|
||||
# SWIG = location of the SWIG executable
|
||||
# SWIGOPT = SWIG compiler options
|
||||
# SWIGCC = Compiler used to compile the wrapper file
|
||||
|
||||
# this is kinda silly: SWIG depends on SWIG.... :)
|
||||
SWIG = $(exec_prefix)/bin/swig
|
||||
SWIGOPT = -python
|
||||
SWIGCC = $(CC)
|
||||
|
||||
# SWIG Library files. Uncomment if rebuilding the Python interpreter
|
||||
#SWIGLIB = -lembed.i
|
||||
|
||||
# Command that will be used to build the final extension.
|
||||
BUILD = $(SWIGCC)
|
||||
|
||||
# Uncomment the following if you are using dynamic loading
|
||||
CCSHARED = @CCSHARED@
|
||||
BUILD = @LDSHARED@
|
||||
|
||||
# Python installation
|
||||
|
||||
PY_INCLUDE = -DHAVE_CONFIG_H @PYINCLUDE@
|
||||
PY_LIB = @PYLIB@
|
||||
|
||||
# Build libraries (needed for static builds)
|
||||
|
||||
LIBM = @LIBM@
|
||||
LIBC = @LIBC@
|
||||
SYSLIBS = $(LIBM) $(LIBC) @LIBS@
|
||||
|
||||
# Build options
|
||||
|
||||
BUILD_LIBS = $(LIBS) # Dynamic loading
|
||||
|
||||
# Compilation rules for non-SWIG components
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CCSHARED) $(INCLUDE) $(CFLAGS) -c -o $*.o $<
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Toplevel Targets
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
######################################################################
|
||||
# TARGET: swig
|
||||
#####################################################################
|
||||
# note that here we echo the names of all of our object files,
|
||||
# relative to the project root, into $(OBJS_FILE), for compatibility
|
||||
# with the parent makefile.
|
||||
all: swig
|
||||
swig: $(OBJS)
|
||||
for i in $(OBJS); do echo Source/Swig/$$i >> $(OBJS_FILE); done
|
||||
|
||||
######################################################################
|
||||
# TARGET: experiment
|
||||
#####################################################################
|
||||
# same as swig
|
||||
experiment: swig
|
||||
|
||||
######################################################################
|
||||
# TARGET: python
|
||||
#####################################################################
|
||||
# not integrated with the mother ship yet
|
||||
python: $(TARGET) # the python module
|
||||
|
||||
######################################################################
|
||||
# TARGET: supertest
|
||||
#####################################################################
|
||||
# not integrated with the mother ship yet
|
||||
supertest: super.c # test the super module
|
||||
$(CC) $(CCSHARED) $(INCLUDE) $(CFLAGS) -g -DSUPER_TEST -c \
|
||||
-o supertest.o super.c
|
||||
$(CC) supertest.o -ldoh -o supertest
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ core *.so *.a *_wrap.*
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Rules for building the extension
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
$(WRAPOBJ) : $(WRAPFILE)
|
||||
$(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(WRAPFILE) $(INCLUDE) $(PY_INCLUDE)
|
||||
$(WRAPFILE) : $(INTERFACE)
|
||||
$(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIB) $(INTERFACE)
|
||||
|
||||
$(TARGET): $(WRAPOBJ) $(ALLOBJS)
|
||||
$(BUILD) $(WRAPOBJ) $(OBJS) $(BUILD_LIBS) -o $(TARGET)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue