From: kruland <kr...@us...> - 2005-10-07 02:36:24
|
Update of /cvsroot/swig/SWIG/Examples/php4/disown In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23831/disown Modified Files: Makefile Removed Files: BUILD.sh Log Message: Created Makefiles which do both make check and make clean correctly. --- BUILD.sh DELETED --- Index: Makefile =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/php4/disown/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 7 Sep 2005 01:56:03 -0000 1.1 --- Makefile 7 Oct 2005 02:36:15 -0000 1.2 *************** *** 1,12 **** ! 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) --- 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 |