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
c0467a14
Commit
c0467a14
authored
Mar 04, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add an option to build a static library.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d4736114
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
6 deletions
+19
-6
build.h
tools/winebuild/build.h
+1
-1
import.c
tools/winebuild/import.c
+4
-4
main.c
tools/winebuild/main.c
+11
-1
winebuild.man.in
tools/winebuild/winebuild.man.in
+3
-0
No files found.
tools/winebuild/build.h
View file @
c0467a14
...
...
@@ -303,7 +303,7 @@ extern void output_get_pc_thunk(void);
extern
void
output_module
(
DLLSPEC
*
spec
);
extern
void
output_stubs
(
DLLSPEC
*
spec
);
extern
void
output_imports
(
DLLSPEC
*
spec
);
extern
void
output_
import
_lib
(
DLLSPEC
*
spec
,
char
**
argv
);
extern
void
output_
static
_lib
(
DLLSPEC
*
spec
,
char
**
argv
);
extern
void
output_exports
(
DLLSPEC
*
spec
);
extern
int
load_res32_file
(
const
char
*
name
,
DLLSPEC
*
spec
);
extern
void
output_resources
(
DLLSPEC
*
spec
);
...
...
tools/winebuild/import.c
View file @
c0467a14
...
...
@@ -1539,16 +1539,16 @@ static void build_unix_import_lib( DLLSPEC *spec )
}
/* output an import library for a Win32 module and additional object files */
void
output_
import
_lib
(
DLLSPEC
*
spec
,
char
**
argv
)
void
output_
static
_lib
(
DLLSPEC
*
spec
,
char
**
argv
)
{
if
(
target_platform
==
PLATFORM_WINDOWS
)
{
build_windows_import_lib
(
spec
);
if
(
argv
[
0
]
)
build_library
(
output_file_name
,
argv
,
0
);
if
(
spec
)
build_windows_import_lib
(
spec
);
if
(
argv
[
0
]
||
!
spec
)
build_library
(
output_file_name
,
argv
,
!
spec
);
}
else
{
build_unix_import_lib
(
spec
);
if
(
spec
)
build_unix_import_lib
(
spec
);
build_library
(
output_file_name
,
argv
,
1
);
}
}
tools/winebuild/main.c
View file @
c0467a14
...
...
@@ -113,6 +113,7 @@ enum exec_mode_values
MODE_EXE
,
MODE_DEF
,
MODE_IMPLIB
,
MODE_STATICLIB
,
MODE_BUILTIN
,
MODE_RESOURCES
};
...
...
@@ -299,6 +300,7 @@ static const char usage_str[] =
" --def Build a .def file from a .spec file
\n
"
" --exe Build an executable from object files
\n
"
" --implib Build an import library
\n
"
" --staticlib Build a static library
\n
"
" --builtin Mark a library as a Wine builtin
\n
"
" --resources Build a .o or .res file for the resource files
\n\n
"
"The mode options are mutually exclusive; you must specify one and only one.
\n\n
"
;
...
...
@@ -320,6 +322,7 @@ enum long_options_values
LONG_OPT_NXCOMPAT
,
LONG_OPT_RESOURCES
,
LONG_OPT_SAVE_TEMPS
,
LONG_OPT_STATICLIB
,
LONG_OPT_SUBSYSTEM
,
LONG_OPT_VERSION
};
...
...
@@ -332,6 +335,7 @@ static const struct option long_options[] =
{
"def"
,
0
,
0
,
LONG_OPT_DEF
},
{
"exe"
,
0
,
0
,
LONG_OPT_EXE
},
{
"implib"
,
0
,
0
,
LONG_OPT_IMPLIB
},
{
"staticlib"
,
0
,
0
,
LONG_OPT_STATICLIB
},
{
"builtin"
,
0
,
0
,
LONG_OPT_BUILTIN
},
{
"as-cmd"
,
1
,
0
,
LONG_OPT_ASCMD
},
{
"cc-cmd"
,
1
,
0
,
LONG_OPT_CCCMD
},
...
...
@@ -501,6 +505,9 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
case
LONG_OPT_IMPLIB
:
set_exec_mode
(
MODE_IMPLIB
);
break
;
case
LONG_OPT_STATICLIB
:
set_exec_mode
(
MODE_STATICLIB
);
break
;
case
LONG_OPT_BUILTIN
:
set_exec_mode
(
MODE_BUILTIN
);
break
;
...
...
@@ -685,7 +692,10 @@ int main(int argc, char **argv)
case
MODE_IMPLIB
:
if
(
!
spec_file_name
)
fatal_error
(
"missing .spec file
\n
"
);
if
(
!
parse_input_file
(
spec
))
break
;
output_import_lib
(
spec
,
argv
);
output_static_lib
(
spec
,
argv
);
break
;
case
MODE_STATICLIB
:
output_static_lib
(
NULL
,
argv
);
break
;
case
MODE_BUILTIN
:
if
(
!
argv
[
0
])
fatal_error
(
"missing file argument for --builtin option
\n
"
);
...
...
tools/winebuild/winebuild.man.in
View file @
c0467a14
...
...
@@ -51,6 +51,9 @@ Build a .a import library from a spec file. The .spec file is
specified via the \fB-E\fR option. If the output library name ends
in .delay.a, a delayed import library is built.
.TP
.BI \--staticlib
Build a .a static library from object files.
.TP
.BI \--builtin
Mark a PE module as a Wine builtin module, by adding the "Wine builtin
DLL" signature string after the DOS header.
...
...
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