{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

@ -1,8 +1,11 @@
#######################################################################
# $Header$
# DOH
# DOH
#######################################################################
srcdir = @srcdir@
VPATH = @srcdir@
#.KEEP_STATE:
# Set your C++ compiler here. g++ works on most machines,
@ -19,31 +22,31 @@ AR = @AR@
# Normally, you shouldn't have to change anything below this point #
########################################################################
LIBOBJS = callable.o void.o fio.o memory.o base.o file.o list.o hash.o string.o
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
LIBHEADERS = ../Include/doh.h
LIB = ../libdoh.a
INCLUDE = -I../Include
LIBHEADERS = $(srcdir)/../Include/doh.h
LIB = libdoh.a
INCLUDE = -I$(srcdir)/../Include
CFLAGS = -DDOH_STRING_UPDATE_LINES
SHELL = /bin/sh
#
# Rules for creation of a .o file from .cxx
.SUFFIXES: .c
.c.o:
.c.o:
$(CC) $(INCLUDE) $(CFLAGS) -c -o $*.o $<
all: $(LIB)
$(LIB): $(LIBOBJS)
$(LIB): $(LIBOBJS)
@echo "Building library"
$(AR) cr $(LIB) $(LIBOBJS)
$(RANLIB) $(LIB)
cp -f $(LIB) ..
clean::
rm -f *.o ../libdoh.a
rm -f *.o $(LIB) ../$(LIB)
nuke::
rm -f Makefile *~ #* core a.out

View file

@ -4,19 +4,25 @@
# LParse
#####################################################################
srcdir = @srcdir@
VPATH = @srcdir@
CC = @CC@
CFLAGS = @CFLAGS@
AR = @AR@
RANLIB = @RANLIB@
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
OBJS = parser.o cscanner.o
TARGET = liblparse.a
.c.o:
.c.o:
$(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $<
all: $(TARGET)
@ -28,26 +34,10 @@ $(TARGET): $(OBJS)
parser.o: parser.c
$(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $<
parser.c: parser.y
parser.c: parser.y
$(YACC) @YFLAGS@ parser.y
@cp y.tab.h lyacc.h
@cp y.tab.c parser.c
clean:
rm -f *.o *~ core *.so *.a y.tab*

View file

@ -15,7 +15,7 @@ RANLIB = @RANLIB@
TARGET = libmodules11.a
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
INCLUDE = -I../Include -I../SWIG1.1
INCLUDE = -I$(srcdir)/../Include -I$(srcdir)/../SWIG1.1
# Rules for creation of a .o file from .cxx
.SUFFIXES: .cxx

View file

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

View file

@ -8,26 +8,30 @@ VPATH = @srcdir@
SHELL = /bin/sh
CXX = @CXX@
CFLAGS = @CFLAGS@
YACC = @YACC@
YACC = @YACC@
AR = @AR@
RANLIB = @RANLIB@
TARGET = libswig11.a
OBJS = parser.o main.o scanner.o symbol.o types.o include.o parms.o emit.o \
cplus.o lang.o hash.o sstring.o wrapfunc.o \
typemap.o naming.o
OBJS = parser.o main.o scanner.o symbol.o types.o include.o parms.o \
emit.o cplus.o lang.o hash.o sstring.o wrapfunc.o \
typemap.o naming.o
SRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx emit.cxx \
cplus.cxx lang.cxx hash.cxx \
SRCS = main.cxx scanner.cxx symbol.cxx include.cxx types.cxx parms.cxx \
emit.cxx cplus.cxx lang.cxx hash.cxx \
sstring.cxx wrapfunc.cxx typemap.cxx naming.cxx
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
.SUFFIXES: .cxx
.cxx.o:
.cxx.o:
$(CXX) $(INCLUDE) $(CFLAGS) -c -o $*.o $<
swig: $(TARGET)
@ -37,14 +41,14 @@ $(TARGET): $(OBJS)
$(RANLIB) $(TARGET)
parser.o: parser.cxx
$(CXX) $(INCLUDE) $(CFLAGS) parser.cxx -c -o parser.o
$(CXX) $(INCLUDE) $(CFLAGS) $< -c -o parser.o
parser.cxx: $(PARSER)
$(YACC) @YFLAGS@ $(PARSER)
$(YACC) @YFLAGS@ $<
@cp y.tab.h parser.h
@cp y.tab.c parser.cxx
parser::
parser::
@cp y.tab.c.bison parser.cxx
@cp y.tab.h.bison parser.h
@cp y.tab.h.bison y.tab.h

View file

@ -2,6 +2,9 @@
# $Header$
#----------------------------------------------------------------
srcdir = @srcdir@
VPATH = @srcdir@
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
@ -12,10 +15,10 @@ CC = @CC@
AR = @AR@
RANLIB = @RANLIB@
CFLAGS = @CFLAGS@
INCLUDE = -I. -I../DOH/Include
INCLUDE = -I$(srcdir)/. -I$(srcdir)/../DOH/Include
TARGET = libswig.a
.c.o:
.c.o:
$(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $<
all: $(TARGET)
@ -36,4 +39,3 @@ typetest: type.c super.o
clean:
rm -f *.o *~ core *.so *.a *_wrap.*