Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
51087b9b
Commit
51087b9b
authored
Nov 23, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Unify the search for static and import libs.
parent
5084f4da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
24 deletions
+20
-24
makedep.c
tools/makedep.c
+20
-24
No files found.
tools/makedep.c
View file @
51087b9b
...
...
@@ -2065,16 +2065,23 @@ static struct strarray get_local_dependencies( const struct makefile *make, cons
/*******************************************************************
* get_static_lib
*
*
Check if makefile builds the named static library and return the full lib path
.
*
Find the makefile that builds the named static library (which may be an import lib)
.
*/
static
const
char
*
get_static_lib
(
const
struct
makefile
*
make
,
const
char
*
name
,
unsigned
int
arch
)
static
struct
makefile
*
get_static_lib
(
const
char
*
name
,
unsigned
int
arch
)
{
if
(
!
make
->
staticlib
)
return
NULL
;
if
(
make
->
disabled
[
arch
])
return
NULL
;
if
(
strncmp
(
make
->
staticlib
,
"lib"
,
3
))
return
NULL
;
if
(
strncmp
(
make
->
staticlib
+
3
,
name
,
strlen
(
name
)
))
return
NULL
;
if
(
strcmp
(
make
->
staticlib
+
3
+
strlen
(
name
),
".a"
))
return
NULL
;
return
obj_dir_path
(
make
,
strmake
(
"%s%s"
,
arch_dirs
[
arch
],
make
->
staticlib
));
unsigned
int
i
;
for
(
i
=
0
;
i
<
subdirs
.
count
;
i
++
)
{
if
(
submakes
[
i
]
->
importlib
&&
!
strcmp
(
submakes
[
i
]
->
importlib
,
name
))
return
submakes
[
i
];
if
(
!
submakes
[
i
]
->
staticlib
)
continue
;
if
(
submakes
[
i
]
->
disabled
[
arch
])
continue
;
if
(
strncmp
(
submakes
[
i
]
->
staticlib
,
"lib"
,
3
))
continue
;
if
(
strncmp
(
submakes
[
i
]
->
staticlib
+
3
,
name
,
strlen
(
name
)
))
continue
;
if
(
strcmp
(
submakes
[
i
]
->
staticlib
+
3
+
strlen
(
name
),
".a"
))
continue
;
return
submakes
[
i
];
}
return
NULL
;
}
...
...
@@ -2240,12 +2247,12 @@ static struct strarray add_import_libs( const struct makefile *make, struct stra
struct
strarray
imports
,
enum
import_type
type
,
unsigned
int
arch
)
{
struct
strarray
ret
=
empty_strarray
;
unsigned
int
i
,
j
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
imports
.
count
;
i
++
)
{
const
char
*
name
=
imports
.
str
[
i
];
const
char
*
lib
=
NULL
;
struct
makefile
*
submake
;
/* add crt import lib only when adding the default imports libs */
if
(
is_crt_module
(
imports
.
str
[
i
]
)
&&
type
!=
IMPORT_TYPE_DEFAULT
)
continue
;
...
...
@@ -2261,21 +2268,10 @@ static struct strarray add_import_libs( const struct makefile *make, struct stra
}
else
name
=
get_base_name
(
name
);
for
(
j
=
0
;
j
<
subdirs
.
count
;
j
++
)
if
((
submake
=
get_static_lib
(
name
,
arch
))
)
{
if
(
submakes
[
j
]
->
importlib
&&
!
strcmp
(
submakes
[
j
]
->
importlib
,
name
))
lib
=
obj_dir_path
(
submakes
[
j
],
strmake
(
"%slib%s.a"
,
arch_dirs
[
arch
],
name
));
else
lib
=
get_static_lib
(
submakes
[
j
],
name
,
arch
);
if
(
lib
)
break
;
}
if
(
lib
)
{
const
char
*
ext
=
NULL
;
if
(
type
==
IMPORT_TYPE_DELAYED
&&
!
delay_load_flags
[
arch
])
ext
=
".delay.a"
;
if
(
ext
)
lib
=
replace_extension
(
lib
,
".a"
,
ext
);
const
char
*
ext
=
(
type
==
IMPORT_TYPE_DELAYED
&&
!
delay_load_flags
[
arch
])
?
".delay.a"
:
".a"
;
const
char
*
lib
=
obj_dir_path
(
submake
,
strmake
(
"%slib%s%s"
,
arch_dirs
[
arch
],
name
,
ext
));
strarray_add_uniq
(
deps
,
lib
);
strarray_add
(
&
ret
,
lib
);
}
...
...
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