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