1 #######################################################################
3 # Simplified Wrapper and Interface Generator (SWIG)
5 # Makefile for version 1.0 Final
9 # This makefile is now mostly constructed by ./configure.
12 # Revision 1.1 2002/04/29 19:56:48 RD
13 # Since I have made several changes to SWIG over the years to accomodate
14 # special cases and other things in wxPython, and since I plan on making
15 # several more, I've decided to put the SWIG sources in wxPython's CVS
16 # instead of relying on maintaining patches. This effectivly becomes a
17 # fork of an obsolete version of SWIG, :-( but since SWIG 1.3 still
18 # doesn't have some things I rely on in 1.1, not to mention that my
19 # custom patches would all have to be redone, I felt that this is the
20 # easier road to take.
22 # Revision 1.1.1.1 1999/02/28 02:00:51 beazley
25 # Revision 1.1 1996/08/12 01:55:02 dmb
28 #######################################################################
36 # Set your C++ compiler here. g++ works on most machines,
37 # but you might have to change it depending on your installation.
42 # Set the prefix below to indicate where you want SWIG to install its
43 # files. Normally this is /usr/local
48 # Location of the SWIG library. Is normally put in /usr/local/lib/swig_lib
49 # The SWIG library contains configuration files and library modules
50 # so you should install it someplace where it can be easily accessed.
52 SWIG_LIB = $(prefix)/lib/swig_lib
54 # YACC parser. Use bison by default. if this doesn't work, switch
55 # it over to yacc. If that still doesn't work, let me know...
59 # Comment out the following line if you're on an SGI or don't have ranlib!
63 ########################################################################
64 # Normally, you shouldn't have to change anything below this point #
65 ########################################################################
67 LIBOBJS = main.o scanner.o symbol.o include.o types.o parms.o emit.o newdoc.o ascii.o \
68 html.o latex.o cplus.o lang.o hash.o sstring.o wrapfunc.o getopt.o comment.o \
71 LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \
72 newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \
73 sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
75 LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
78 INCLUDE = -I../Include
79 ##-DSWIG_LIB='"$(SWIG_LIB)"'
80 CFLAGS = @CFLAGS@ -DSWIG_CC='"$(CC)"' @DEFS@
86 # Rules for creation of a .o file from .cxx
89 $(CC) $(INCLUDE) $(CFLAGS) -c -o $*.o $<
93 $(LIB): parser.o $(LIBOBJS)
94 @echo "Building library"
95 $(AR) cr $(LIB) $(LIBOBJS) parser.o
98 parser.o: parser.cxx $(LIBHEADERS)
99 $(CC) $(INCLUDE) $(CFLAGS) parser.cxx -c -o parser.o
101 parser.cxx: $(PARSER)
104 @cp y.tab.c parser.cxx
107 @cp y.tab.c.bison parser.cxx
108 @cp y.tab.h.bison parser.h
109 @cp y.tab.h.bison y.tab.h
110 $(CC) $(CFLAGS) parser.cxx -c -o parser.o
112 Makefile: $(srcdir)/Makefile.in ../config.status
113 (cd ..; CONFIG_FILES=SWIG/Makefile $(SHELL) config.status)
118 rm -f *.o libswig.a y.tab.c y.tab.h
121 rm -f Makefile *~ #* core a.out
124 wc $(LIBSRCS) *.h parser.y