Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
3e67ab9c
Commit
3e67ab9c
authored
Dec 30, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Division in modules
parent
da4cb706
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
181 additions
and
2 deletions
+181
-2
src/exe/co_merge/src/co_merge.c
src/exe/co_merge/src/co_merge.c
+157
-0
src/exe/co_merge/src/os_linux/hw_x86/makefile
src/exe/co_merge/src/os_linux/hw_x86/makefile
+15
-0
src/exe/co_merge/src/os_linux/link_rule.mk
src/exe/co_merge/src/os_linux/link_rule.mk
+7
-0
src/exe/rt_ini/src/os_linux/link_rule.mk
src/exe/rt_ini/src/os_linux/link_rule.mk
+1
-1
src/exe/rt_io_comm/src/os_linux/link_rule.mk
src/exe/rt_io_comm/src/os_linux/link_rule.mk
+1
-1
No files found.
src/exe/co_merge/src/co_merge.c
0 → 100644
View file @
3e67ab9c
/*
* Proview $Id: co_merge.c,v 1.1 2005-12-30 15:46:25 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 <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pwr.h"
#include "co_dcli.h"
typedef
enum
{
merge_eMtype_IoBase
,
merge_eMtype_WbBase
}
merge_eMtype
;
void
usage
()
{
printf
(
"\
co_merge_methods
\n
\
Arguments :
\n
\
1. Method utilit (io_base, wb_base)
\n
\
2. Methods files, e.g. $pwr_inc/io_base_*.meth
\n
\
3. output file
\n
\
"
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
pwr_tFileName
filespec
;
pwr_tFileName
outfile
;
pwr_tFileName
found_file
;
merge_eMtype
mtype
;
FILE
*
fp
;
FILE
*
outfp
;
char
line
[
200
];
int
sts
;
char
mtab
[
1000
][
32
];
int
mtabcnt
;
int
i
;
pwr_tCmd
cmd
;
pwr_tFileName
incdir
;
pwr_tFileName
cfile
;
pwr_tFileName
ofile
;
if
(
argc
!=
4
)
{
usage
();
exit
(
1
);
}
if
(
strcmp
(
argv
[
1
],
"io_base"
)
==
0
)
mtype
=
merge_eMtype_IoBase
;
else
if
(
strcmp
(
argv
[
1
],
"wb_base"
)
==
0
)
mtype
=
merge_eMtype_WbBase
;
else
{
usage
();
exit
(
1
);
}
strcpy
(
filespec
,
argv
[
2
]);
strcpy
(
outfile
,
argv
[
3
]);
sts
=
dcli_search_file
(
filespec
,
found_file
,
DCLI_DIR_SEARCH_INIT
);
while
(
ODD
(
sts
))
{
fp
=
fopen
(
found_file
,
"r"
);
if
(
!
fp
)
{
printf
(
"Unable to open file %s
\n
"
,
found_file
);
exit
(
1
);
}
while
(
dcli_read_line
(
line
,
sizeof
(
line
),
fp
))
{
dcli_trim
(
line
,
line
);
if
(
line
[
0
]
==
0
||
line
[
0
]
==
'#'
)
continue
;
strncpy
(
mtab
[
mtabcnt
++
],
line
,
sizeof
(
mtab
[
0
]));
if
(
mtabcnt
>
(
int
)
sizeof
(
mtab
)
/
sizeof
(
mtab
[
0
])
-
1
)
break
;
}
fclose
(
fp
);
sts
=
dcli_search_file
(
filespec
,
found_file
,
DCLI_DIR_SEARCH_NEXT
);
}
dcli_search_file
(
filespec
,
found_file
,
DCLI_DIR_SEARCH_END
);
switch
(
mtype
)
{
case
merge_eMtype_IoBase
:
{
strcpy
(
cfile
,
"/tmp/rt_io_base_methods.c"
);
strcpy
(
ofile
,
"/tmp/rt_io_base_methods.o"
);
outfp
=
fopen
(
cfile
,
"w"
);
if
(
!
outfp
)
{
printf
(
"Unable to open file %s
\n
"
,
outfile
);
exit
(
1
);
}
fprintf
(
outfp
,
"#include
\"
rt_io_base.h
\"\n
"
);
for
(
i
=
0
;
i
<
mtabcnt
;
i
++
)
{
fprintf
(
outfp
,
"pwr_dImport pwr_BindIoMethods(%s);
\n
"
,
mtab
[
i
]);
}
fprintf
(
outfp
,
"pwr_BindIoClasses(Base) = {
\n
"
);
for
(
i
=
0
;
i
<
mtabcnt
;
i
++
)
{
fprintf
(
outfp
,
" pwr_BindIoClass(%s),
\n
"
,
mtab
[
i
]);
}
fprintf
(
outfp
,
" pwr_NullClass};
\n
"
);
fclose
(
outfp
);
break
;
}
case
merge_eMtype_WbBase
:
{
strcpy
(
cfile
,
"/tmp/wb_i_base_methods.c"
);
strcpy
(
ofile
,
"/tmp/wb_i_base_methods.o"
);
outfp
=
fopen
(
cfile
,
"w"
);
if
(
!
outfp
)
{
printf
(
"Unable to open file %s
\n
"
,
outfile
);
exit
(
1
);
}
fprintf
(
outfp
,
"#include
\"
wb_pwrs.h
\"\n
"
);
for
(
i
=
0
;
i
<
mtabcnt
;
i
++
)
{
fprintf
(
outfp
,
"pwr_dImport pwr_BindMethods(%s);
\n
"
,
mtab
[
i
]);
}
fprintf
(
outfp
,
"pwr_BindClasses(Base) = {
\n
"
);
for
(
i
=
0
;
i
<
mtabcnt
;
i
++
)
{
fprintf
(
outfp
,
" pwr_BindClass(%s),
\n
"
,
mtab
[
i
]);
}
fprintf
(
outfp
,
" pwr_NullClass};
\n
"
);
fclose
(
outfp
);
break
;
}
}
dcli_translate_filename
(
incdir
,
"$pwr_einc"
);
sprintf
(
cmd
,
"gcc -c -I%s -DOS_LINUX -o %s %s"
,
incdir
,
ofile
,
cfile
);
system
(
cmd
);
sprintf
(
cmd
,
"ar r %s %s"
,
outfile
,
cfile
);
system
(
cmd
);
sprintf
(
cmd
,
"rm %s"
,
ofile
);
system
(
cmd
);
sprintf
(
cmd
,
"rm %s"
,
cfile
);
system
(
cmd
);
return
1
;
}
src/exe/co_merge/src/os_linux/hw_x86/makefile
0 → 100644
View file @
3e67ab9c
include
$(pwre_dir_symbols)
-include
$(pwre_sroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq
($($(type_name)_generic_mk),)
-include
$(pwre_sroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq
($($(type_name)_generic_mk),)
include
$(pwre_sroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include
../../special.mk
-include
../special.mk
-include
special.mk
src/exe/co_merge/src/os_linux/link_rule.mk
0 → 100644
View file @
3e67ab9c
ifndef
link_rule_mk
link_rule_mk
:=
1
link
=
$(ldxx)
$(linkflags)
$(domap)
-o
$(export_exe)
$(export_obj)
\
$(objects)
-lpwr_co
-lrt
-lm
endif
src/exe/rt_ini/src/os_linux/link_rule.mk
View file @
3e67ab9c
ifndef
link_rule_mk
link_rule_mk
:=
1
link
=
$(ld)
$(linkflags)
$(domap)
-o
$(export_exe)
\
link
=
$(ld)
$(
e
linkflags)
$(domap)
-o
$(export_exe)
\
$(export_obj)
$(objects)
$(rt_msg_objs)
$(rs_msg_objs)
\
$(pwr_obj)
/rt_io_user.o
\
-lpwr_rt
-lpwr_co
-lpwr_msg_dummy
-lpthread
-lm
...
...
src/exe/rt_io_comm/src/os_linux/link_rule.mk
View file @
3e67ab9c
ifndef
link_rule_mk
link_rule_mk
:=
1
link
=
$(ld)
$(linkflags)
$(domap)
-o
$(export_exe)
\
link
=
$(ld)
$(
e
linkflags)
$(domap)
-o
$(export_exe)
\
$(export_obj)
$(objects)
$(rt_msg_objs)
\
$(pwr_obj)
/rt_io_user.o
\
-lpwr_rt
-lpwr_co
-lpwr_msg_dummy
-lpthread
-lm
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment