Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a9e00347
Commit
a9e00347
authored
Nov 19, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Use a separate variable for cross-compiled importlib objects.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
470ac022
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
57 deletions
+47
-57
makedep.c
tools/makedep.c
+47
-57
No files found.
tools/makedep.c
View file @
a9e00347
...
...
@@ -217,7 +217,8 @@ struct makefile
struct
strarray
c2man_files
;
struct
strarray
debug_files
;
struct
strarray
dlldata_files
;
struct
strarray
implib_objs
;
struct
strarray
implib_files
;
struct
strarray
crossimplib_files
;
struct
strarray
all_targets
;
struct
strarray
phony_targets
;
struct
strarray
dependencies
;
...
...
@@ -496,22 +497,6 @@ static char *replace_filename( const char *path, const char *name )
/*******************************************************************
* strarray_replace_extension
*/
static
struct
strarray
strarray_replace_extension
(
const
struct
strarray
*
array
,
const
char
*
old_ext
,
const
char
*
new_ext
)
{
unsigned
int
i
;
struct
strarray
ret
;
ret
.
count
=
ret
.
size
=
array
->
count
;
ret
.
str
=
xmalloc
(
sizeof
(
ret
.
str
[
0
])
*
ret
.
size
);
for
(
i
=
0
;
i
<
array
->
count
;
i
++
)
ret
.
str
[
i
]
=
replace_extension
(
array
->
str
[
i
],
old_ext
,
new_ext
);
return
ret
;
}
/*******************************************************************
* replace_substr
*/
static
char
*
replace_substr
(
const
char
*
str
,
const
char
*
start
,
size_t
len
,
const
char
*
replace
)
...
...
@@ -3021,13 +3006,14 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
if
((
source
->
file
->
flags
&
FLAG_GENERATED
)
&&
(
!
make
->
testdll
||
!
strendswith
(
source
->
filename
,
"testlist.c"
)))
strarray_add
(
&
make
->
clean_files
,
source
->
basename
);
if
(
source
->
file
->
flags
&
FLAG_C_IMPLIB
)
strarray_add
(
&
make
->
implib_objs
,
strmake
(
"%s.o"
,
obj
));
if
(
need_obj
)
{
if
((
source
->
file
->
flags
&
FLAG_C_UNIX
)
&&
*
dll_ext
)
strarray_add
(
&
make
->
unixobj_files
,
strmake
(
"%s.o"
,
obj
));
else
if
(
!
is_dll_src
&&
!
(
source
->
file
->
flags
&
FLAG_C_IMPLIB
))
else
if
(
source
->
file
->
flags
&
FLAG_C_IMPLIB
)
strarray_add
(
&
make
->
implib_files
,
strmake
(
"%s.o"
,
obj
));
else
if
(
!
is_dll_src
)
strarray_add
(
&
make
->
object_files
,
strmake
(
"%s.o"
,
obj
));
else
strarray_add
(
&
make
->
clean_files
,
strmake
(
"%s.o"
,
obj
));
...
...
@@ -3052,7 +3038,9 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
}
if
(
need_cross
)
{
if
(
!
is_dll_src
&&
!
(
source
->
file
->
flags
&
FLAG_C_IMPLIB
))
if
(
source
->
file
->
flags
&
FLAG_C_IMPLIB
)
strarray_add
(
&
make
->
crossimplib_files
,
strmake
(
"%s.cross.o"
,
obj
));
else
if
(
!
is_dll_src
)
strarray_add
(
&
make
->
crossobj_files
,
strmake
(
"%s.cross.o"
,
obj
));
else
strarray_add
(
&
make
->
clean_files
,
strmake
(
"%s.cross.o"
,
obj
));
...
...
@@ -3305,54 +3293,54 @@ static void output_import_lib( struct makefile *make )
char
*
spec_file
=
src_dir_path
(
make
,
replace_extension
(
make
->
module
,
".dll"
,
".spec"
));
char
*
importlib_path
=
obj_dir_path
(
make
,
strmake
(
"lib%s"
,
make
->
importlib
));
strarray_add
(
&
make
->
clean_files
,
strmake
(
"lib%s.a"
,
make
->
importlib
));
if
(
!*
dll_ext
&&
needs_delay_lib
(
make
))
strarray_add
(
&
make
->
clean_files
,
strmake
(
"lib%s.a"
,
make
->
importlib
));
if
(
!*
dll_ext
&&
needs_delay_lib
(
make
))
{
strarray_add
(
&
make
->
clean_files
,
strmake
(
"lib%s.delay.a"
,
make
->
importlib
));
output
(
"%s.delay.a "
,
importlib_path
);
}
output
(
"%s.a: %s %s"
,
importlib_path
,
tools_path
(
make
,
"winebuild"
),
spec_file
);
output_filenames_obj_dir
(
make
,
make
->
implib_files
);
output
(
"
\n
"
);
output
(
"
\t
%s%s -w --implib -o $@"
,
cmd_prefix
(
"BUILD"
),
tools_path
(
make
,
"winebuild"
)
);
output_filenames
(
target_flags
);
if
(
make
->
is_win16
)
output_filename
(
"-m16"
);
output_filename
(
"--export"
);
output_filename
(
spec_file
);
output_filenames_obj_dir
(
make
,
make
->
implib_files
);
output
(
"
\n
"
);
add_install_rule
(
make
,
make
->
importlib
,
strmake
(
"lib%s.a"
,
make
->
importlib
),
strmake
(
"d%s/lib%s.a"
,
so_dir
,
make
->
importlib
));
if
(
crosstarget
)
{
strarray_add
(
&
make
->
clean_files
,
strmake
(
"lib%s.cross.a"
,
make
->
importlib
));
output_filename
(
strmake
(
"%s.cross.a"
,
importlib_path
));
if
(
needs_delay_lib
(
make
))
{
strarray_add
(
&
make
->
clean_files
,
strmake
(
"lib%s.delay.a"
,
make
->
importlib
));
output
(
"%s.delay.a "
,
importlib_path
);
output
_filename
(
strmake
(
"%s.delay.a"
,
importlib_path
)
);
}
output
(
"
%s.a: %s %s"
,
importlib_path
,
tools_path
(
make
,
"winebuild"
),
spec_file
);
output_filenames_obj_dir
(
make
,
make
->
implib_obj
s
);
output
(
"
: %s %s"
,
tools_path
(
make
,
"winebuild"
),
spec_file
);
output_filenames_obj_dir
(
make
,
make
->
crossimplib_file
s
);
output
(
"
\n
"
);
output
(
"
\t
%s%s -
w --implib -o $@"
,
cmd_prefix
(
"BUILD"
),
tools_path
(
make
,
"winebuild"
)
);
output_filenames
(
target_flags
);
output
(
"
\t
%s%s -
b %s -w --implib -o $@"
,
cmd_prefix
(
"BUILD"
),
tools_path
(
make
,
"winebuild"
),
crosstarget
);
if
(
make
->
is_win16
)
output_filename
(
"-m16"
);
output_filename
(
"--export"
);
output_filename
(
spec_file
);
output_filenames_obj_dir
(
make
,
make
->
implib_obj
s
);
output_filenames_obj_dir
(
make
,
make
->
crossimplib_file
s
);
output
(
"
\n
"
);
add_install_rule
(
make
,
make
->
importlib
,
strmake
(
"lib%s.a"
,
make
->
importlib
),
strmake
(
"d%s/lib%s.a"
,
so_dir
,
make
->
importlib
));
strmake
(
"lib%s.cross.a"
,
make
->
importlib
),
strmake
(
"d%s/lib%s.a"
,
pe_dir
,
make
->
importlib
));
}
if
(
needs_implib_symlink
(
make
))
strarray_addall
(
&
top_makefile
->
clean_files
,
output_importlib_symlinks
(
make
));
}
if
(
crosstarget
)
{
struct
strarray
cross_files
=
strarray_replace_extension
(
&
make
->
implib_objs
,
".o"
,
".cross.o"
);
strarray_add
(
&
make
->
clean_files
,
strmake
(
"lib%s.cross.a"
,
make
->
importlib
));
output_filename
(
strmake
(
"%s.cross.a"
,
importlib_path
));
if
(
needs_delay_lib
(
make
))
{
strarray_add
(
&
make
->
clean_files
,
strmake
(
"lib%s.delay.a"
,
make
->
importlib
));
output_filename
(
strmake
(
"%s.delay.a"
,
importlib_path
));
}
output
(
": %s %s"
,
tools_path
(
make
,
"winebuild"
),
spec_file
);
output_filenames_obj_dir
(
make
,
cross_files
);
output
(
"
\n
"
);
output
(
"
\t
%s%s -b %s -w --implib -o $@"
,
cmd_prefix
(
"BUILD"
),
tools_path
(
make
,
"winebuild"
),
crosstarget
);
if
(
make
->
is_win16
)
output_filename
(
"-m16"
);
output_filename
(
"--export"
);
output_filename
(
spec_file
);
output_filenames_obj_dir
(
make
,
cross_files
);
output
(
"
\n
"
);
add_install_rule
(
make
,
make
->
importlib
,
strmake
(
"lib%s.cross.a"
,
make
->
importlib
),
strmake
(
"d%s/lib%s.a"
,
pe_dir
,
make
->
importlib
));
}
if
(
needs_implib_symlink
(
make
))
strarray_addall
(
&
top_makefile
->
clean_files
,
output_importlib_symlinks
(
make
));
}
/*******************************************************************
* output_unix_lib
*/
...
...
@@ -3793,6 +3781,8 @@ static void output_sources( struct makefile *make )
strarray_addall
(
&
make
->
clean_files
,
make
->
object_files
);
strarray_addall
(
&
make
->
clean_files
,
make
->
crossobj_files
);
strarray_addall
(
&
make
->
clean_files
,
make
->
implib_files
);
strarray_addall
(
&
make
->
clean_files
,
make
->
crossimplib_files
);
strarray_addall
(
&
make
->
clean_files
,
make
->
unixobj_files
);
strarray_addall
(
&
make
->
clean_files
,
make
->
res_files
);
strarray_addall
(
&
make
->
clean_files
,
make
->
pot_files
);
...
...
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