update swig on windows
This commit is contained in:
20
winx64/bin/swigwin-4.0.0/Examples/php/pragmas/Makefile
Normal file
20
winx64/bin/swigwin-4.0.0/Examples/php/pragmas/Makefile
Normal file
@@ -0,0 +1,20 @@
|
||||
TOP = ../..
|
||||
SWIGEXE = $(TOP)/../swig
|
||||
SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
|
||||
SRCS =
|
||||
TARGET = example
|
||||
INTERFACE = example.i
|
||||
LIBS =
|
||||
SWIGOPT =
|
||||
|
||||
check: build
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_run
|
||||
|
||||
build:
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' \
|
||||
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
|
||||
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' \
|
||||
php
|
||||
|
||||
clean:
|
||||
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' php_clean
|
||||
32
winx64/bin/swigwin-4.0.0/Examples/php/pragmas/example.i
Normal file
32
winx64/bin/swigwin-4.0.0/Examples/php/pragmas/example.i
Normal file
@@ -0,0 +1,32 @@
|
||||
/* File : example.i */
|
||||
%module example
|
||||
|
||||
%init{
|
||||
zend_printf("This was %%init\n");
|
||||
}
|
||||
|
||||
%minit{
|
||||
zend_printf("This was %%minit\n");
|
||||
}
|
||||
|
||||
%mshutdown{
|
||||
zend_printf("This was %%shutdown\n");
|
||||
}
|
||||
|
||||
%rinit{
|
||||
zend_printf("This was %%rinit\n");
|
||||
}
|
||||
|
||||
%rshutdown{
|
||||
zend_printf("This was %%rshutdown\n");
|
||||
}
|
||||
|
||||
%pragma(php) include="include.php";
|
||||
|
||||
%pragma(php) code="
|
||||
# This code is inserted into example.php
|
||||
echo \"this was php code\\n\";
|
||||
"
|
||||
%pragma(php) version="1.5"
|
||||
|
||||
%pragma(php) phpinfo="php_info_print_table_start();"
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
# This code is inserted into example.php
|
||||
echo "this is include.php\n";
|
||||
|
||||
|
||||
?>
|
||||
6
winx64/bin/swigwin-4.0.0/Examples/php/pragmas/runme.php
Normal file
6
winx64/bin/swigwin-4.0.0/Examples/php/pragmas/runme.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
require "example.php";
|
||||
|
||||
echo "Version - " . ((new ReflectionExtension('example'))->getVersion());
|
||||
?>
|
||||
Reference in New Issue
Block a user