127 lines
3.5 KiB
Makefile
127 lines
3.5 KiB
Makefile
|
#######################################################################
|
||
|
# $Header$
|
||
|
# Simplified Wrapper and Interface Generator (SWIG)
|
||
|
#
|
||
|
# Makefile for version 1.0 Final
|
||
|
# Dave Beazley
|
||
|
# August 1, 1996
|
||
|
#
|
||
|
# This makefile is now mostly constructed by ./configure.
|
||
|
#
|
||
|
# $Log$
|
||
|
# Revision 1.1 2002/04/29 19:56:48 RD
|
||
|
# Since I have made several changes to SWIG over the years to accomodate
|
||
|
# special cases and other things in wxPython, and since I plan on making
|
||
|
# several more, I've decided to put the SWIG sources in wxPython's CVS
|
||
|
# instead of relying on maintaining patches. This effectivly becomes a
|
||
|
# fork of an obsolete version of SWIG, :-( but since SWIG 1.3 still
|
||
|
# doesn't have some things I rely on in 1.1, not to mention that my
|
||
|
# custom patches would all have to be redone, I felt that this is the
|
||
|
# easier road to take.
|
||
|
#
|
||
|
# Revision 1.1.1.1 1999/02/28 02:00:51 beazley
|
||
|
# Swig1.1
|
||
|
#
|
||
|
# Revision 1.1 1996/08/12 01:55:02 dmb
|
||
|
# Initial revision
|
||
|
#
|
||
|
#######################################################################
|
||
|
|
||
|
#.KEEP_STATE:
|
||
|
|
||
|
|
||
|
srcdir = @srcdir@
|
||
|
VPATH = @srcdir@
|
||
|
|
||
|
# Set your C++ compiler here. g++ works on most machines,
|
||
|
# but you might have to change it depending on your installation.
|
||
|
#
|
||
|
CC = @CXX@
|
||
|
|
||
|
#
|
||
|
# Set the prefix below to indicate where you want SWIG to install its
|
||
|
# files. Normally this is /usr/local
|
||
|
#
|
||
|
|
||
|
prefix = @prefix@
|
||
|
|
||
|
# Location of the SWIG library. Is normally put in /usr/local/lib/swig_lib
|
||
|
# The SWIG library contains configuration files and library modules
|
||
|
# so you should install it someplace where it can be easily accessed.
|
||
|
|
||
|
SWIG_LIB = $(prefix)/lib/swig_lib
|
||
|
|
||
|
# YACC parser. Use bison by default. if this doesn't work, switch
|
||
|
# it over to yacc. If that still doesn't work, let me know...
|
||
|
|
||
|
YACC = @YACC@
|
||
|
|
||
|
# Comment out the following line if you're on an SGI or don't have ranlib!
|
||
|
RANLIB = @RANLIB@
|
||
|
AR = @AR@
|
||
|
|
||
|
########################################################################
|
||
|
# Normally, you shouldn't have to change anything below this point #
|
||
|
########################################################################
|
||
|
|
||
|
LIBOBJS = main.o scanner.o symbol.o include.o types.o parms.o emit.o newdoc.o ascii.o \
|
||
|
html.o latex.o cplus.o lang.o hash.o sstring.o wrapfunc.o getopt.o comment.o \
|
||
|
typemap.o naming.o
|
||
|
|
||
|
LIBSRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \
|
||
|
newdoc.cxx ascii.cxx html.cxx latex.cxx cplus.cxx lang.cxx hash.cxx \
|
||
|
sstring.cxx wrapfunc.cxx getopt.cxx comment.cxx typemap.cxx naming.cxx
|
||
|
|
||
|
LIBHEADERS = internal.h ../Include/swig.h latex.h ascii.h html.h nodoc.h
|
||
|
LIB = ../libswig.a
|
||
|
PARSER = parser.y
|
||
|
INCLUDE = -I../Include
|
||
|
##-DSWIG_LIB='"$(SWIG_LIB)"'
|
||
|
CFLAGS = @CFLAGS@ -DSWIG_CC='"$(CC)"' @DEFS@
|
||
|
SHELL = /bin/sh
|
||
|
|
||
|
#
|
||
|
#
|
||
|
#
|
||
|
# Rules for creation of a .o file from .cxx
|
||
|
.SUFFIXES: .cxx
|
||
|
.cxx.o:
|
||
|
$(CC) $(INCLUDE) $(CFLAGS) -c -o $*.o $<
|
||
|
|
||
|
all: $(LIB)
|
||
|
|
||
|
$(LIB): parser.o $(LIBOBJS)
|
||
|
@echo "Building library"
|
||
|
$(AR) cr $(LIB) $(LIBOBJS) parser.o
|
||
|
$(RANLIB) $(LIB)
|
||
|
|
||
|
parser.o: parser.cxx $(LIBHEADERS)
|
||
|
$(CC) $(INCLUDE) $(CFLAGS) parser.cxx -c -o parser.o
|
||
|
|
||
|
parser.cxx: $(PARSER)
|
||
|
$(YACC) @YACCFLAGS@
|
||
|
@cp y.tab.h parser.h
|
||
|
@cp y.tab.c parser.cxx
|
||
|
|
||
|
parser::
|
||
|
@cp y.tab.c.bison parser.cxx
|
||
|
@cp y.tab.h.bison parser.h
|
||
|
@cp y.tab.h.bison y.tab.h
|
||
|
$(CC) $(CFLAGS) parser.cxx -c -o parser.o
|
||
|
|
||
|
Makefile: $(srcdir)/Makefile.in ../config.status
|
||
|
(cd ..; CONFIG_FILES=SWIG/Makefile $(SHELL) config.status)
|
||
|
|
||
|
.PRECIOUS: Makefile
|
||
|
|
||
|
clean::
|
||
|
rm -f *.o libswig.a y.tab.c y.tab.h
|
||
|
|
||
|
nuke::
|
||
|
rm -f Makefile *~ #* core a.out
|
||
|
|
||
|
wc::
|
||
|
wc $(LIBSRCS) *.h parser.y
|
||
|
|
||
|
|