]> git.saurik.com Git - wxWidgets.git/blame - wxPython/wxSWIG/swig_lib/python/Makefile.in
reSWIGged
[wxWidgets.git] / wxPython / wxSWIG / swig_lib / python / Makefile.in
CommitLineData
c90f71dd
RD
1# ---------------------------------------------------------------
2# $Header$
3# SWIG Python Makefile
4#
5# This file can be used to build various Python extensions with SWIG.
6# By default this file is set up for dynamic loading, but it can
7# be easily customized for static extensions by modifying various
8# portions of the file.
9#
10# SRCS = C source files
11# CXXSRCS = C++ source files
12# OBJCSRCS = Objective-C source files
13# OBJS = Additional .o files (compiled previously)
14# INTERFACE = SWIG interface file
15# TARGET = Name of target module or executable
16#
17# Many portions of this file were created by the SWIG configure
18# script and should already reflect your machine.
19#----------------------------------------------------------------
20
21SRCS =
22CXXSRCS =
23OBJCSRCS =
24OBJS =
25INTERFACE =
26WRAPFILE = $(INTERFACE:.i=_wrap.c)
27WRAPOBJ = $(INTERFACE:.i=_wrap.o)
28TARGET = module@SO@ # Use this kind of target for dynamic loading
29#TARGET = mypython # Use this target for static linking
30
31prefix = @prefix@
32exec_prefix = @exec_prefix@
33
34CC = @CC@
35CXX = @CXX@
36OBJC = @CC@ -Wno-import # -Wno-import needed for gcc
37CFLAGS =
38INCLUDE =
39LIBS =
40
41# SWIG Options
42# SWIG = location of the SWIG executable
43# SWIGOPT = SWIG compiler options
44# SWIGCC = Compiler used to compile the wrapper file
45
46SWIG = $(exec_prefix)/bin/swig
47SWIGOPT = -python
48SWIGCC = $(CC)
49
50# SWIG Library files. Uncomment if rebuilding the Python interpreter
51#SWIGLIB = -lembed.i
52
53# Rules for creating .o files from source.
54
55COBJS = $(SRCS:.c=.o)
56CXXOBJS = $(CXXSRCS:.cxx=.o)
57OBJCOBJS = $(OBJCSRCS:.m=.o)
58ALLOBJS = $(COBJS) $(CXXOBJS) $(OBJCOBJS) $(OBJS)
59
60# Command that will be used to build the final extension.
61BUILD = $(SWIGCC)
62
63# Uncomment the following if you are using dynamic loading
64CCSHARED = @CCSHARED@
65BUILD = @LDSHARED@
66
67# Uncomment the following if you are using dynamic loading with C++ and
68# need to provide additional link libraries (this is not always required).
69
70#DLL_LIBS = -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \
71 -L/usr/local/lib -lg++ -lstdc++ -lgcc
72
73# X11 installation (needed if rebuilding Python + tkinter)
74
75XLIB = @XLIBSW@
76XINCLUDE = @XINCLUDES@
77
78# Python installation
79
80PY_INCLUDE = -DHAVE_CONFIG_H @PYINCLUDE@
81PY_LIB = @PYLIB@
82
83# Tcl installation. Needed if rebuilding Python with tkinter.
84
85TCL_INCLUDE = @TCLINCLUDE@
86TCL_LIB = @TCLLIB@
87
88# Build libraries (needed for static builds)
89
90LIBM = @LIBM@
91LIBC = @LIBC@
92SYSLIBS = $(LIBM) $(LIBC) @LIBS@
93
94# Build options (uncomment only one these)
95
96#TKINTER = $(TCL_LIB) -ltk -ltcl $(XLIB)
97BUILD_LIBS = $(LIBS) # Dynamic loading
98#BUILD_LIBS = $(PY_LIB) @PYLINK@ $(TKINTER) $(LIBS) $(SYSLIBS)
99
100# Compilation rules for non-SWIG components
101
102.SUFFIXES: .c .cxx .m
103
104.c.o:
105 $(CC) $(CCSHARED) $(CFLAGS) $(INCLUDE) -c $<
106
107.cxx.o:
108 $(CXX) $(CCSHARED) $(CXXFLAGS) $(INCLUDE) -c $<
109
110.m.o:
111 $(OBJC) $(CCSHARED) $(CFLAGS) $(INCLUDE) -c $<
112
113
114# ----------------------------------------------------------------------
115# Rules for building the extension
116# ----------------------------------------------------------------------
117
118all: $(TARGET)
119
120# Convert the wrapper file into an object file
121
122$(WRAPOBJ) : $(WRAPFILE)
123 $(SWIGCC) -c $(CCSHARED) $(CFLAGS) $(WRAPFILE) $(INCLUDE) $(PY_INCLUDE)
124
125$(WRAPFILE) : $(INTERFACE)
126 $(SWIG) $(SWIGOPT) -o $(WRAPFILE) $(SWIGLIB) $(INTERFACE)
127
128$(TARGET): $(WRAPOBJ) $(ALLOBJS)
129 $(BUILD) $(WRAPOBJ) $(ALLOBJS) $(BUILD_LIBS) -o $(TARGET)
130
131clean:
132 rm -f $(COBJS) $(CXXOBJS) $(OBJCOBJS) $(WRAPOBJ) $(WRAPFILE) $(TARGET)
133
134
135
136