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
b816cb8c
Commit
b816cb8c
authored
Jan 05, 2003
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Jan 05, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass -l's that are not .dll's or .a's to the linker.
parent
d7b8882a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
winewrap.c
tools/winewrap.c
+18
-10
No files found.
tools/winewrap.c
View file @
b816cb8c
...
...
@@ -235,8 +235,8 @@ static const char *wrapper_code =
;
static
char
*
output_name
;
static
char
**
lib_files
,
**
dll_files
,
**
lib_paths
,
**
obj_files
;
static
int
nb_
lib_files
,
nb_dll
_files
,
nb_lib_paths
,
nb_obj_files
;
static
char
**
arh_files
,
**
dll_files
,
**
lib_files
,
**
lib_paths
,
**
obj_files
;
static
int
nb_
arh_files
,
nb_dll_files
,
nb_lib
_files
,
nb_lib_paths
,
nb_obj_files
;
static
int
verbose
=
0
;
static
int
keep_generated
=
0
;
...
...
@@ -401,6 +401,8 @@ void add_lib_path(const char* path)
lib_paths
[
nb_lib_paths
++
]
=
strdup
(
path
);
dll_files
=
realloc
(
dll_files
,
(
nb_dll_files
+
1
)
*
sizeof
(
*
dll_files
)
);
dll_files
[
nb_dll_files
++
]
=
strmake
(
"-L%s"
,
path
);
lib_files
=
realloc
(
lib_files
,
(
nb_lib_files
+
1
)
*
sizeof
(
*
lib_files
)
);
lib_files
[
nb_lib_files
++
]
=
strmake
(
"-L%s"
,
path
);
}
void
add_lib_file
(
const
char
*
library
)
...
...
@@ -414,10 +416,14 @@ void add_lib_file(const char* library)
}
else
if
((
lib
=
find_lib
(
library
)))
{
arh_files
=
realloc
(
arh_files
,
(
nb_arh_files
+
1
)
*
sizeof
(
*
arh_files
)
);
arh_files
[
nb_arh_files
++
]
=
lib
;
}
else
{
lib_files
=
realloc
(
lib_files
,
(
nb_lib_files
+
1
)
*
sizeof
(
*
lib_files
)
);
lib_files
[
nb_lib_files
++
]
=
lib
;
lib_files
[
nb_lib_files
++
]
=
strmake
(
"-l%s"
,
library
)
;
}
else
error
(
"Can not find library %s"
,
library
);
}
int
main
(
int
argc
,
char
**
argv
)
...
...
@@ -529,7 +535,7 @@ int main(int argc, char **argv)
wrap_o_name
=
strmake
(
"%s.o"
,
wrp_temp_name
);
/* build winebuild's argument list */
spec_args
=
malloc
(
(
nb_
lib
_files
+
nb_dll_files
+
nb_obj_files
+
20
)
*
sizeof
(
char
*
)
);
spec_args
=
malloc
(
(
nb_
arh
_files
+
nb_dll_files
+
nb_obj_files
+
20
)
*
sizeof
(
char
*
)
);
j
=
0
;
spec_args
[
j
++
]
=
BINDIR
"/winebuild"
;
spec_args
[
j
++
]
=
"-o"
;
...
...
@@ -551,8 +557,8 @@ int main(int argc, char **argv)
spec_args
[
j
++
]
=
dll_files
[
i
];
for
(
i
=
0
;
i
<
nb_obj_files
;
i
++
)
spec_args
[
j
++
]
=
obj_files
[
i
];
for
(
i
=
0
;
i
<
nb_
lib
_files
;
i
++
)
spec_args
[
j
++
]
=
lib
_files
[
i
];
for
(
i
=
0
;
i
<
nb_
arh
_files
;
i
++
)
spec_args
[
j
++
]
=
arh
_files
[
i
];
spec_args
[
j
]
=
0
;
/* build gcc's argument list */
...
...
@@ -567,20 +573,22 @@ int main(int argc, char **argv)
comp_args
[
j
]
=
0
;
/* build ld's argument list */
link_args
=
malloc
(
(
nb_
lib_files
+
nb_obj
_files
+
20
)
*
sizeof
(
char
*
)
);
link_args
=
malloc
(
(
nb_
arh_files
+
nb_obj_files
+
nb_lib
_files
+
20
)
*
sizeof
(
char
*
)
);
j
=
0
;
link_args
[
j
++
]
=
cpp
?
"g++"
:
"gcc"
;
link_args
[
j
++
]
=
"-shared"
;
link_args
[
j
++
]
=
"-Wl,-Bsymbolic,-z,defs"
;
link_args
[
j
++
]
=
"-lwine"
;
link_args
[
j
++
]
=
"-lm"
;
for
(
i
=
0
;
i
<
nb_lib_files
;
i
++
)
link_args
[
j
++
]
=
lib_files
[
i
];
link_args
[
j
++
]
=
"-o"
;
link_args
[
j
++
]
=
strmake
(
"%s.%s.so"
,
base_file
,
create_wrapper
?
"dll"
:
"exe"
);
link_args
[
j
++
]
=
spec_o_name
;
for
(
i
=
0
;
i
<
nb_obj_files
;
i
++
)
if
(
!
is_resource
(
obj_files
[
i
]))
link_args
[
j
++
]
=
obj_files
[
i
];
for
(
i
=
0
;
i
<
nb_
lib
_files
;
i
++
)
link_args
[
j
++
]
=
lib
_files
[
i
];
for
(
i
=
0
;
i
<
nb_
arh
_files
;
i
++
)
link_args
[
j
++
]
=
arh
_files
[
i
];
link_args
[
j
]
=
0
;
/* build wrapper compile argument list */
...
...
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