From a8a25ef4ee3ec62aaad6b8a3ddd4b6af53ce3976 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sat, 29 Jan 2000 01:09:17 +0000 Subject: [PATCH] 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 --- Source/Swig/Makefile.in.python | 127 +++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 Source/Swig/Makefile.in.python diff --git a/Source/Swig/Makefile.in.python b/Source/Swig/Makefile.in.python new file mode 100644 index 000000000..a624e52ab --- /dev/null +++ b/Source/Swig/Makefile.in.python @@ -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) +