winebuild: Add a -m16 option to specify a 16-bit build.

This commit is contained in:
Alexandre Julliard 2010-07-21 12:43:53 +02:00
parent d99b6d3934
commit 7f6831aa9a
2 changed files with 8 additions and 10 deletions

View file

@ -251,7 +251,7 @@ static const char usage_str[] =
" --ld-cmd=LD Command to use for linking (default: ld)\n"
" -l, --library=LIB Import the specified library\n"
" -L, --library-path=DIR Look for imports libraries in DIR\n"
" -m32, -m64 Force building 32-bit resp. 64-bit code\n"
" -m16, -m32, -m64 Force building 16-bit, 32-bit resp. 64-bit code\n"
" -M, --main-module=MODULE Set the name of the main module for a Win16 dll\n"
" --nm-cmd=NM Command to use to get undefined symbols (default: nm)\n"
" --nxcompat=y|n Set the NX compatibility flag (default: yes)\n"
@ -382,9 +382,10 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
lib_path[nb_lib_paths++] = xstrdup( optarg );
break;
case 'm':
if (strcmp( optarg, "32" ) && strcmp( optarg, "64" ))
fatal_error( "Invalid -m option '%s', expected -m32 or -m64\n", optarg );
if (!strcmp( optarg, "32" )) force_pointer_size = 4;
if (strcmp( optarg, "16" ) && strcmp( optarg, "32" ) && strcmp( optarg, "64" ))
fatal_error( "Invalid -m option '%s', expected -m16, -m32 or -m64\n", optarg );
if (!strcmp( optarg, "16" )) spec->type = SPEC_WIN16;
else if (!strcmp( optarg, "32" )) force_pointer_size = 4;
else force_pointer_size = 8;
break;
case 'M':

View file

@ -157,8 +157,8 @@ Import the specified library, looking for a corresponding
\fIlibname.def\fR file in the directories specified with the \fB-L\fR
option.
.TP
.B \-m32, -m64
Generate 32-bit, respectively 64-bit code.
.B \-m16, -m32, -m64
Generate 16-bit, 32-bit, respectively 64-bit code.
.TP
.BI \-M,\ --main-module= module
When building a 16-bit dll, set the name of its 32-bit counterpart to
@ -211,10 +211,7 @@ for a command line executable,
for a graphical executable,
.br
.B native
for a native-mode dll,
.br
.B win16
for a 16-bit module.
for a native-mode dll.
.br
The entry point of a command line executable is a normal C \fBmain\fR
function. A \fBwmain\fR function can be used instead if you need the