Commit a40c6486 authored by claes's avatar claes

Merge of xtt methods

parent 198ac40c
/*
* Proview $Id: co_merge.c,v 1.5 2006-03-31 14:44:11 claes Exp $
* Proview $Id: co_merge.c,v 1.6 2006-04-05 08:40:56 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -25,7 +25,8 @@
typedef enum {
merge_eMtype_IoBase,
merge_eMtype_WbBase
merge_eMtype_WbBase,
merge_eMtype_XttBase
} merge_eMtype;
void usage()
......@@ -33,7 +34,7 @@ void usage()
printf("\
co_merge_methods\n\
Arguments : \n\
1. Method utilit (io_base, wb_base) \n\
1. Method utility (io_base, wb_base, xtt_base) \n\
2. Methods files, e.g. $pwr_inc/io_base_*.meth\n\
3. output file\n\
");
......@@ -66,6 +67,8 @@ int main( int argc, char *argv[])
mtype = merge_eMtype_IoBase;
else if ( strcmp( argv[1], "wb_base") == 0)
mtype = merge_eMtype_WbBase;
else if ( strcmp( argv[1], "xtt_base") == 0)
mtype = merge_eMtype_XttBase;
else {
usage();
exit(1);
......@@ -142,6 +145,29 @@ int main( int argc, char *argv[])
fclose( outfp);
break;
}
case merge_eMtype_XttBase: {
strcpy( cfile, "/tmp/xtt_i_methods.c");
strcpy( ofile, "/tmp/xtt_i_methods.o");
outfp = fopen( cfile, "w");
if ( !outfp) {
printf( "Unable to open file %s\n", outfile);
exit(1);
}
fprintf( outfp, "#include \"xtt_menu.h\"\n");
for ( i = 0; i < mtabcnt; i++) {
fprintf( outfp, "pwr_dImport pwr_BindXttMethods(%s);\n", mtab[i]);
}
fprintf( outfp, "pwr_BindXttClasses(Base) = {\n");
for ( i = 0; i < mtabcnt; i++) {
fprintf( outfp, " pwr_BindXttClass(%s),\n", mtab[i]);
}
fprintf( outfp, " pwr_NullClass};\n");
fclose( outfp);
break;
}
}
dcli_translate_filename( incdir, "$pwr_einc");
......
......@@ -9,6 +9,7 @@
"build_all", "build_all:usage_build_all",
"build_kernel", "build_kernel:usage_build_kernel",
"build_all_modules", "build_all_modules:usage_build_all_modules",
"build_all_wbl", "build_all_wbl:usage_build_all_wbl",
"clean_exe_all", "clean_exe_all:usage_clean_exe_all",
"method_build", "method_build:usage_method_build",
"copy", "copy:usage_copy",
......@@ -276,6 +277,82 @@ sub clean_exe_all ()
}
#
# build_all_wbl()
#
sub build_all_wbl ()
{
_module("rt");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "pwrs", "lib");
_build("wbl", "pwrb", "lib");
_build("wbl", "wb", "lib");
_build("wbl", "rt", "lib");
merge();
_module("nmps");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "nmps", "lib");
merge();
_module("tlog");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "tlog", "lib");
merge();
_module("profibus");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "mcomp", "lib");
merge();
_module("remote");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "remote", "lib");
merge();
_module("bcomp");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "bcomp", "lib");
merge();
_module("ssabox");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "mcomp", "lib");
merge();
_module("abb");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "mcomp", "lib");
merge();
_module("siemens");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "mcomp", "lib");
merge();
_module("telemecanique");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "mcomp", "lib");
merge();
_module("inor");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "mcomp", "lib");
merge();
_module("klocknermoeller");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "mcomp", "lib");
merge();
_module("othermanu");
my($load_dir) = $ENV{"pwr_load"};
system( "rm $load_dir/*.dbs");
_build("wbl", "mcomp", "lib");
merge();
_module("rt");
}
sub method_build ()
{
printf("-- Relink method dependent programs");
......@@ -294,6 +371,12 @@ sub method_build ()
_build("exe", "wb", "all");
merge();
_module("xtt");
my($exe_dir) = $ENV{"pwr_exe"};
system("rm $exe_dir/rt_xtt");
_build("exe", "rt_xtt", "all");
merge();
}
sub create_all_modules ()
......@@ -957,7 +1040,7 @@ sub usage_build_all ()
sub usage_build_kernel ()
{
printf("++\n");
printf("++ build_kernel : Builds all in kernel modules (kernel, xtt, wb)\n");
printf("++ build_kernel : Builds all in kernel modules (kernel, xtt, wb)\n");
}
sub usage_build_all_modules ()
......@@ -966,6 +1049,12 @@ sub usage_build_all_modules ()
printf("++ build_all_modules : Builds all in all modules\n");
}
sub usage_build_all_wbl ()
{
printf("++\n");
printf("++ build_all_wbl : Builds wbl in all modules\n");
}
sub usage_clean_exe_all ()
{
printf("++\n");
......
......@@ -62,7 +62,7 @@ else
for lib in $libraries; do
arname=${lib##/*/}
if [ $arname = "libpwr_rt.a" ] || [ $arname = "libpwr_wb.a" ]; then
if [ $arname = "libpwr_rt.a" ] || [ $arname = "libpwr_wb.a" ]|| [ $arname = "libpwr_xtt.a" ]; then
echo "Merge $lib"
modules=`eval ar -tf $lib`
ar -xf $lib
......@@ -74,17 +74,24 @@ else
fi
done
#Merge io methods
# Merge io methods
methodfile=$pwr_inc/rt_io_$pwre_module.meth
if [ -e $methodfile ]; then
echo "-- Merge io methods"
co_merge io_base $pwr_einc/rt_io_\*.meth $pwr_elib/libpwr_rt.a
fi
# Merge wb methods
methodfile=$pwr_inc/wb_$pwre_module.meth
if [ -e $methodfile ]; then
echo "-- Merge wb methods"
co_merge wb_base $pwr_einc/wb_\*.meth $pwr_elib/libpwr_wb.a
fi
# Merge xtt methods
methodfile=$pwr_inc/xtt_$pwre_module.meth
if [ -e $methodfile ]; then
echo "-- Merge xtt methods"
co_merge xtt_base $pwr_einc/xtt_\*.meth $pwr_elib/libpwr_xtt.a
fi
fi
......
ifndef link_rule_mk
link_rule_mk := 1
link = $(ldxx) $(elinkflags) $(domap) -o $(export_exe) \
ifeq ($(export_type),exp)
link = $(ldxx) $(explinkflags) $(domap) -o $(export_exe) \
$(export_obj) $(objects) $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o -L/usr/X11R6/lib\
-L/opt/gnome/lib \
......@@ -9,5 +10,14 @@ link = $(ldxx) $(elinkflags) $(domap) -o $(export_exe) \
-lpwr_msg_dummy -lImlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
-lSM -lICE\
-ldb -lrpcsvc -lpthread -lm -lrt -lasound
else
link = $(ldxx) $(elinkflags) $(domap) -o $(export_exe) \
$(export_obj) $(objects) $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o -L/usr/X11R6/lib\
-L/opt/gnome/lib \
-lpwr_xtt -lpwr_ge -lpwr_rt -lpwr_co -lpwr_flow -lpwr_glow \
-lpwr_msg_dummy -lImlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
-lSM -lICE\
-ldb -lrpcsvc -lpthread -lm -lrt -lasound
endif
endif
/*
* Proview $Id: xtt_i_methods.c,v 1.1 2006-04-05 08:38:37 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "xtt_menu.h"
pwr_dImport pwr_BindXttMethods($Object);
pwr_dImport pwr_BindXttMethods(PlcPgm);
pwr_dImport pwr_BindXttMethods(Sound);
pwr_dExport pwr_BindXttClasses(Base) = {
pwr_BindXttClass($Object),
pwr_BindXttClass(PlcPgm),
pwr_BindXttClass(Sound),
pwr_NullClass
};
/*
* Proview $Id: xtt_menu.cpp,v 1.10 2005-11-14 16:17:13 claes Exp $
* Proview $Id: xtt_menu.cpp,v 1.11 2006-04-05 08:38:37 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -64,22 +64,13 @@ extern "C" {
#include "xtt_menu.h"
#include "co_api.h"
pwr_dImport pwr_BindXttMethods($Object);
pwr_dImport pwr_BindXttMethods(PlcPgm);
pwr_dImport pwr_BindXttMethods(Sound);
pwr_BindXttClasses(Base) = {
pwr_BindXttClass($Object),
pwr_BindXttClass(PlcPgm),
pwr_BindXttClass(Sound),
pwr_NullClass
};
#define MENU_BAR 1
#define MENU_PULLDOWN 2
#define MENU_POPUP 3
#define MENU_OPTION 4
pwr_dImport pwr_BindXttClasses(Base);
typedef struct MENU_ITEM {
char *Label;
WidgetClass *Class;
......
$Object
PlcPgm
Sound
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