Created Makefiles which do both make check and make clean correctly.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7601 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3959f9cfda
commit
f32ae9abbe
54 changed files with 555 additions and 299 deletions
|
|
@ -1,6 +1,3 @@
|
|||
makefile
|
||||
Makefile
|
||||
Makefile.lnk
|
||||
php_example.h
|
||||
example.php
|
||||
*_wrap.c
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
#! /bin/sh -e
|
||||
|
||||
${SWIG:=swig} -php4 -make -noproxy -withc example.c example.i
|
||||
make
|
||||
php -d extension_dir=. runme.php4
|
||||
37
Examples/php4/pointer/Makefile
Normal file
37
Examples/php4/pointer/Makefile
Normal 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
|
||||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue