other than KERNEL.
Only one module has been added : GEOM
Only one data type has been added : GEOM_Object
The structure is ready for other modules and data types.
cat > temp.export << END
P actions make_etude
-P version STA10.0
+P version STA10.1
P nomjob salome
P ncpus 1
A memjeveux 4.000000
F erre $PWD/erre R 9
END
-/local/cchris/Aster/V10/Install/ASTK/ASTK_SERV/bin/as_run temp.export
+/local/cchris/Aster/V10.1/aster/ASTK/ASTK_SERV/bin/as_run temp.export
#
ID_PERF | id | - | claui2c6
#
-ENV_SH | env | - | /local/cchris/Aster/V10/Install/STA10.0/profile.sh
+ENV_SH | env | - | /local/cchris/Aster/V10.1/aster/STA10.1/profile.sh
#
LIB | ar | ? | /usr/bin/ar -rv
#
-BIBL | python | 2.4 | -lpython2.5
-BIBL | med | 2.3.5 | -Wl,-R -Wl,/local/cchris/pkg/med235/install/lib -L/local/cchris/pkg/med235/install/lib -lmed
-BIBL | hdf5 | 1.6.5 | -lhdf5
+BIBL | python | 2.4 | -L/usr/lib -L/usr/lib/python2.5/config -lpython2.5
+BIBL | med | 2.3.5 | -L/local/cchris/Aster/V10.1/aster/public/med-2.3.6/lib -lmed
+BIBL | hdf5 | 1.6.5 | -L/usr/lib -lhdf5
BIBL | zmat | 8.4 |
-BIBL | mumps | ? | /local/cchris/Aster/V10/Install/public/mumps-4.7.3/lib/libdmumps.a /local/cchris/Aster/V10/Install/public/mumps-4.7.3/lib/libzmumps.a /local/cchris/Aster/V10/Install/public/mumps-4.7.3/lib/libpord.a /local/cchris/Aster/V10/Install/public/mumps-4.7.3/libseq/libmpiseq.a
+BIBL | mumps | ? | /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libdmumps.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libzmumps.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libsmumps.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libcmumps.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libmumps_common.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libpord.a /local/cchris/Aster/V10.1/aster/public/mumps-4.8.4/lib/libmpiseq.a -L/local/cchris/Aster/V10.1/aster/public/metis-4.0/lib -lmetis
BIBL | scotch | 4.0 |
-BIBL | math | ? | /usr/lib/liblapack.a /usr/lib/libblas.a /usr/lib/gcc/x86_64-linux-gnu/4.3/libgfortran.a /usr/lib/gcc/x86_64-linux-gnu/4.3/libgfortran.a
+BIBL | math | ? | -L/usr/lib -llapack -L/usr/lib -lblas -L/usr/lib/gcc/x86_64-linux-gnu/4.3 -lgfortran
BIBL | mpi | 2 |
BIBL | c++ | ? | -L/usr/lib/gcc/x86_64-linux-gnu/4.3 -lstdc++ -lsupc++
BIBL | sys | ? | -Wl,--allow-multiple-definition -Wl,--export-dynamic -lieee -ldl -lpthread -lutil -lm -lz
OPTL | link | ? | -fopenmp
#
CC | cc | ? | /usr/bin/gcc
-OPTC_D | cc | ? | -c -g -fno-stack-protector
-OPTC_O | cc | ? | -c -O2 -fno-stack-protector
-INCL | include | ? | -I/local/cchris/Aster/V10/Install/STA10.0/bibc/include -I/usr/include/python2.5 -I/local/cchris/Aster/V10/Install/public/hdf5-1.6.5/include
+OPTC_D | cc | ? | -c -g -fno-stack-protector -fPIC
+OPTC_O | cc | ? | -c -O2 -fno-stack-protector -fPIC
+INCL | include | ? | -I/local/cchris/Aster/V10.1/aster/STA10.1/bibc/include -I/usr/include/python2.5
#
F77 | f77 | ? | /usr/bin/gfortran
-OPTF_D | f77 | ? | -c -g -fopenmp -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
-OPTF_O | f77 | ? | -c -O2 -fopenmp -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
+OPTF_D | f77 | ? | -c -g -fopenmp -fPIC -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
+OPTF_O | f77 | ? | -c -O2 -fopenmp -fPIC -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
INCLF | include | ? | -I/local/cchris/Salome/Install/KERNEL_V5/include/salome
#
F90 | f90 | ? | /usr/bin/gfortran
-OPTF90_D | f90 | ? | -c -g -ffixed-line-length-0 -x f77-cpp-input -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
-OPTF90_O | f90 | ? | -c -O2 -ffixed-line-length-0 -x f77-cpp-input -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
-INCLF90 | include | ? | -I/local/cchris/Aster/V10/Install/STA10.0/bibf90/include_mumps-4.7.3
+OPTF90_D | f90 | ? | -c -g -ffixed-line-length-0 -x f77-cpp-input -fPIC -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
+OPTF90_O | f90 | ? | -c -O2 -ffixed-line-length-0 -x f77-cpp-input -fPIC -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8
+INCLF90 | include | ? | -I/local/cchris/Aster/V10.1/aster/STA10.1/bibf90/include_mumps-4.8.4
#
G77_AGLA | g77 | ? | unused
#
SRCFOR | src | 11-04 | bibfor
-#Comment following line if you have no f90 compiler
SRCF90 | src | 11-04 | bibf90
SRCFERM | src | 11-04 | fermetur
SRCC | src | 11-04 | bibc
MAKE_SURCH_OFFI | build | 11-04 | Lecture_Cata_Ele/make_surch_offi.py
MAKE_CAPY_OFFI | build | 11-04 | Lecture_Cata_Ele/make_capy_offi.py
#
-REPOUT | exec | 11-04 | /local/cchris/Aster/V10/Install/outils
-REPMAT | exec | 02-05 | /local/cchris/Aster/V10/Install/STA10.0/materiau
-REPDEX | exec | 02-05 | /local/cchris/Aster/V10/Install/STA10.0/datg
+REPOUT | exec | 11-04 | /local/cchris/Aster/V10.1/aster/outils
+REPMAT | exec | 02-05 | /local/cchris/Aster/V10.1/aster/STA10.1/materiau
+REPDEX | exec | 02-05 | /local/cchris/Aster/V10.1/aster/STA10.1/datg
#
SUPERV | exec | 03-02 | Accas
SUPERV | exec | 03-02 | Build
"makeflags":"",
"prerequisites":"/local/cchris/.packages.d/envSalome5",
"kernel":KERNEL_ROOT_DIR,
- "paco":"/local/cchris/pkg/paco/install",
- "mpi":"/usr/lib/openmpi",
}
-aster_home="/local/cchris/Aster/V10/Install"
-aster_version="STA10.0"
+aster_home="/local/cchris/Aster/V10.1/aster"
+aster_version="STA10.1"
+#aster_home="/local/cchris/Aster/V10/Install"
+#aster_version="STA10.0"
KERNEL_ROOT_DIR=/local/cchris/Salome/Install/KERNEL_V5
-ASTER_ROOT=/local/cchris/Aster/V10/Install
-ASTER_VERSION=STA10.0
+ASTER_ROOT=/local/cchris/Aster/V10.1/aster
+ASTER_VERSION=STA10.1
+#ASTER_ROOT=/local/cchris/Aster/V10/Install
+#ASTER_VERSION=STA10.0
FC=gfortran
from module_generator import Generator,Module,Service,PACOComponent
#import context from ..
-execfile("../context.py")
+execfile("../pacocontext.py")
cwd=os.getcwd()
from module_generator import Generator,Module,Service,PACOComponent
#import context from ..
-execfile("../context.py")
+execfile("../pacocontext.py")
cwd=os.getcwd()
from module_generator import Generator,Module,Service,PACOComponent
#import context from ..
-execfile("../context.py")
+execfile("../pacocontext.py")
cwd=os.getcwd()
--- /dev/null
+
+import os
+
+KERNEL_ROOT_DIR=os.getenv("KERNEL_ROOT_DIR","/local/cchris/Salome/Install/KERNEL_V5")
+GUI_ROOT_DIR=os.getenv("GUI_ROOT_DIR","/local/cchris/Salome/Install/GUI_V5")
+YACS_ROOT_DIR=os.getenv("YACS_ROOT_DIR","/local/cchris/Salome/Install/YACS_V5_1_main")
+
+context={'update':1,
+ "makeflags":"",
+ "prerequisites":"/local/cchris/.packages.d/envSalome5",
+ "kernel":KERNEL_ROOT_DIR,
+ "paco":"/local/cchris/pkg/paco/install",
+ "mpi":"/usr/lib/openmpi",
+ }
+
+
+aster_home="/local/cchris/Aster/V10.1/aster"
+aster_version="STA10.1"
+#aster_home="/local/cchris/Aster/V10/Install"
+#aster_version="STA10.0"
+
+
"""
- Pacakge to generate SALOME modules with components
+ Package to generate SALOME modules with components
implemented in C++, Fortran or Python
- that can use datastream ports
+ that can use datastream ports
"""
from gener import Module, Service, Generator
from fcompo import F77Component
#include "SALOME_Exception.idl"
#include "SALOME_PACOExtension.idl"
+${idldefs}
+
module ${module}
{
typedef sequence<string> stringvec;
lib${module}_la_SOURCES =
nodist_lib${module}_la_SOURCES = ${module}SK.cc
nodist_salomeinclude_HEADERS= ${module}.hh ${PACO_SALOMEINCLUDE_HEADERS}
-lib${module}_la_CXXFLAGS = -I. $$(KERNEL_INCLUDES)
-lib${module}_la_LIBADD = $$(KERNEL_LIBS)
+lib${module}_la_CXXFLAGS = -I. $$(SALOME_INCLUDES)
+lib${module}_la_LIBADD = $$(SALOME_IDL_LIBS)
##########################################################
%SK.cc %.hh : %.idl
\t$$(OMNIORB_IDL) -bcxx $$(IDLCXXFLAGS) $$(OMNIORB_IDLCXXFLAGS) $$(IDL_INCLUDES) $$<
compoMakefile="""
lib${component}Engine_la_SOURCES = ${component}.cxx ${sources}
nodist_lib${component}Engine_la_SOURCES =
-lib${component}Engine_la_CXXFLAGS = -I$$(top_builddir)/idl $$(KERNEL_INCLUDES) ${includes}
-lib${component}Engine_la_FFLAGS = $$(KERNEL_INCLUDES) -fexceptions ${includes}
-lib${component}Engine_la_LIBADD = -L$$(top_builddir)/idl -l${module} $$(FLIBS) ${libs}
+lib${component}Engine_la_CXXFLAGS = -I$$(top_builddir)/idl $$(SALOME_INCLUDES) ${includes}
+lib${component}Engine_la_FFLAGS = $$(SALOME_INCLUDES) -fexceptions ${includes}
+lib${component}Engine_la_LIBADD = ${libs} -L$$(top_builddir)/idl -l${module} $${SALOME_LIBS} $$(FLIBS)
lib${component}Engine_la_LDFLAGS = ${rlibs}
"""
compoMakefile=Template(compoMakefile)
compoEXEMakefile="""
lib${component}Exelib_la_SOURCES = ${component}.cxx
nodist_lib${component}Exelib_la_SOURCES =
-lib${component}Exelib_la_CXXFLAGS = -I$$(top_builddir)/idl $$(KERNEL_INCLUDES) ${includes}
-lib${component}Exelib_la_FFLAGS = $$(KERNEL_INCLUDES) -fexceptions ${includes}
-lib${component}Exelib_la_LIBADD = -L$$(top_builddir)/idl -l${module} $$(FLIBS) ${libs}
+lib${component}Exelib_la_CXXFLAGS = -I$$(top_builddir)/idl $$(SALOME_INCLUDES) ${includes}
+lib${component}Exelib_la_FFLAGS = $$(SALOME_INCLUDES) -fexceptions ${includes}
+lib${component}Exelib_la_LIBADD = ${libs} -L$$(top_builddir)/idl -l${module} $${SALOME_LIBS} $$(FLIBS)
lib${component}Exelib_la_LDFLAGS = ${rlibs}
"""
compoEXEMakefile=Template(compoEXEMakefile)
makefileItems={"header":"""
include $(top_srcdir)/adm_local/make_common_starter.am
-AM_CFLAGS=$(KERNEL_INCLUDES) -fexceptions
+AM_CFLAGS=$(SALOME_INCLUDES) -fexceptions
"""}
if self.kind == "lib":
makefileItems["lib_LTLIBRARIES"]=["lib"+self.name+"Engine.la"]
from cata_tmpl import cataOutParallelStream, cataInParallelStream
from cata_tmpl import cataService, cataCompo
from aster_tmpl import check_aster
-
-corbaTypes = {"double":"CORBA::Double", "long":"CORBA::Long",
- "string":"const char*", "dblevec":"const %s::dblevec&",
- "stringvec":"const %s::stringvec&", "intvec":"const %s::intvec&",
- "dataref":"const Engines::dataref&","file":None
- }
-
-corbaOutTypes = {"double":"CORBA::Double&", "long":"CORBA::Long&",
- "string":"CORBA::String_out", "dblevec":"%s::dblevec_out",
- "stringvec":"%s::stringvec_out", "intvec":"%s::intvec_out",
- "dataref":"Engines::dataref_out","file":None
- }
-
-def corba_in_type(typ, module):
- if typ in ("dblevec", "intvec", "stringvec"):
- return corbaTypes[typ] % module
- else:
- return corbaTypes[typ]
-
-def corba_out_type(typ, module):
- if typ in ("dblevec", "intvec", "stringvec"):
- return corbaOutTypes[typ] % module
- else:
- return corbaOutTypes[typ]
-
-calciumTypes = {"CALCIUM_double":"CALCIUM_double",
- "CALCIUM_integer":"CALCIUM_integer",
- "CALCIUM_real":"CALCIUM_real",
- "CALCIUM_string":"CALCIUM_string",
- "CALCIUM_complex":"CALCIUM_complex",
- "CALCIUM_logical":"CALCIUM_logical",
- "CALCIUM_long":"CALCIUM_long",
- }
-
-DatastreamParallelTypes = {"Param_Double_Port":"Param_Double_Port"}
-
-ValidImpl = ("CPP", "PY", "F77", "ASTER", "PACO")
-ValidImplTypes = ("sequential", "parallel")
-ValidTypes = corbaTypes.keys()
-ValidStreamTypes = calciumTypes.keys()
-ValidParallelStreamTypes = DatastreamParallelTypes.keys()
-ValidDependencies = ("I", "T")
-PyValidTypes = ValidTypes+["pyobj"]
+from salomemodules import salome_modules
+from yacstypes import corbaTypes, corbaOutTypes, moduleTypes, idlTypes, corba_in_type, corba_out_type
+from yacstypes import ValidTypes, PyValidTypes, calciumTypes, DatastreamParallelTypes
+from yacstypes import ValidImpl, ValidImplTypes, ValidStreamTypes, ValidParallelStreamTypes, ValidDependencies
def makedirs(namedir):
+ """Create a new directory named namedir. If a directory already exists copy it to namedir.bak"""
if os.path.exists(namedir):
dirbak = namedir+".bak"
if os.path.exists(dirbak):
shutil.rmtree(dirbak)
os.rename(namedir, dirbak)
- os.listdir(dirbak) #sert seulement a mettre a jour le systeme de fichier sur certaines machines
+ os.listdir(dirbak) #needed to update filesystem on special machines (cluster with NFS, for example)
os.makedirs(namedir)
class Module(object):
def validate(self):
# Test Module name, canot have a "-" in the name
if self.name.find("-") != -1:
- raise Invalid("Module name %s is not valid, remove caracter - in the module name" % self.name)
+ raise Invalid("Module name %s is not valid, remove character - in the module name" % self.name)
lcompo = set()
for compo in self.components:
if compo.name in lcompo:
compo.validate()
class Component(object):
- def __init__(self, name, services=None, impl="PY", libs="", rlibs="",
+ def __init__(self, name, services=None, impl="PY", libs="", rlibs="",
includes="", kind="lib", sources=None):
self.name = name
self.impl = impl
makefile = "SUBDIRS="
makefileItems={"header":"""
include $(top_srcdir)/adm_local/make_common_starter.am
-AM_CFLAGS=$$(KERNEL_INCLUDES) -fexceptions
+AM_CFLAGS=$$(SALOME_INCLUDES) -fexceptions
""",
"salomepython_PYTHON":[],
"dist_salomescript_SCRIPTS":[],
"body":"",
}
+ #get the list of SALOME modules used and put it in used_modules attribute
+ modules = {}
+ for compo in module.components:
+ for serv in compo.services:
+ for name, typ in serv.inport + serv.outport:
+ mod = moduleTypes[typ]
+ if mod:
+ modules[mod] = 1
+ self.used_modules = modules.keys()
+
for compo in module.components:
#for components files
fdict=compo.makeCompo(self)
if self.module.layout=="multidir":
srcs[compo.name] = fdict
#for src/Makefile.am
- makefile = makefile+" "+compo.name
+ makefile = makefile + " " + compo.name
else:
srcs.update(fdict)
#for src/Makefile.am
makefileItems["salomeinclude_HEADERS"]=makefileItems["salomeinclude_HEADERS"]+mdict.get("salomeinclude_HEADERS",[])
makefileItems["body"]=makefileItems["body"]+mdict.get("body","")+'\n'
- if self.module.layout=="multidir":
+ if self.module.layout == "multidir":
srcs["Makefile.am"] = makefile+'\n'
else:
srcs["Makefile.am"] = self.makeMakefile(makefileItems)
#for catalog files
catalogfile = "%sCatalog.xml" % module.name
+ #add makefile definitions to make_common_starter.am
+ common_starter = makecommon
+ for mod in self.used_modules:
+ common_starter = common_starter + salome_modules[mod]["makefiledefs"] + '\n'
+
self.makeFiles({"autogen.sh":autogen,
"Makefile.am":mainMakefile,
"README":"", "NEWS":"", "AUTHORS":"", "ChangeLog":"",
"src":srcs,
"resources":{"Makefile.am":resMakefile.substitute(module=module.name), catalogfile:self.makeCatalog()},
- "adm_local":{"make_common_starter.am":makecommon, "check_aster.m4":check_aster},
+ "adm_local":{"make_common_starter.am": common_starter, "check_aster.m4":check_aster},
}, namedir)
+ #add checks for modules in configure.ac
+ configure_modules=""
+ for mod in self.used_modules:
+ configure_modules = configure_modules + salome_modules[mod]["configdefs"] + '\n'
+
#for configure.ac
configure_makefiles = []
if self.module.layout=="multidir":
self.makeFiles({"configure.ac":configure.substitute(module=module.name.lower(),
makefiles='\n'.join(configure_makefiles),
- paco_configure=paco_configure),
- "idl":{"Makefile.am":idlMakefile.substitute(module=module.name,
+ paco_configure=paco_configure,
+ modules=configure_modules),
+ "idl":{"Makefile.am":idlMakefile.substitute(module=module.name,
PACO_BUILT_SOURCES=PACO_BUILT_SOURCES,
PACO_SALOMEINCLUDE_HEADERS=PACO_SALOMEINCLUDE_HEADERS,
PACO_INCLUDES=PACO_INCLUDES,
PACO_salomepython_DATA=PACO_salomepython_DATA,
- PACO_salomeidl_DATA=PACO_salomeidl_DATA),
- idlfile:self.makeidl(),
- xmlfile:self.makexml()},
+ PACO_salomeidl_DATA=PACO_salomeidl_DATA),
+ idlfile:self.makeidl(),
+ xmlfile:self.makexml()},
}, namedir)
else :
- self.makeFiles({"configure.ac":configure.substitute(module=module.name.lower(),
+ self.makeFiles({"configure.ac":configure.substitute(module=module.name.lower(),
makefiles='\n'.join(configure_makefiles),
- paco_configure=""),
+ paco_configure="",
+ modules=configure_modules),
"idl":{"Makefile.am":idlMakefile.substitute(module=module.name,
PACO_BUILT_SOURCES="",
PACO_SALOMEINCLUDE_HEADERS="",
params = []
for name, typ in serv.inport:
if typ == "file":continue #files are not passed through IDL interface
- params.append("in %s %s" % (typ, name))
+ params.append("in %s %s" % (idlTypes[typ], name))
for name, typ in serv.outport:
if typ == "file":continue #files are not passed through IDL interface
- params.append("out %s %s" % (typ, name))
+ params.append("out %s %s" % (idlTypes[typ], name))
service = " void %s(" % serv.name
service = service+",".join(params)+");"
services.append(service)
if typ == "file":continue #files are not passed through IDL interface
if compo.impl in ("PY", "ASTER") and typ == "pyobj":
typ = "Engines::fileBlock"
+ else:
+ typ=idlTypes[typ]
params.append("in %s %s" % (typ, name))
for name, typ in serv.outport:
if typ == "file":continue #files are not passed through IDL interface
if compo.impl in ("PY", "ASTER") and typ == "pyobj":
typ = "Engines::fileBlock"
+ else:
+ typ=idlTypes[typ]
params.append("out %s %s" % (typ, name))
service = " void %s(" % serv.name
service = service+",".join(params)+") raises (SALOME::SALOME_Exception);"
services.append(service)
interfaces.append(interface.substitute(component=compo.name, services="\n".join(services)))
- return idl.substitute(module=self.module.name, interfaces='\n'.join(interfaces))
+
+ #build idl includes for SALOME modules
+ idldefs=""
+ for mod in self.used_modules:
+ idldefs = idldefs + salome_modules[mod]["idldefs"]
+
+ return idl.substitute(module=self.module.name, interfaces='\n'.join(interfaces),idldefs=idldefs)
# For PaCO++
def makexml(self):
AC_MSG_ERROR([You must define a correct KERNEL_ROOT_DIR or use the --with-kernel= configure option !])
fi
+dnl Check Salome modules Install
+${modules}
+
AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_CXX
KERNEL_LIBS= -L$(KERNEL_ROOT_DIR)/lib/salome -lSalomeContainer -lOpUtil -lSalomeDSCContainer -lSalomeDSCSuperv -lSalomeDatastream -lSalomeDSCSupervBasic -lCalciumC
KERNEL_INCLUDES= -I$(KERNEL_ROOT_DIR)/include/salome $(OMNIORB_INCLUDES) $(BOOST_CPPFLAGS)
+SALOME_LIBS= ${KERNEL_LIBS}
+SALOME_IDL_LIBS= -L$(KERNEL_ROOT_DIR)/lib/salome -lSalomeIDLKernel
+SALOME_INCLUDES= ${KERNEL_INCLUDES}
+
"""
resMakefile="""
lib_LTLIBRARIES = lib${component}Engine.la
lib${component}Engine_la_SOURCES = ${component}.cxx ${sources}
nodist_lib${component}Engine_la_SOURCES =
-lib${component}Engine_la_CXXFLAGS = -I$$(top_builddir)/idl $$(KERNEL_INCLUDES) $$(PACO_INCLUDES) $$(MPI_INCLUDES) ${includes}
-lib${component}Engine_la_LIBADD = -L$$(top_builddir)/idl -l${module} @KERNEL_ROOT_DIR@/lib/salome/libSalomeParallelDSCContainer.la @PACOPATH@/lib/libPaCO_direct_comScheduling.la $$(FLIBS) ${libs} $$(PACO_LIBS)
+lib${component}Engine_la_CXXFLAGS = -I$$(top_builddir)/idl $$(SALOME_INCLUDES) $$(PACO_INCLUDES) $$(MPI_INCLUDES) ${includes}
+lib${component}Engine_la_LIBADD = -L$$(top_builddir)/idl -l${module} @KERNEL_ROOT_DIR@/lib/salome/libSalomeParallelDSCContainer.la @PACOPATH@/lib/libPaCO_direct_comScheduling.la $$(FLIBS) ${libs} $$(PACO_LIBS) $$(SALOME_LIBS)
lib${component}Engine_la_LDFLAGS = ${rlibs}
salomeinclude_HEADERS = ${component}.hxx
"""
--- /dev/null
+#######################################################################
+# SALOME modules #
+#######################################################################
+salome_modules={}
+
+#module GEOM
+idldefs="""
+#include "GEOM_Gen.idl"
+"""
+makefiledefs="""
+#module GEOM
+GEOM_IDL_INCLUDES = -I$(GEOM_ROOT_DIR)/idl/salome
+GEOM_INCLUDES= -I$(GEOM_ROOT_DIR)/include/salome
+GEOM_IDL_LIBS= -L$(GEOM_ROOT_DIR)/lib/salome -lSalomeIDLGEOM
+GEOM_LIBS= -L$(GEOM_ROOT_DIR)/lib/salome
+SALOME_LIBS += ${GEOM_LIBS}
+SALOME_IDL_LIBS += ${GEOM_IDL_LIBS}
+SALOME_INCLUDES += ${GEOM_INCLUDES}
+IDL_INCLUDES += ${GEOM_IDL_INCLUDES}
+"""
+configdefs="""
+if test "x${GEOM_ROOT_DIR}" != "x" && test -d ${GEOM_ROOT_DIR} ; then
+ AC_MSG_RESULT(Using GEOM installation in ${GEOM_ROOT_DIR})
+else
+ AC_MSG_ERROR([Cannot find module GEOM. Have you set GEOM_ROOT_DIR ?],1)
+fi
+"""
+
+salome_modules["GEOM"]={"idldefs" : idldefs, "makefiledefs" : makefiledefs, "configdefs" : configdefs}
+
+
--- /dev/null
+###########################################################
+# Types definitions #
+###########################################################
+corbaTypes = {"double":"CORBA::Double", "long":"CORBA::Long",
+ "string":"const char*", "dblevec":"const %s::dblevec&",
+ "stringvec":"const %s::stringvec&", "intvec":"const %s::intvec&",
+ "file":None
+ }
+
+corbaOutTypes = {"double":"CORBA::Double&", "long":"CORBA::Long&",
+ "string":"CORBA::String_out", "dblevec":"%s::dblevec_out",
+ "stringvec":"%s::stringvec_out", "intvec":"%s::intvec_out",
+ "file":None
+ }
+moduleTypes = {"double":"", "long":"", "string":"", "dblevec":"", "stringvec":"", "intvec":"", "file":"" }
+
+idlTypes = {"double":"double", "long":"long", "string":"string", "dblevec":"dblevec", "stringvec":"stringvec", "intvec":"intvec", "file":"" }
+
+def corba_in_type(typ, module):
+ if corbaTypes[typ].count("%s")>0:
+ return corbaTypes[typ] % module
+ else:
+ return corbaTypes[typ]
+
+def corba_out_type(typ, module):
+ if corbaOutTypes[typ].count("%s")>0:
+ return corbaOutTypes[typ] % module
+ else:
+ return corbaOutTypes[typ]
+
+ValidTypes = corbaTypes.keys()
+PyValidTypes = ValidTypes+["pyobj"]
+
+def add_type(typename, corbaType, corbaOutType, module, idltype):
+ corbaTypes[typename] = corbaType
+ corbaOutTypes[typename] = corbaOutType
+ moduleTypes[typename] = module
+ idlTypes[typename] = idltype
+ ValidTypes.append(typename)
+ PyValidTypes.append(typename)
+
+calciumTypes = {"CALCIUM_double":"CALCIUM_double",
+ "CALCIUM_integer":"CALCIUM_integer",
+ "CALCIUM_real":"CALCIUM_real",
+ "CALCIUM_string":"CALCIUM_string",
+ "CALCIUM_complex":"CALCIUM_complex",
+ "CALCIUM_logical":"CALCIUM_logical",
+ "CALCIUM_long":"CALCIUM_long",
+ }
+
+DatastreamParallelTypes = {"Param_Double_Port":"Param_Double_Port"}
+
+ValidImpl = ("CPP", "PY", "F77", "ASTER", "PACO")
+ValidImplTypes = ("sequential", "parallel")
+ValidStreamTypes = calciumTypes.keys()
+ValidParallelStreamTypes = DatastreamParallelTypes.keys()
+ValidDependencies = ("I", "T")
+
+add_type("dataref", "const Engines::dataref&", "Engines::dataref_out", "", "dataref")
+add_type("GEOM_Object", "GEOM::GEOM_Object_ptr", "GEOM::GEOM_Object_out", "GEOM", "GEOM::GEOM_Object")