Moved Makefiles and configure.in to the top level, and added .cvsignore
files to most subdirectories to make things a bit cleaner. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@37 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ad9cb6a2d7
commit
c4a023be78
11 changed files with 71 additions and 99 deletions
0
Source/.cvsignore
Normal file
0
Source/.cvsignore
Normal file
2
Source/DOH/.cvsignore
Normal file
2
Source/DOH/.cvsignore
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Makefile
|
||||
y.tab.*
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
# Generated automatically from Makefile.in by configure.
|
||||
#######################################################################
|
||||
# $Header$
|
||||
# DOH
|
||||
#######################################################################
|
||||
|
||||
#.KEEP_STATE:
|
||||
|
||||
# Set your C++ compiler here. g++ works on most machines,
|
||||
# but you might have to change it depending on your installation.
|
||||
#
|
||||
CC = cc
|
||||
prefix = /usr/local
|
||||
|
||||
# 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 = 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
|
||||
CFLAGS =
|
||||
SHELL = /bin/sh
|
||||
|
||||
#
|
||||
# Rules for creation of a .o file from .cxx
|
||||
.SUFFIXES: .c
|
||||
.c.o:
|
||||
$(CC) $(INCLUDE) $(CFLAGS) -c -o $*.o $<
|
||||
|
||||
all: $(LIB)
|
||||
|
||||
$(LIB): $(LIBOBJS)
|
||||
@echo "Building library"
|
||||
$(AR) cr $(LIB) $(LIBOBJS)
|
||||
$(RANLIB) $(LIB)
|
||||
|
||||
clean::
|
||||
rm -f *.o ../libdoh.a
|
||||
nuke::
|
||||
rm -f Makefile *~ #* core a.out
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
#######################################################################
|
||||
# $Header$
|
||||
# Simplified Wrapper and Interface Generator (SWIG)
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
TARGET = swig
|
||||
SHELL = /bin/sh
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
LIBS =
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
DIRS = DOH Core Preprocessor SWIG1.1 Modules1.1
|
||||
SWIGOBJS = SWIG1.1/*.o Modules1.1/*.o DOH/Doh/*.o Core/*.o Preprocessor/*.o
|
||||
|
||||
swig: objs
|
||||
$(CXX) $(SWIGOBJS) $(LIBS) -o $(TARGET)
|
||||
|
||||
objs:
|
||||
@for i in $(DIRS); \
|
||||
do \
|
||||
cd $$i; $(MAKE); cd .. ;\
|
||||
done;
|
||||
|
||||
clean:
|
||||
@for i in $(DIRS); \
|
||||
do \
|
||||
cd $$i; $(MAKE) clean; cd ..; \
|
||||
done;
|
||||
rm -f swig
|
||||
|
||||
nuke: clean
|
||||
@cd SWIG; $(MAKE) nuke
|
||||
@cd Modules; $(MAKE) nuke
|
||||
@cd Examples; $(MAKE) nuke
|
||||
@cd Tests; $(MAKE) clean
|
||||
@cd Runtime; $(MAKE) clean
|
||||
rm -f Makefile Makefile.template config.*
|
||||
|
||||
|
||||
|
||||
|
||||
2
Source/Modules1.1/.cvsignore
Normal file
2
Source/Modules1.1/.cvsignore
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Makefile
|
||||
y.tab.*
|
||||
2
Source/Preprocessor/.cvsignore
Normal file
2
Source/Preprocessor/.cvsignore
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Makefile
|
||||
y.tab.*
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
SWIG Source Directory
|
||||
|
||||
All new development is being done in C. Portions of the old SWIG1.1
|
||||
C++ base are slowly being converted over.
|
||||
|
||||
DOH - Dave's Object Hack. A C library containing core datatypes
|
||||
for most of the new C-based system.
|
||||
|
||||
Core - C based SWIG core.
|
||||
|
||||
Preprocessor - C based preprocessing module.
|
||||
|
||||
SWIG1.1 - Old SWIG1.1 C++ core
|
||||
|
||||
Modules1.1 - Old SWIG1.1 C++ modules
|
||||
|
||||
|
||||
5
Source/SWIG1.1/.cvsignore
Normal file
5
Source/SWIG1.1/.cvsignore
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Makefile
|
||||
y.tab.*
|
||||
parser.h
|
||||
parser.cxx
|
||||
|
||||
2
Source/Swig/.cvsignore
Normal file
2
Source/Swig/.cvsignore
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Makefile
|
||||
y.tab.*
|
||||
|
|
@ -1,172 +0,0 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(Core/swigcore.h)
|
||||
AC_PREREQ(2.0)
|
||||
|
||||
# Set name for machine-dependent library files
|
||||
AC_SUBST(MACHDEP)
|
||||
AC_MSG_CHECKING(MACHDEP)
|
||||
if test -z "$MACHDEP"
|
||||
then
|
||||
if test -f /usr/lib/NextStep/software_version; then
|
||||
set X `hostinfo | grep 'NeXT Mach.*:' | \
|
||||
sed -e 's/://' -e 's/\./_/'` && \
|
||||
ac_sys_system=next && ac_sys_release=$4
|
||||
MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
|
||||
else
|
||||
ac_sys_system=`uname -s`
|
||||
if test "$ac_sys_system" = "AIX" ; then
|
||||
ac_sys_release=`uname -v`
|
||||
else
|
||||
ac_sys_release=`uname -r`
|
||||
fi
|
||||
ac_md_system=`echo $ac_sys_system |
|
||||
tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
|
||||
ac_md_release=`echo $ac_sys_release |
|
||||
tr -d '[/ ]' | sed 's/\..*//'`
|
||||
MACHDEP="$ac_md_system$ac_md_release"
|
||||
fi
|
||||
case MACHDEP in
|
||||
'') MACHDEP=unknown;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($MACHDEP)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl Checks for programs.
|
||||
|
||||
AC_SUBST(AR)
|
||||
AC_CHECK_PROGS(AR, ar aal, ar)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
dnl Checks for library functions.
|
||||
|
||||
# Set info about shared libraries.
|
||||
AC_SUBST(SO)
|
||||
AC_SUBST(LDSHARED)
|
||||
AC_SUBST(CCSHARED)
|
||||
|
||||
# SO is the extension of shared libraries `(including the dot!)
|
||||
# -- usually .so, .sl on HP-UX
|
||||
AC_MSG_CHECKING(SO)
|
||||
if test -z "$SO"
|
||||
then
|
||||
case $ac_sys_system in
|
||||
hp*|HP*) SO=.sl;;
|
||||
*) SO=.so;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($SO)
|
||||
# LDSHARED is the ld *command* used to create shared library
|
||||
# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
|
||||
# (Shared libraries in this instance are shared modules to be loaded into
|
||||
# Python, as opposed to building Python itself as a shared library.)
|
||||
AC_MSG_CHECKING(LDSHARED)
|
||||
if test -z "$LDSHARED"
|
||||
then
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
|
||||
IRIX/5*) LDSHARED="ld -shared";;
|
||||
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
|
||||
SunOS/4*) LDSHARED="ld";;
|
||||
SunOS/5*) LDSHARED="ld -G";;
|
||||
hp*|HP*) LDSHARED="ld -b";;
|
||||
OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
|
||||
DYNIX/ptx*) LDSHARED="ld -G";;
|
||||
next/*)
|
||||
if test "$ns_dyld"
|
||||
then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
|
||||
else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
|
||||
fi
|
||||
if test "$with_next_framework" ; then
|
||||
LDSHARED="$LDSHARED \$(LDLIBRARY)"
|
||||
fi ;;
|
||||
Linux*) LDSHARED="gcc -shared";;
|
||||
dgux*) LDSHARED="ld -G";;
|
||||
FreeBSD*/3*) LDSHARED="gcc -shared";;
|
||||
FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
|
||||
NetBSD*)
|
||||
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
|
||||
then
|
||||
LDSHARED="cc -shared"
|
||||
else
|
||||
LDSHARED="ld -Bshareable"
|
||||
fi;;
|
||||
SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
|
||||
*) LDSHARED="ld";;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($LDSHARED)
|
||||
# CCSHARED are the C *flags* used to create objects to go into a shared
|
||||
# library (module) -- this is only needed for a few systems
|
||||
AC_MSG_CHECKING(CCSHARED)
|
||||
if test -z "$CCSHARED"
|
||||
then
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
hp*|HP*) if test "$GCC" = yes;
|
||||
then CCSHARED="-fpic";
|
||||
else CCSHARED="+z";
|
||||
fi;;
|
||||
Linux*) CCSHARED="-fpic";;
|
||||
FreeBSD*|OpenBSD*) CCSHARED="-fpic";;
|
||||
NetBSD*) CCSHARED="-fPIC";;
|
||||
SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
|
||||
IRIX*/6*) case $CC in
|
||||
*gcc*) CCSHARED="-shared";;
|
||||
*) CCSHARED="";;
|
||||
esac;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($CCSHARED)
|
||||
|
||||
AC_ARG_WITH(yacc,[ --without-yacc Try to compile without yacc/bison], [
|
||||
YACC="cp parser.cxx.no y.tab.c; cp parser.h.no y.tab.h"
|
||||
AC_SUBST(YACC)
|
||||
YACCFLAGS=""
|
||||
AC_SUBST(YACCFLAGS)
|
||||
], [ AC_PROG_YACC
|
||||
YACCFLAGS="-d parser.y"
|
||||
AC_SUBST(YACCFLAGS) ])
|
||||
|
||||
#----------------------------------------------------------------
|
||||
# Look for Python
|
||||
#----------------------------------------------------------------
|
||||
|
||||
PYINCLUDE=nope
|
||||
|
||||
AC_MSG_CHECKING(for Python header files)
|
||||
|
||||
dirs="$PYINCLUDE $PYINCLUDE/python1.5 $PYINCLUDE/python1.4 $PYINCLUDE/Py $prefix/include/python1.5 $prefix/include/python1.4 /usr/local/include/python1.5 /usr/include/python1.5 /usr/local/include/python1.4 /usr/include/python1.4 $prefix/include/Py /usr/local/include/Py /usr/include/Py"
|
||||
for i in $dirs ; do
|
||||
if test -r $i/Python.h; then
|
||||
AC_MSG_RESULT($i)
|
||||
PYINCLUDE="-I$i"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test "$PYINCLUDE" = nope; then
|
||||
PYINCLUDE="-I/usr/local/include/Py"
|
||||
AC_MSG_RESULT(not found)
|
||||
fi
|
||||
|
||||
AC_SUBST(PYINCLUDE)
|
||||
|
||||
# RPATH is the path used to look for shared library files.
|
||||
AC_MSG_CHECKING(RPATH)
|
||||
if test -z "$RPATH"
|
||||
then
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
SunOS/5*) RPATH="-R. -R$(exec_prefix)/lib";;
|
||||
IRIX*) RPATH="-rpath .:$(exec_prefix)/lib";;
|
||||
Linux*) RPATH="-Xlinker -rpath $(exec_prefix)/lib -Xlinker -rpath .";;
|
||||
*) RPATH="";;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT($RPATH)
|
||||
AC_SUBST(RPATH)
|
||||
|
||||
|
||||
AC_OUTPUT(Makefile Core/Makefile DOH/Doh/Makefile DOH/Makefile Preprocessor/Makefile SWIG1.1/Makefile Modules1.1/Makefile)
|
||||
Loading…
Add table
Add a link
Reference in a new issue