Created Makefiles which do both make check and make clean correctly.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7601 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Kevin Ruland 2005-10-07 02:36:16 +00:00
commit 5db524b2b3
54 changed files with 555 additions and 299 deletions

View file

@ -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)

View file

@ -2,12 +2,17 @@
# (see also top-level configure.in kludge) # (see also top-level configure.in kludge)
class class
constants constants
cpointer
disown
enum enum
funcptr funcptr
overloading
pointer pointer
pragmas
reference reference
shadow shadow
simple simple
struct
sync sync
value value
variables variables

View file

@ -1,6 +1,3 @@
makefile
Makefile
Makefile.lnk
php_example.h php_example.h
example.php example.php
*_wrap.c *_wrap.c

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,3 @@
makefile
Makefile
Makefile.lnk
php_example.h php_example.h
example.php example.php
*_wrap.c *_wrap.c

View file

@ -1,5 +0,0 @@
#! /bin/sh -e
${SWIG:=swig} -php4 -make -noproxy example.i
make
php -d extension_dir=. runme.php4

View file

@ -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

View file

@ -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

View file

@ -1,5 +0,0 @@
#! /bin/sh -e
${SWIG:=swig} -php4 -make -noproxy -withc example.c example.i
make
php -d extension_dir=. runme.php4

View file

@ -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

View file

@ -1,5 +0,0 @@
#! /bin/sh -e
${SWIG:=swig} -php4 -c++ -make -withcxx example.cxx example.i
make
php -d extension_dir=. runme.php4

View file

@ -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 all: check
check: example_wrap.cpp: example.i
./BUILD.sh $(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: clean:
rm -f $(CRUD) rm -f example_wrap.* *.o *~ *.so core example.php php_example.h

View file

@ -1,6 +1,3 @@
makefile
Makefile
Makefile.lnk
php_example.h php_example.h
example.php example.php
*_wrap.c *_wrap.c

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,3 @@
makefile
Makefile
Makefile.lnk
php_example.h php_example.h
example.php example.php
*_wrap.c *_wrap.c

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,5 +0,0 @@
#! /bin/sh -e
${SWIG:=swig} -php4 -make -c++ -withcxx example.cxx example.i
make
php -d extension_dir=. runme.php4

View file

@ -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

View file

@ -1,6 +1,3 @@
makefile
Makefile
Makefile.lnk
php_example.h php_example.h
example.php example.php
*_wrap.c *_wrap.c

View file

@ -1,5 +0,0 @@
#! /bin/sh -e
${SWIG:=swig} -php4 -make -noproxy -withc example.c example.i
make
php -d extension_dir=. runme.php4

View file

@ -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

View file

@ -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

View file

@ -1,5 +0,0 @@
#! /bin/sh -e
${SWIG:=swig} -php4 -make example.i
make
php -d extension_dir=. runme.php4

View file

@ -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

View file

@ -1,6 +1,3 @@
makefile
Makefile
Makefile.lnk
php_example.h php_example.h
example.php example.php
*_wrap.c *_wrap.c

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,3 @@
makefile
Makefile
Makefile.lnk
php_example.h php_example.h
example.php example.php
*_wrap.c *_wrap.c

View file

@ -1,5 +0,0 @@
#! /bin/sh -e
${SWIG:=swig} -php4 -make -c++ -withcxx example.cxx example.i
make
php -d extension_dir=. runme.php4

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,3 @@
makefile
Makefile
Makefile.lnk
php_example.h php_example.h
example.php example.php
*_wrap.c *_wrap.c

View file

@ -1,5 +0,0 @@
#! /bin/sh -e
${SWIG:=swig} -php4 -make -noproxy -withc example.c example.i
make
php -d extension_dir=. runme.php4

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,3 @@
makefile
Makefile
Makefile.lnk
php_example.h php_example.h
example.php example.php
*_wrap.c *_wrap.c

View file

@ -1,5 +0,0 @@
#! /bin/sh -e
${SWIG:=swig} -php4 -make -c++ -withcxx example.cxx example.i
make
php -d extension_dir=. runme.php4

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,3 @@
makefile
Makefile
Makefile.lnk
php_example.h php_example.h
example.php example.php
*_wrap.c *_wrap.c

View file

@ -1,5 +0,0 @@
#! /bin/sh -e
${SWIG:=swig} -php4 -make -noproxy -withc example.c example.i
make
php -d extension_dir=. runme.php4

View file

@ -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

View file

@ -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

View file

@ -1,6 +1,3 @@
makefile
Makefile
Makefile.lnk
php_example.h php_example.h
example.php example.php
*_wrap.c *_wrap.c

View file

@ -1,5 +0,0 @@
#! /bin/sh -e
${SWIG:=swig} -php4 -make -noproxy -withc example.c example.i
make
php -d extension_dir=. runme.php4

View file

@ -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

View file

@ -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