diff --git a/Examples/php4/Makefile.php b/Examples/php4/Makefile.php deleted file mode 100644 index 399fdfc7a..000000000 --- a/Examples/php4/Makefile.php +++ /dev/null @@ -1,12 +0,0 @@ -CRUD=*.so *.o php_example.h *_wrap.c* example.php - -all: check - -check: - ./BUILD.sh - -# This one is fun! How do we know what shouldn't be there? -clean: - rm -f $(CRUD) - - diff --git a/Examples/php4/check.list b/Examples/php4/check.list index 2eef45816..525e60886 100644 --- a/Examples/php4/check.list +++ b/Examples/php4/check.list @@ -2,12 +2,17 @@ # (see also top-level configure.in kludge) class constants +cpointer +disown enum funcptr +overloading pointer +pragmas reference shadow simple +struct sync value variables diff --git a/Examples/php4/class/.cvsignore b/Examples/php4/class/.cvsignore index 9941b8712..77d1de426 100644 --- a/Examples/php4/class/.cvsignore +++ b/Examples/php4/class/.cvsignore @@ -1,6 +1,3 @@ -makefile -Makefile -Makefile.lnk php_example.h example.php *_wrap.c diff --git a/Examples/php4/class/BUILD.sh b/Examples/php4/class/BUILD.sh deleted file mode 100755 index 241ed0228..000000000 --- a/Examples/php4/class/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -c++ -noproxy -withcxx example.cxx example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/class/Makefile b/Examples/php4/class/Makefile new file mode 100644 index 000000000..eb9145bd3 --- /dev/null +++ b/Examples/php4/class/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = -c++ -noproxy + +C_SOURCES = +CXX_SOURCES = example.cxx + +SWIG = ../../../swig + +all: check + +example_wrap.cpp: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/class/Makefile.old b/Examples/php4/class/Makefile.old deleted file mode 100644 index cc44776e9..000000000 --- a/Examples/php4/class/Makefile.old +++ /dev/null @@ -1,17 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../swig -CXXSRCS = example.cxx -TARGET = php_example -INTERFACE = example.i -LIBS = -lm -SWIGOPT = -noproxy - -all:: - $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' SWIGOPT='$(SWIGOPT)' \ - php4_cpp - -clean:: - rm -f *_wrap* *.o *~ *.so .~* core *.php php_example.h - -check: all diff --git a/Examples/php4/constants/.cvsignore b/Examples/php4/constants/.cvsignore index 9941b8712..77d1de426 100644 --- a/Examples/php4/constants/.cvsignore +++ b/Examples/php4/constants/.cvsignore @@ -1,6 +1,3 @@ -makefile -Makefile -Makefile.lnk php_example.h example.php *_wrap.c diff --git a/Examples/php4/constants/BUILD.sh b/Examples/php4/constants/BUILD.sh deleted file mode 100755 index 2dfdbbc67..000000000 --- a/Examples/php4/constants/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -noproxy example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/constants/Makefile b/Examples/php4/constants/Makefile new file mode 100644 index 000000000..6b50e9618 --- /dev/null +++ b/Examples/php4/constants/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = + +C_SOURCES = +CXX_SOURCES = + +SWIG = ../../../swig + +all: check + +example_wrap.c: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/constants/Makefile.old b/Examples/php4/constants/Makefile.old deleted file mode 100644 index 54af9e8d0..000000000 --- a/Examples/php4/constants/Makefile.old +++ /dev/null @@ -1,15 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../swig -SRCS = -TARGET = php_example -INTERFACE = example.i -SWIGOPT = -noproxy - -all:: - $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4 - -clean:: - rm -f *_wrap* *.o core *~ *.so *.php *.h - -check: all diff --git a/Examples/php4/cpointer/BUILD.sh b/Examples/php4/cpointer/BUILD.sh deleted file mode 100755 index b79290003..000000000 --- a/Examples/php4/cpointer/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -noproxy -withc example.c example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/cpointer/Makefile b/Examples/php4/cpointer/Makefile new file mode 100644 index 000000000..d48908953 --- /dev/null +++ b/Examples/php4/cpointer/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = + +C_SOURCES = example.c +CXX_SOURCES = + +SWIG = ../../../swig + +all: check + +example_wrap.c: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/disown/BUILD.sh b/Examples/php4/disown/BUILD.sh deleted file mode 100755 index 60c06d50d..000000000 --- a/Examples/php4/disown/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -c++ -make -withcxx example.cxx example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/disown/Makefile b/Examples/php4/disown/Makefile index 399fdfc7a..06d44bdee 100644 --- a/Examples/php4/disown/Makefile +++ b/Examples/php4/disown/Makefile @@ -1,12 +1,37 @@ -CRUD=*.so *.o php_example.h *_wrap.c* example.php + +SWIGFLAGS = -c++ + +C_SOURCES = +CXX_SOURCES = example.cxx + +SWIG = ../../../swig all: check -check: - ./BUILD.sh +example_wrap.cpp: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 -# This one is fun! How do we know what shouldn't be there? clean: - rm -f $(CRUD) - - + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/enum/.cvsignore b/Examples/php4/enum/.cvsignore index 9941b8712..77d1de426 100644 --- a/Examples/php4/enum/.cvsignore +++ b/Examples/php4/enum/.cvsignore @@ -1,6 +1,3 @@ -makefile -Makefile -Makefile.lnk php_example.h example.php *_wrap.c diff --git a/Examples/php4/enum/BUILD.sh b/Examples/php4/enum/BUILD.sh deleted file mode 100755 index 241ed0228..000000000 --- a/Examples/php4/enum/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -c++ -noproxy -withcxx example.cxx example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/enum/Makefile b/Examples/php4/enum/Makefile new file mode 100644 index 000000000..eb9145bd3 --- /dev/null +++ b/Examples/php4/enum/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = -c++ -noproxy + +C_SOURCES = +CXX_SOURCES = example.cxx + +SWIG = ../../../swig + +all: check + +example_wrap.cpp: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/enum/Makefile.old b/Examples/php4/enum/Makefile.old deleted file mode 100644 index cc4574bea..000000000 --- a/Examples/php4/enum/Makefile.old +++ /dev/null @@ -1,17 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../swig -CXXSRCS = example.cxx -TARGET = php_example -INTERFACE = example.i -LIBS = -lm -SWIGOPT = -noproxy - -all:: - $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)'\ - php4_cpp - -clean:: - rm -f *_wrap* *.o core *~ *.so *.php - -check: all diff --git a/Examples/php4/funcptr/.cvsignore b/Examples/php4/funcptr/.cvsignore index 9941b8712..77d1de426 100644 --- a/Examples/php4/funcptr/.cvsignore +++ b/Examples/php4/funcptr/.cvsignore @@ -1,6 +1,3 @@ -makefile -Makefile -Makefile.lnk php_example.h example.php *_wrap.c diff --git a/Examples/php4/funcptr/BUILD.sh b/Examples/php4/funcptr/BUILD.sh deleted file mode 100755 index d09461979..000000000 --- a/Examples/php4/funcptr/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -c -noproxy -withc example.c example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/funcptr/Makefile b/Examples/php4/funcptr/Makefile new file mode 100644 index 000000000..d48908953 --- /dev/null +++ b/Examples/php4/funcptr/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = + +C_SOURCES = example.c +CXX_SOURCES = + +SWIG = ../../../swig + +all: check + +example_wrap.c: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/funcptr/Makefile.old b/Examples/php4/funcptr/Makefile.old deleted file mode 100644 index c48cc7bd5..000000000 --- a/Examples/php4/funcptr/Makefile.old +++ /dev/null @@ -1,15 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../swig -SRCS = example.c -TARGET = php_example -INTERFACE = example.i -SWIGOPT = -noproxy - -all:: - $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4 - -clean:: - rm -f *_wrap* *.o core *~ *.so *.php php_example.h - -check: all diff --git a/Examples/php4/overloading/BUILD.sh b/Examples/php4/overloading/BUILD.sh deleted file mode 100755 index 6d08c3b23..000000000 --- a/Examples/php4/overloading/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -c++ -withcxx example.cxx example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/overloading/Makefile b/Examples/php4/overloading/Makefile new file mode 100644 index 000000000..06d44bdee --- /dev/null +++ b/Examples/php4/overloading/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = -c++ + +C_SOURCES = +CXX_SOURCES = example.cxx + +SWIG = ../../../swig + +all: check + +example_wrap.cpp: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/pointer/.cvsignore b/Examples/php4/pointer/.cvsignore index 9941b8712..77d1de426 100644 --- a/Examples/php4/pointer/.cvsignore +++ b/Examples/php4/pointer/.cvsignore @@ -1,6 +1,3 @@ -makefile -Makefile -Makefile.lnk php_example.h example.php *_wrap.c diff --git a/Examples/php4/pointer/BUILD.sh b/Examples/php4/pointer/BUILD.sh deleted file mode 100755 index b79290003..000000000 --- a/Examples/php4/pointer/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -noproxy -withc example.c example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/pointer/Makefile b/Examples/php4/pointer/Makefile new file mode 100644 index 000000000..4f894de0b --- /dev/null +++ b/Examples/php4/pointer/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = + +C_SOURCES = example.c +CXX_SOURCES = + +SWIG = ../../../swig + +all: check + +example_wrap.c: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/pointer/Makefile.old b/Examples/php4/pointer/Makefile.old deleted file mode 100644 index c48cc7bd5..000000000 --- a/Examples/php4/pointer/Makefile.old +++ /dev/null @@ -1,15 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../swig -SRCS = example.c -TARGET = php_example -INTERFACE = example.i -SWIGOPT = -noproxy - -all:: - $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4 - -clean:: - rm -f *_wrap* *.o core *~ *.so *.php php_example.h - -check: all diff --git a/Examples/php4/pragmas/BUILD.sh b/Examples/php4/pragmas/BUILD.sh deleted file mode 100755 index d25c8ce64..000000000 --- a/Examples/php4/pragmas/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/pragmas/Makefile b/Examples/php4/pragmas/Makefile new file mode 100644 index 000000000..5ecf9863f --- /dev/null +++ b/Examples/php4/pragmas/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = + +C_SOURCES = +CXX_SOURCES = + +SWIG = ../../../swig + +all: check + +example_wrap.c: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ example.so core example.php php_example.h diff --git a/Examples/php4/reference/.cvsignore b/Examples/php4/reference/.cvsignore index 9941b8712..77d1de426 100644 --- a/Examples/php4/reference/.cvsignore +++ b/Examples/php4/reference/.cvsignore @@ -1,6 +1,3 @@ -makefile -Makefile -Makefile.lnk php_example.h example.php *_wrap.c diff --git a/Examples/php4/reference/BUILD.sh b/Examples/php4/reference/BUILD.sh deleted file mode 100755 index 241ed0228..000000000 --- a/Examples/php4/reference/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -c++ -noproxy -withcxx example.cxx example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/reference/Makefile b/Examples/php4/reference/Makefile new file mode 100644 index 000000000..eb9145bd3 --- /dev/null +++ b/Examples/php4/reference/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = -c++ -noproxy + +C_SOURCES = +CXX_SOURCES = example.cxx + +SWIG = ../../../swig + +all: check + +example_wrap.cpp: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/reference/Makefile.old b/Examples/php4/reference/Makefile.old deleted file mode 100644 index 7465de804..000000000 --- a/Examples/php4/reference/Makefile.old +++ /dev/null @@ -1,17 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../swig -CXXSRCS = example.cxx -TARGET = php_example -INTERFACE = example.i -LIBS = -lm -SWIGOPT = -noproxy - -all:: - $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \ - php4_cpp - -clean:: - rm -f *_wrap* *.o *~ *.so .~* core php_example.h *.php - -check: all diff --git a/Examples/php4/shadow/.cvsignore b/Examples/php4/shadow/.cvsignore index 9941b8712..77d1de426 100644 --- a/Examples/php4/shadow/.cvsignore +++ b/Examples/php4/shadow/.cvsignore @@ -1,6 +1,3 @@ -makefile -Makefile -Makefile.lnk php_example.h example.php *_wrap.c diff --git a/Examples/php4/shadow/BUILD.sh b/Examples/php4/shadow/BUILD.sh deleted file mode 100755 index 6d08c3b23..000000000 --- a/Examples/php4/shadow/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -c++ -withcxx example.cxx example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/shadow/Makefile b/Examples/php4/shadow/Makefile new file mode 100644 index 000000000..06d44bdee --- /dev/null +++ b/Examples/php4/shadow/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = -c++ + +C_SOURCES = +CXX_SOURCES = example.cxx + +SWIG = ../../../swig + +all: check + +example_wrap.cpp: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/shadow/Makefile.old b/Examples/php4/shadow/Makefile.old deleted file mode 100644 index 4878e8abe..000000000 --- a/Examples/php4/shadow/Makefile.old +++ /dev/null @@ -1,16 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../swig -CXXSRCS = example.cxx -TARGET = php_example -INTERFACE = example.i -LIBS = -lm -#SWIGOPT = -proxy - -all:: - $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4_cpp - -clean:: - rm -f *_wrap* *.o *~ *.so .~* core *.php php_example.h - -check: all diff --git a/Examples/php4/simple/.cvsignore b/Examples/php4/simple/.cvsignore index 9941b8712..77d1de426 100644 --- a/Examples/php4/simple/.cvsignore +++ b/Examples/php4/simple/.cvsignore @@ -1,6 +1,3 @@ -makefile -Makefile -Makefile.lnk php_example.h example.php *_wrap.c diff --git a/Examples/php4/simple/BUILD.sh b/Examples/php4/simple/BUILD.sh deleted file mode 100755 index b79290003..000000000 --- a/Examples/php4/simple/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -noproxy -withc example.c example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/simple/Makefile b/Examples/php4/simple/Makefile new file mode 100644 index 000000000..4f894de0b --- /dev/null +++ b/Examples/php4/simple/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = + +C_SOURCES = example.c +CXX_SOURCES = + +SWIG = ../../../swig + +all: check + +example_wrap.c: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/simple/Makefile.old b/Examples/php4/simple/Makefile.old deleted file mode 100644 index 816da0c2b..000000000 --- a/Examples/php4/simple/Makefile.old +++ /dev/null @@ -1,15 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../swig -SRCS = example.c -TARGET = libexample -INTERFACE = example.i -SWIGOPT = -noproxy - -all:: - $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4 - -clean:: - rm -f *_wrap* *.o core *~ *.so *.php - -check: all diff --git a/Examples/php4/sync/.cvsignore b/Examples/php4/sync/.cvsignore index 9941b8712..77d1de426 100644 --- a/Examples/php4/sync/.cvsignore +++ b/Examples/php4/sync/.cvsignore @@ -1,6 +1,3 @@ -makefile -Makefile -Makefile.lnk php_example.h example.php *_wrap.c diff --git a/Examples/php4/sync/BUILD.sh b/Examples/php4/sync/BUILD.sh deleted file mode 100755 index 6d08c3b23..000000000 --- a/Examples/php4/sync/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -c++ -withcxx example.cxx example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/sync/Makefile b/Examples/php4/sync/Makefile new file mode 100644 index 000000000..06d44bdee --- /dev/null +++ b/Examples/php4/sync/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = -c++ + +C_SOURCES = +CXX_SOURCES = example.cxx + +SWIG = ../../../swig + +all: check + +example_wrap.cpp: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/sync/Makefile.old b/Examples/php4/sync/Makefile.old deleted file mode 100644 index 3418f733f..000000000 --- a/Examples/php4/sync/Makefile.old +++ /dev/null @@ -1,15 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../swig -CXXSRCS = example.cxx -TARGET = libexample -INTERFACE = example.i -SWIGOPT = -noproxy - -all:: - $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4_cpp - -clean:: - rm -f *_wrap* *.o core *~ *.so *.php php_example.h - -check: all diff --git a/Examples/php4/value/.cvsignore b/Examples/php4/value/.cvsignore index 9941b8712..77d1de426 100644 --- a/Examples/php4/value/.cvsignore +++ b/Examples/php4/value/.cvsignore @@ -1,6 +1,3 @@ -makefile -Makefile -Makefile.lnk php_example.h example.php *_wrap.c diff --git a/Examples/php4/value/BUILD.sh b/Examples/php4/value/BUILD.sh deleted file mode 100755 index b79290003..000000000 --- a/Examples/php4/value/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -noproxy -withc example.c example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/value/Makefile b/Examples/php4/value/Makefile new file mode 100644 index 000000000..38a2458be --- /dev/null +++ b/Examples/php4/value/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = -noproxy + +C_SOURCES = example.c +CXX_SOURCES = + +SWIG = ../../../swig + +all: check + +example_wrap.c: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/value/Makefile.old b/Examples/php4/value/Makefile.old deleted file mode 100644 index c48cc7bd5..000000000 --- a/Examples/php4/value/Makefile.old +++ /dev/null @@ -1,15 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../swig -SRCS = example.c -TARGET = php_example -INTERFACE = example.i -SWIGOPT = -noproxy - -all:: - $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4 - -clean:: - rm -f *_wrap* *.o core *~ *.so *.php php_example.h - -check: all diff --git a/Examples/php4/variables/.cvsignore b/Examples/php4/variables/.cvsignore index 9941b8712..77d1de426 100644 --- a/Examples/php4/variables/.cvsignore +++ b/Examples/php4/variables/.cvsignore @@ -1,6 +1,3 @@ -makefile -Makefile -Makefile.lnk php_example.h example.php *_wrap.c diff --git a/Examples/php4/variables/BUILD.sh b/Examples/php4/variables/BUILD.sh deleted file mode 100755 index b79290003..000000000 --- a/Examples/php4/variables/BUILD.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -e - -${SWIG:=swig} -php4 -make -noproxy -withc example.c example.i -make -php -d extension_dir=. runme.php4 diff --git a/Examples/php4/variables/Makefile b/Examples/php4/variables/Makefile new file mode 100644 index 000000000..ce9d8ff45 --- /dev/null +++ b/Examples/php4/variables/Makefile @@ -0,0 +1,37 @@ + +SWIGFLAGS = + +C_SOURCES = example.c +CXX_SOURCES = + +SWIG = ../../../swig + +all: check + +example_wrap.c: example.i + $(SWIG) -php4 $(SWIGFLAGS) example.i + +OBJS= example_wrap.o $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cxx=.o) + +PROG=php_example.so + +PHP_INC=`php-config --includes` + +CFLAGS = -fpic +LDFLAGS = -shared + +$(PROG): $(OBJS) + $(CXX) $(LDFLAGS) $(OBJS) -o $(PROG) $(EXTRA_LIB) + +%.o: %.cpp + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.cxx + $(CXX) $(PHP_INC) $(CFLAGS) -c $< +%.o: %.c + $(CC) $(PHP_INC) $(CFLAGS) -c $< + +check: $(PROG) + @php -d extension_dir=. runme.php4 + +clean: + rm -f example_wrap.* *.o *~ *.so core example.php php_example.h diff --git a/Examples/php4/variables/Makefile.old b/Examples/php4/variables/Makefile.old deleted file mode 100644 index c48cc7bd5..000000000 --- a/Examples/php4/variables/Makefile.old +++ /dev/null @@ -1,15 +0,0 @@ -TOP = ../.. -SWIG = $(TOP)/../swig -SRCS = example.c -TARGET = php_example -INTERFACE = example.i -SWIGOPT = -noproxy - -all:: - $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4 - -clean:: - rm -f *_wrap* *.o core *~ *.so *.php php_example.h - -check: all