{Changes to enable non-local build}

(srcdir, VPATH): New vars.  Use where appropriate.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@268 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Thien-Thi Nguyen 2000-02-26 05:06:40 +00:00
commit 66b260c1ff
6 changed files with 47 additions and 45 deletions

View file

@ -3,6 +3,9 @@
# DOH # DOH
####################################################################### #######################################################################
srcdir = @srcdir@
VPATH = @srcdir@
#.KEEP_STATE: #.KEEP_STATE:
# Set your C++ compiler here. g++ works on most machines, # Set your C++ compiler here. g++ works on most machines,
@ -23,9 +26,9 @@ LIBOBJS = callable.o void.o fio.o memory.o base.o file.o list.o hash.o string.o
LIBSRCS = callable.c void.c fio.c memory.c base.c file.c list.c hash.c string.c LIBSRCS = callable.c void.c fio.c memory.c base.c file.c list.c hash.c string.c
LIBHEADERS = ../Include/doh.h LIBHEADERS = $(srcdir)/../Include/doh.h
LIB = ../libdoh.a LIB = libdoh.a
INCLUDE = -I../Include INCLUDE = -I$(srcdir)/../Include
CFLAGS = -DDOH_STRING_UPDATE_LINES CFLAGS = -DDOH_STRING_UPDATE_LINES
SHELL = /bin/sh SHELL = /bin/sh
@ -41,9 +44,9 @@ $(LIB): $(LIBOBJS)
@echo "Building library" @echo "Building library"
$(AR) cr $(LIB) $(LIBOBJS) $(AR) cr $(LIB) $(LIBOBJS)
$(RANLIB) $(LIB) $(RANLIB) $(LIB)
cp -f $(LIB) ..
clean:: clean::
rm -f *.o ../libdoh.a rm -f *.o $(LIB) ../$(LIB)
nuke:: nuke::
rm -f Makefile *~ #* core a.out rm -f Makefile *~ #* core a.out

View file

@ -4,13 +4,19 @@
# LParse # LParse
##################################################################### #####################################################################
srcdir = @srcdir@
VPATH = @srcdir@
CC = @CC@ CC = @CC@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
AR = @AR@ AR = @AR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
YACC = @YACC@ YACC = @YACC@
INCLUDE = -I. -I../Swig -I../DOH/Include -I../Preprocessor INCLUDE = -I$(srcdir)/. \
-I$(srcdir)/../Swig \
-I$(srcdir)/../DOH/Include \
-I$(srcdir)/../Preprocessor
SRCS = cscanner.c SRCS = cscanner.c
OBJS = parser.o cscanner.o OBJS = parser.o cscanner.o
@ -35,19 +41,3 @@ parser.c: parser.y
clean: clean:
rm -f *.o *~ core *.so *.a y.tab* rm -f *.o *~ core *.so *.a y.tab*

View file

@ -15,7 +15,7 @@ RANLIB = @RANLIB@
TARGET = libmodules11.a TARGET = libmodules11.a
OBJS = swigmain.o tcl8.o perl5.o python.o pycpp.o guile.o java.o OBJS = swigmain.o tcl8.o perl5.o python.o pycpp.o guile.o java.o
SRCS = swigmain.cxx tcl8.cxx perl5.cxx python.cxx pycpp.cxx guile.cxx java.cxx SRCS = swigmain.cxx tcl8.cxx perl5.cxx python.cxx pycpp.cxx guile.cxx java.cxx
INCLUDE = -I../Include -I../SWIG1.1 INCLUDE = -I$(srcdir)/../Include -I$(srcdir)/../SWIG1.1
# Rules for creation of a .o file from .cxx # Rules for creation of a .o file from .cxx
.SUFFIXES: .cxx .SUFFIXES: .cxx

View file

@ -2,6 +2,9 @@
# $Header$ # $Header$
#---------------------------------------------------------------- #----------------------------------------------------------------
srcdir = @srcdir@
VPATH = @srcdir@
SRCS = expr.c cpp.c SRCS = expr.c cpp.c
OBJS = expr.o cpp.o OBJS = expr.o cpp.o
@ -12,7 +15,7 @@ CC = @CC@
AR = @AR@ AR = @AR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
INCLUDE = -I. -I../Swig -I../DOH/Include INCLUDE = -I$(srcdir)/. -I$(srcdir)/../Swig -I$(srcdir)/../DOH/Include
TARGET = libcpp.a TARGET = libcpp.a
.c.o: .c.o:

View file

@ -14,16 +14,20 @@ RANLIB = @RANLIB@
TARGET = libswig11.a TARGET = libswig11.a
OBJS = parser.o main.o scanner.o symbol.o types.o include.o parms.o emit.o \ OBJS = parser.o main.o scanner.o symbol.o types.o include.o parms.o \
cplus.o lang.o hash.o sstring.o wrapfunc.o \ emit.o cplus.o lang.o hash.o sstring.o wrapfunc.o \
typemap.o naming.o typemap.o naming.o
SRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \ SRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx \
cplus.cxx lang.cxx hash.cxx \ emit.cxx cplus.cxx lang.cxx hash.cxx \
sstring.cxx wrapfunc.cxx typemap.cxx naming.cxx sstring.cxx wrapfunc.cxx typemap.cxx naming.cxx
PARSER = parser.yxx PARSER = parser.yxx
INCLUDE = -I../Include -I. -I../Swig -I../Preprocessor -I../DOH/Include INCLUDE = -I$(srcdir)/../Include \
-I$(srcdir)/. \
-I$(srcdir)/../Swig \
-I$(srcdir)/../Preprocessor \
-I$(srcdir)/../DOH/Include
# Rules for creation of a .o file from .cxx # Rules for creation of a .o file from .cxx
.SUFFIXES: .cxx .SUFFIXES: .cxx
@ -37,10 +41,10 @@ $(TARGET): $(OBJS)
$(RANLIB) $(TARGET) $(RANLIB) $(TARGET)
parser.o: parser.cxx parser.o: parser.cxx
$(CXX) $(INCLUDE) $(CFLAGS) parser.cxx -c -o parser.o $(CXX) $(INCLUDE) $(CFLAGS) $< -c -o parser.o
parser.cxx: $(PARSER) parser.cxx: $(PARSER)
$(YACC) @YFLAGS@ $(PARSER) $(YACC) @YFLAGS@ $<
@cp y.tab.h parser.h @cp y.tab.h parser.h
@cp y.tab.c parser.cxx @cp y.tab.c parser.cxx

View file

@ -2,6 +2,9 @@
# $Header$ # $Header$
#---------------------------------------------------------------- #----------------------------------------------------------------
srcdir = @srcdir@
VPATH = @srcdir@
SRCS = tree.c stype.c scanner.c include.c getopt.c misc.c super.c SRCS = tree.c stype.c scanner.c include.c getopt.c misc.c super.c
OBJS = tree.o stype.o scanner.o include.o getopt.o misc.o super.o OBJS = tree.o stype.o scanner.o include.o getopt.o misc.o super.o
@ -12,7 +15,7 @@ CC = @CC@
AR = @AR@ AR = @AR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
INCLUDE = -I. -I../DOH/Include INCLUDE = -I$(srcdir)/. -I$(srcdir)/../DOH/Include
TARGET = libswig.a TARGET = libswig.a
.c.o: .c.o:
@ -36,4 +39,3 @@ typetest: type.c super.o
clean: clean:
rm -f *.o *~ core *.so *.a *_wrap.* rm -f *.o *~ core *.so *.a *_wrap.*