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
0f62381f
Commit
0f62381f
authored
Sep 20, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makefiles: Build the unix library name when parsing the sources.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b2155368
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
16 deletions
+25
-16
makedep.c
tools/makedep.c
+25
-16
No files found.
tools/makedep.c
View file @
0f62381f
...
...
@@ -203,6 +203,7 @@ struct makefile
const
char
*
staticlib
;
const
char
*
staticimplib
;
const
char
*
importlib
;
const
char
*
unixlib
;
int
disabled
;
int
use_msvcrt
;
int
is_cross
;
...
...
@@ -594,7 +595,7 @@ static const char *get_base_name( const char *name )
{
char
*
base
;
if
(
!
strchr
(
name
,
'.'
))
return
name
;
base
=
strdup
(
name
);
base
=
x
strdup
(
name
);
*
strrchr
(
base
,
'.'
)
=
0
;
return
base
;
}
...
...
@@ -3230,6 +3231,23 @@ static int has_object_file( struct makefile *make )
/*******************************************************************
* get_unix_lib_name
*/
static
char
*
get_unix_lib_name
(
struct
makefile
*
make
)
{
struct
incl_file
*
source
;
if
(
!*
dll_ext
)
return
NULL
;
LIST_FOR_EACH_ENTRY
(
source
,
&
make
->
sources
,
struct
incl_file
,
entry
)
{
if
(
!
(
source
->
file
->
flags
&
FLAG_C_UNIX
))
continue
;
return
strmake
(
"%s%s"
,
get_base_name
(
make
->
module
),
dll_ext
);
}
return
NULL
;
}
/*******************************************************************
* output_man_pages
*/
static
void
output_man_pages
(
struct
makefile
*
make
)
...
...
@@ -3351,17 +3369,12 @@ static void output_module( struct makefile *make )
output_filename
(
make
->
is_cross
?
"$(CROSSLDFLAGS)"
:
"$(LDFLAGS)"
);
output
(
"
\n
"
);
if
(
make
->
unix
obj_files
.
count
)
if
(
make
->
unix
lib
)
{
struct
strarray
unix_libs
=
empty_strarray
;
struct
strarray
unix_deps
=
empty_strarray
;
struct
strarray
extra_libs
=
get_expanded_make_var_array
(
make
,
"EXTRALIBS"
);
int
native_unix_lib
=
strarray_exists
(
&
extra_libs
,
"-Wl,--subsystem,unixlib"
);
char
*
ext
,
*
unix_lib
=
xmalloc
(
strlen
(
make
->
module
)
+
strlen
(
dll_ext
)
+
1
);
strcpy
(
unix_lib
,
make
->
module
);
if
((
ext
=
get_extension
(
unix_lib
)))
*
ext
=
0
;
strcat
(
unix_lib
,
dll_ext
);
if
(
native_unix_lib
)
{
...
...
@@ -3388,9 +3401,9 @@ static void output_module( struct makefile *make )
strarray_addall
(
&
unix_libs
,
add_unix_libraries
(
make
,
&
unix_deps
));
strarray_add
(
&
make
->
all_targets
,
unix_
lib
);
add_install_rule
(
make
,
make
->
module
,
unix_lib
,
strmake
(
"p%s/%s"
,
so_dir
,
unix_
lib
));
output
(
"%s:"
,
obj_dir_path
(
make
,
unix_
lib
));
strarray_add
(
&
make
->
all_targets
,
make
->
unix
lib
);
add_install_rule
(
make
,
make
->
module
,
make
->
unixlib
,
strmake
(
"p%s/%s"
,
so_dir
,
make
->
unix
lib
));
output
(
"%s:"
,
obj_dir_path
(
make
,
make
->
unix
lib
));
output_filenames_obj_dir
(
make
,
make
->
unixobj_files
);
output_filenames
(
unix_deps
);
if
(
!
native_unix_lib
)
output_filename
(
tools_path
(
make
,
"winebuild"
));
...
...
@@ -3612,12 +3625,7 @@ static void output_test_module( struct makefile *make )
{
output_filename
(
parent
->
is_cross
?
obj_dir_path
(
parent
,
make
->
testdll
)
:
strmake
(
"%s%s"
,
obj_dir_path
(
parent
,
make
->
testdll
),
dll_ext
));
if
(
parent
->
unixobj_files
.
count
)
{
char
*
ext
,
*
unix_lib
=
xstrdup
(
parent
->
module
);
if
((
ext
=
get_extension
(
unix_lib
)))
*
ext
=
0
;
output_filename
(
strmake
(
"%s%s"
,
obj_dir_path
(
parent
,
unix_lib
),
dll_ext
));
}
if
(
parent
->
unixlib
)
output_filename
(
obj_dir_path
(
parent
,
parent
->
unixlib
));
}
output
(
"
\n
"
);
output
(
"%s %s:"
,
obj_dir_path
(
make
,
"check"
),
obj_dir_path
(
make
,
"test"
));
...
...
@@ -4284,6 +4292,7 @@ static void load_sources( struct makefile *make )
}
add_generated_sources
(
make
);
make
->
unixlib
=
get_unix_lib_name
(
make
);
if
(
!
make
->
use_msvcrt
&&
!
has_object_file
(
make
))
{
...
...
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