Commit f2be704e authored by Claes Sjofors's avatar Claes Sjofors

Python interface for rt and wb added

parent c2c2a843
include $(pwre_dir_symbols)
ifndef variables_mk
-include $(pwre_sroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef variables_mk
include $(pwre_sroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef rules_mk
-include $(pwre_sroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef rules_mk
include $(pwre_sroot)/tools/bld/src/$(os_name)/rules.mk
endif
export_obj := $(pwr_exe)/pwrrt.so
clean_obj := clean_pwrrt.so
.PHONY : all init copy lib exe clean
all : init copy lib exe | silent
init :
@ if [ ! -e $(bld_dir) ]; then \
mkdir -p $(bld_dir); \
fi
copy :
lib :
exe : $(export_obj) | silent
clean : $(clean_obj)
silent :
@ :
.SUFFIXES:
$(exe_dir)/pwrrt.so : ../../pwrrtmodule.c
@ if [ $(PWRE_CONF_PYDEV) -eq 1 ]; then\
echo "Bulding Python c extension pwrrt";\
cd ../..;\
python setup_pwrrt.py -q build --build-base $(bld_dir);\
if [ "$(pwre_hw)" == "hw_x86_64" ]; then \
mv $(bld_dir)/lib.linux-x86_64-2.7/pwrrt.so $(pwr_exe); \
elif [ "$(pwre_hw)" == "hw_x86" ]; then \
mv $(bld_dir)/lib.linux-i686-2.7/pwrrt.so $(pwr_exe); \
fi;\
python setup_pwrrt.py -q install_egg_info --install-dir $(pwr_exe);\
else\
echo "Not building Python c extension pwrrt";\
fi
clean_pwrrt.so : ../../pwrrtmodule.c
rm $(pwr_exe)/pwrrt.so
This diff is collapsed.
from distutils.core import setup, Extension
import os
pwr_lib = os.environ['pwr_lib']
pwr_obj = os.environ['pwr_obj']
pwr_inc = os.environ['pwr_inc']
pwrrtmodule = Extension( name='pwrrt',
sources=['pwrrtmodule.c'],
define_macros=[('OS_POSIX', '1'),
('OS','linux'),
('HW_X86', '1'),
('HW', 'x86')],
extra_objects=[pwr_obj + '/pwr_msg_co.o',
pwr_obj + '/pwr_msg_rt.o'],
include_dirs=[pwr_inc],
library_dirs=[pwr_lib],
libraries=['pwr_rt','pwr_co','pwr_msg_dummy','pthread',
'rt', 'm', 'crypt'],
language='c++'
)
setup( name='pwrrt',
version='1.0',
url='www.proview.se',
author='ProviewR development team',
author_email='support@proview.se',
license='GPL V2',
description='ProviewR runtime interface',
ext_modules=[pwrrtmodule])
...@@ -1076,6 +1076,7 @@ sub build_module () ...@@ -1076,6 +1076,7 @@ sub build_module ()
_build("doc", "dox", "src", "all"); _build("doc", "dox", "src", "all");
_build("wbl", "pwrs", "src", "exe"); _build("wbl", "pwrs", "src", "exe");
_build("wbl", "pwrb", "src", "exe"); _build("wbl", "pwrb", "src", "exe");
_build("exp", "pwrrt", "src", "exe");
} }
} }
elsif ( $module eq "java") { elsif ( $module eq "java") {
...@@ -1145,6 +1146,7 @@ sub build_module () ...@@ -1145,6 +1146,7 @@ sub build_module ()
_build("exe", "*", $flavour, "all"); _build("exe", "*", $flavour, "all");
_build("doc", "dsh", "src", "copy"); _build("doc", "dsh", "src", "copy");
_build("doc", "orm", "src", "copy"); _build("doc", "orm", "src", "copy");
_build("exp", "pwrwb", "src", "exe");
} }
} }
} }
......
...@@ -420,6 +420,7 @@ if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then ...@@ -420,6 +420,7 @@ if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then
pwre_config_check_include jni JNI 1 $jdk/include/jni.h pwre_config_check_include jni JNI 1 $jdk/include/jni.h
pwre_config_check_include jni JNI 0 $jdk/include/linux/jni_md.h pwre_config_check_include jni JNI 0 $jdk/include/linux/jni_md.h
pwre_config_check_include pydev PYDEV 1 "/usr/include/python2.7/Python.h"
rm $pwre_sroot/tools/exe/tools_cmsg2c/src/.os_linux/.hw_arm/makefile rm $pwre_sroot/tools/exe/tools_cmsg2c/src/.os_linux/.hw_arm/makefile
rm $pwre_sroot/tools/exe/tools_msg2cmsg/src/.os_linux/.hw_arm/makefile rm $pwre_sroot/tools/exe/tools_msg2cmsg/src/.os_linux/.hw_arm/makefile
...@@ -539,6 +540,7 @@ else ...@@ -539,6 +540,7 @@ else
pwre_config_check_include powerlinkuser EPLU 0 "$epl/Examples/X86/Generic/powerlink_user_lib/EplCfg.h" pwre_config_check_include powerlinkuser EPLU 0 "$epl/Examples/X86/Generic/powerlink_user_lib/EplCfg.h"
pwre_config_check_include rsvg RSVG 1 "/usr/include/librsvg-2/librsvg/rsvg.h:/usr/include/librsvg-2.0/librsvg/rsvg.h" pwre_config_check_include rsvg RSVG 1 "/usr/include/librsvg-2/librsvg/rsvg.h:/usr/include/librsvg-2.0/librsvg/rsvg.h"
pwre_config_check_tool android ANDROID "/usr/local/android-sdk-linux/tools/android" pwre_config_check_tool android ANDROID "/usr/local/android-sdk-linux/tools/android"
pwre_config_check_include pydev PYDEV 1 "/usr/include/python2.7/Python.h"
export pwre_conf_alsa=1 export pwre_conf_alsa=1
......
include $(pwre_dir_symbols)
ifndef variables_mk
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef variables_mk
include $(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef rules_mk
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef rules_mk
include $(pwre_kroot)/tools/bld/src/$(os_name)/rules.mk
endif
export_obj := $(pwr_exe)/pwrwb.so
clean_obj := clean_pwrwb.so
.PHONY : all init copy lib exe clean
all : init copy lib exe | silent
init :
@ if [ ! -e $(bld_dir) ]; then \
mkdir -p $(bld_dir); \
fi
copy :
lib :
exe : $(export_obj) | silent
clean : $(clean_obj)
silent :
@ :
.SUFFIXES:
$(exe_dir)/pwrwb.so : ../../pwrwbmodule.cpp
@ if [ $(PWRE_CONF_PYDEV) -eq 1 ]; then\
echo "Bulding Python c extension pwrwb";\
cd ../..;\
python setup_pwrwb.py -q build --build-base $(bld_dir);\
if [ "$(pwre_hw)" == "hw_x86_64" ]; then \
mv $(bld_dir)/lib.linux-x86_64-2.7/pwrwb.so $(pwr_exe); \
elif [ "$(pwre_hw)" == "hw_x86" ]; then \
mv $(bld_dir)/lib.linux-i686-2.7/pwrwb.so $(pwr_exe); \
fi;\
python setup_pwrwb.py -q install_egg_info --install-dir $(pwr_exe);\
else\
echo "Not building Python c extension pwrwb";\
fi
clean_pwrwb.so : ../../pwrwbmodule.cpp
rm $(pwr_exe)/pwrwb.so
This diff is collapsed.
from distutils.core import setup, Extension
import commands
import os
pwr_lib = os.environ['pwr_elib']
pwr_obj = os.environ['pwr_eobj']
pwr_inc = os.environ['pwr_einc']
pwrwbmodule = Extension( name='pwrwb',
sources=['pwrwbmodule.cpp'],
define_macros=[('OS_POSIX', '1'),
('OS','linux'),
('HW_X86', '1'),
('HW', 'x86')],
extra_objects=[pwr_obj + '/pwr_msg_co.o',
pwr_obj + '/pwr_msg_rt.o',
pwr_obj + '/pwr_msg_wb.o',
pwr_obj + '/rt_io_user.o',
pwr_obj + '/wb_procom.o',
pwr_obj + '/stdsoap2.o'],
include_dirs=[pwr_inc],
library_dirs=[pwr_lib],
libraries=['pwr_wb_gtk', 'pwr_xtt_gtk', 'pwr_ge_gtk', 'pwr_cow_gtk',
'pwr_flow_gtk', 'pwr_glow_gtk',
'pwr_wb', 'pwr_xtt', 'pwr_ge', 'pwr_cow', 'pwr_flow', 'pwr_glow',
'pwr_wb_gtk', 'pwr_wb', 'pwr_xtt_gtk', 'pwr_ge_gtk', 'pwr_cow_gtk',
'pwr_flow_gtk', 'pwr_glow_gtk', 'pwr_xtt', 'pwr_ge', 'pwr_cow',
'pwr_flow', 'pwr_glow',
'pwr_rt', 'pwr_statussrv', 'pwr_co',
'pwr_msg_dummy', 'db_cxx', 'rpcsvc', 'asound', 'pthread',
'm', 'db', 'z', 'crypt', 'rt', 'fl', 'X11', 'mysqlclient',
'sqlite3', 'rsvg-2','gtk-x11-2.0'],
# extra_link_args=['-L/usr/lib/x86_64-linux-gnu', commands.getoutput('pkg-config --libs gtk+-2.0')],
language='c++'
)
setup( name='pwrwb',
version='1.0',
url='www.proview.se',
author='ProviewR development team',
author_email='support@proview.se',
license='GPL V2',
description='ProviewR workbench interface',
ext_modules=[pwrwbmodule])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment