diff --git a/Make.rules.in b/Make.rules.in
index bc07ba0411c..4076da6af7a 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -126,10 +126,10 @@ LINTS = $(C_SRCS:.c=.ln)
$(WINDRES) -i $< -o $@
.spec.spec.c:
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -M $(MODULE) -spec $<
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -M $(MODULE) --spec $<
.spec.spec.def:
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -def $<
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --def $<
.c.ln:
$(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )
@@ -152,7 +152,7 @@ filter:
# Rule for main module debug channels
$(MODULE).dbg.c: $(C_SRCS) $(C_SRCS16) $(WINEBUILD)
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -debug -C$(SRCDIR) $(C_SRCS) $(C_SRCS16)
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --debug -C$(SRCDIR) $(C_SRCS) $(C_SRCS16)
# Rule to rebuild the tools
diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in
index d1b130aaa01..9e2226ef400 100644
--- a/dlls/Makedll.rules.in
+++ b/dlls/Makedll.rules.in
@@ -25,7 +25,7 @@ all: $(MODULE)$(DLLEXT)
# Rules for .so files
$(MAINSPEC).c: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(SYMBOLFILE) $(WINEBUILD)
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -spec $(SRCDIR)/$(MAINSPEC) $(RC_SRCS:%.rc=-res %.res) $(SYMBOLFILE) -L$(DLLDIR) $(DELAYIMPORTS:%=-dl%) $(IMPORTS:%=-l%)
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --spec $(SRCDIR)/$(MAINSPEC) $(RC_SRCS:%.rc=-r %.res) $(SYMBOLFILE) $(DLLMAIN:%=-e %) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%)
$(MODULE).so: $(MAINSPEC).o $(ALL_OBJS) Makefile.in
$(LDSHARED) $(LDDLLFLAGS) $(MAINSPEC).o $(ALL_OBJS) -o $@ -L$(DLLDIR) $(LDIMPORTS:%=-l%) $(ALL_LIBS)
@@ -37,12 +37,12 @@ $(MODULE).tmp.o: $(ALL_OBJS) Makefile.in
# Rule for 16-bit glue
$(MODULE).glue.c: $(C_SRCS) $(C_SRCS16) $(WINEBUILD)
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -glue -C$(SRCDIR) $(C_SRCS) $(C_SRCS16)
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --glue -C$(SRCDIR) $(C_SRCS) $(C_SRCS16)
# Rules for .dll files
$(MODULE): $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(SPEC_DEF) Makefile.in
- $(DLLWRAP) $(DLLWRAPFLAGS) --def $(SPEC_DEF) --implib lib$(MODULE:.dll=.a) -o $@ $(RCOBJS) $(OBJS) $(MODULE).dbg.o -L$(DLLDIR) $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(ALL_LIBS)
+ $(DLLWRAP) $(DLLWRAPFLAGS) --def $(SPEC_DEF) --implib lib$(MODULE:.dll=.a) -o $@ $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(DLLMAIN:%=--entry %) -L$(DLLDIR) $(DELAYIMPORTS:%=-l%) $(IMPORTS:%=-l%) $(ALL_LIBS)
$(SPEC_DEF): $(WINEBUILD)
diff --git a/dlls/Maketest.rules.in b/dlls/Maketest.rules.in
index d48866faccb..4c7a77fd617 100644
--- a/dlls/Maketest.rules.in
+++ b/dlls/Maketest.rules.in
@@ -30,7 +30,7 @@ CROSSOBJS = $(C_SRCS:.c=.cross.o) $(TESTLIST:.c=.cross.o)
# Rule for main module spec file
$(MODULE).spec.c: $(RC_SRCS:.rc=.res) $(OBJS) $(WINEBUILD)
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -exe $(MODULE) -mcui $(RC_SRCS:%.rc=-res %.res) $(OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-dl%) $(IMPORTS:%=-l%)
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -exe $(MODULE) -mcui $(RC_SRCS:%.rc=-r %.res) $(OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%)
# Rules for .so main module
diff --git a/dlls/kernel/Makefile.in b/dlls/kernel/Makefile.in
index 5d36d0c01e5..ace8b128605 100644
--- a/dlls/kernel/Makefile.in
+++ b/dlls/kernel/Makefile.in
@@ -7,6 +7,7 @@ MODULE = kernel32.dll
IMPORTS = ntdll
ALTNAMES = krnl386.exe comm.dll stress.dll system.dll toolhelp.dll windebug.dll win87em.dll wprocs.dll
LDIMPORTS = ntdll.dll
+DLLMAIN = MAIN_KernelInit
C_SRCS = \
$(TOPOBJDIR)/ole/ole2nls.c \
@@ -51,7 +52,7 @@ kernel.res: $(MC_SRCS:.mc=.mc.rc)
# Special rules for 16-bit resource and spec files
krnl386.exe.spec.c: krnl386.exe.spec version16.res $(WINEBUILD)
- $(LDPATH) $(WINEBUILD) $(DEFS) -N kernel -o $@ -M $(MODULE) -spec $(SRCDIR)/krnl386.exe.spec
+ $(LDPATH) $(WINEBUILD) $(DEFS) -N kernel -o $@ -M $(MODULE) --spec $(SRCDIR)/krnl386.exe.spec
version16.res: version16.rc
$(LDPATH) $(WRC) $(DIVINCL) -o $@ -w16 -m -r $(SRCDIR)/version16.rc
diff --git a/dlls/kernel/kernel32.spec b/dlls/kernel/kernel32.spec
index 01a277b8d77..0bbbad787e2 100644
--- a/dlls/kernel/kernel32.spec
+++ b/dlls/kernel/kernel32.spec
@@ -1,5 +1,3 @@
-init MAIN_KernelInit
-
# Functions exported by the Win95 kernel32.dll
# (these need to have these exact ordinals, for some win95 dlls
# import kernel32.dll by ordinal)
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
index 57812887379..fdea1c50c2c 100644
--- a/dlls/ntdll/Makefile.in
+++ b/dlls/ntdll/Makefile.in
@@ -138,10 +138,10 @@ EXTRASUBDIRS = \
@MAKE_DLL_RULES@
relay16.s: $(WINEBUILD)
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -relay16
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --relay16
relay32.s: $(WINEBUILD)
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -relay32
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --relay32
clean::
$(RM) $(ASM_SRCS)
diff --git a/dlls/user/Makefile.in b/dlls/user/Makefile.in
index ce9ef0e0537..eb0f4e878c6 100644
--- a/dlls/user/Makefile.in
+++ b/dlls/user/Makefile.in
@@ -7,6 +7,7 @@ MODULE = user32.dll
IMPORTS = gdi32 advapi32 kernel32
ALTNAMES = user.exe keyboard.dll ddeml.dll display.dll mouse.dll
EXTRALIBS = $(LIBUNICODE)
+DLLMAIN = UserClientDllInitialize
LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o
@@ -104,7 +105,7 @@ EXTRASUBDIRS = \
# Special rules for 16-bit resource and spec files
user.exe.spec.c: user.exe.spec resources/version16.res
- $(LDPATH) $(WINEBUILD) $(DEFS) -H 65520 -o $@ -M $(MODULE) -spec $(SRCDIR)/user.exe.spec
+ $(LDPATH) $(WINEBUILD) $(DEFS) -H 65520 -o $@ -M $(MODULE) --spec $(SRCDIR)/user.exe.spec
resources/display.res: resources/display.rc
$(LDPATH) $(WRC) $(DIVINCL) -o $@ -w16 -m -r $(SRCDIR)/resources/display.rc
diff --git a/dlls/user/user32.spec b/dlls/user/user32.spec
index 44e851466a2..25d4b1e9db9 100644
--- a/dlls/user/user32.spec
+++ b/dlls/user/user32.spec
@@ -1,5 +1,3 @@
-init UserClientDllInitialize
-
@ stdcall ActivateKeyboardLayout(long long) ActivateKeyboardLayout
@ stdcall AdjustWindowRect(ptr long long) AdjustWindowRect
@ stdcall AdjustWindowRectEx(ptr long long long) AdjustWindowRectEx
diff --git a/miscemu/Makefile.in b/miscemu/Makefile.in
index a46be328cac..79fb7319c78 100644
--- a/miscemu/Makefile.in
+++ b/miscemu/Makefile.in
@@ -21,8 +21,8 @@ ALL_OBJS = $(SPEC_SRCS:.spec=.spec.o) $(OBJS)
$(MODULE): $(ALL_OBJS)
$(CC) -o $@ $(ALL_OBJS) -L$(DLLDIR) $(LDIMPORTS:%=-l%) $(LIBWINE) $(LIBUNICODE) $(LIBS) $(LDFLAGS)
-wine.spec.c: wine.spec
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -spec $(SRCDIR)/wine.spec -mgui -L$(DLLDIR) $(IMPORTS:%=-l%)
+wine.spec.c: $(WINEBUILD)
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --exe wine -mgui -e wine_initial_task -L$(DLLDIR) $(IMPORTS:%=-l%)
install:: $(MODULE)
$(MKINSTALLDIRS) $(bindir)
diff --git a/miscemu/wine.spec b/miscemu/wine.spec
deleted file mode 100644
index 722554d9b30..00000000000
--- a/miscemu/wine.spec
+++ /dev/null
@@ -1 +0,0 @@
-init wine_initial_task
diff --git a/programs/Makeprog.rules.in b/programs/Makeprog.rules.in
index 1fe437a2fd5..b9b4aa8ebb6 100644
--- a/programs/Makeprog.rules.in
+++ b/programs/Makeprog.rules.in
@@ -24,7 +24,7 @@ all: $(MODULE)$(DLLEXT) $(BASEMODULE)$(EXEEXT)
# Rule for main module spec file
$(MODULE).spec.c: $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(WINEBUILD)
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -exe $(MODULE) $(APPMODE:%=-m%) $(RC_SRCS:%.rc=-res %.res) $(ALL_OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-dl%) $(IMPORTS:%=-l%)
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --exe $(MODULE) $(APPMODE:%=-m%) $(RC_SRCS:%.rc=-r %.res) $(ALL_OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%)
# Rules for .so main module
diff --git a/programs/avitools/Makefile.in b/programs/avitools/Makefile.in
index 284164cf3b4..1726777fd8c 100644
--- a/programs/avitools/Makefile.in
+++ b/programs/avitools/Makefile.in
@@ -18,13 +18,13 @@ C_SRCS = \
all: $(PROGRAMS:%=%$(DLLEXT)) $(PROGRAMS:.exe=$(EXEEXT))
aviinfo.exe.spec.c: aviinfo.o $(WINEBUILD)
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -exe aviinfo.exe -mgui aviinfo.o -L$(DLLDIR) -lkernel32
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --exe aviinfo.exe -mgui aviinfo.o -L$(DLLDIR) -lkernel32
aviplay.exe.spec.c: aviplay.o $(WINEBUILD)
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -exe aviplay.exe -mgui aviplay.o -L$(DLLDIR) -lddraw -lkernel32
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --exe aviplay.exe -mgui aviplay.o -L$(DLLDIR) -lddraw -lkernel32
icinfo.exe.spec.c: icinfo.o $(WINEBUILD)
- $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -exe icinfo.exe -mgui icinfo.o -L$(DLLDIR) -lmsvfw32 -lkernel32
+ $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --exe icinfo.exe -mgui icinfo.o -L$(DLLDIR) -lmsvfw32 -lkernel32
aviinfo.exe.so: aviinfo.o aviinfo.exe.spec.o
$(LDSHARED) $(LDDLLFLAGS) -o $@ aviinfo.o aviinfo.exe.spec.o $(ALL_LIBS)
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index fa890ce528d..e5733632335 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -125,6 +125,7 @@ static void do_exe_mode( const char *arg );
static void do_module( const char *arg );
static void do_heap( const char *arg );
static void do_name( const char *arg );
+static void do_entry( const char *arg );
static void do_spec( const char *arg );
static void do_def( const char *arg );
static void do_exe( const char *arg );
@@ -132,7 +133,6 @@ static void do_glue(void);
static void do_relay16(void);
static void do_relay32(void);
static void do_debug(void);
-static void do_sym(void);
static void do_chdir( const char *arg );
static void do_lib( const char *arg );
static void do_import( const char *arg );
@@ -141,30 +141,31 @@ static void do_rsrc( const char *arg );
static const struct option_descr option_table[] =
{
- { "-h", 0, do_usage, "-h Display this help message" },
- { "-w", 0, do_warnings,"-w Turn on warnings" },
- { "-C", 1, do_chdir, "-C dir Change directory to
before opening source files" },
- { "-f", 1, do_f_flags, "-f flags Compiler flags (only -fPIC is supported)" },
- { "-D", 1, do_define, "-D sym Ignored for C flags compatibility" },
- { "-I", 1, do_include, "-I dir Ignored for C flags compatibility" },
- { "-K", 1, do_k_flags, "-K flags Compiler flags (only -KPIC is supported)" },
- { "-m", 1, do_exe_mode,"-m mode Set the executable mode (cui|gui|cuiw|guiw)" },
- { "-M", 1, do_module, "-M module Set the name of the main (Win32) module for a Win16 dll" },
- { "-L", 1, do_lib, "-L directory Look for imports libraries in 'directory'" },
- { "-l", 1, do_import, "-l lib.dll Import the specified library" },
- { "-dl", 1, do_dimport, "-dl lib.dll Delay-import the specified library" },
- { "-H", 1, do_heap, "-H size Set the heap size for a Win16 dll" },
- { "-N", 1, do_name, "-N dllname Set the DLL name (default: set from input file name)" },
- { "-res", 1, do_rsrc, "-res rsrc.res Load resources from rsrc.res" },
- { "-o", 1, do_output, "-o name Set the output file name (default: stdout)\n" },
- { "-sym", 0, do_sym, NULL }, /* ignored for backwards compatibility */
- { "-spec", 1, do_spec, "-spec file.spec Build a .c file from a spec file" },
- { "-def", 1, do_def, "-def file.spec Build a .def file from a spec file" },
- { "-exe", 1, do_exe, "-exe name Build a .c file for the named executable" },
- { "-debug", 0, do_debug, "-debug [files] Build a .c file containing debug channels declarations" },
- { "-glue", 0, do_glue, "-glue [files] Build the 16-bit glue for the source files" },
- { "-relay16", 0, do_relay16, "-relay16 Build the 16-bit relay assembly routines" },
- { "-relay32", 0, do_relay32, "-relay32 Build the 32-bit relay assembly routines" },
+ { "-h", 0, do_usage, "-h Display this help message" },
+ { "-w", 0, do_warnings,"-w Turn on warnings" },
+ { "-C", 1, do_chdir, "-C dir Change directory to before opening source files" },
+ { "-f", 1, do_f_flags, "-f flags Compiler flags (only -fPIC is supported)" },
+ { "-D", 1, do_define, "-D sym Ignored for C flags compatibility" },
+ { "-I", 1, do_include, "-I dir Ignored for C flags compatibility" },
+ { "-K", 1, do_k_flags, "-K flags Compiler flags (only -KPIC is supported)" },
+ { "-m", 1, do_exe_mode,"-m mode Set the executable mode (cui|gui|cuiw|guiw)" },
+ { "-M", 1, do_module, "-M module Set the name of the main (Win32) module for a Win16 dll" },
+ { "-L", 1, do_lib, "-L directory Look for imports libraries in 'directory'" },
+ { "-l", 1, do_import, "-l lib.dll Import the specified library" },
+ { "-d", 1, do_dimport, "-d lib.dll Delay-import the specified library" },
+ { "-H", 1, do_heap, "-H size Set the heap size for a Win16 dll" },
+ { "-N", 1, do_name, "-N dllname Set the DLL name (default: set from input file name)" },
+ { "-e", 1, do_entry, "-e function Set the DLL entry point function (default: DllMain)" },
+ { "-r", 1, do_rsrc, "-r rsrc.res Load resources from rsrc.res" },
+ { "-res", 1, do_rsrc, NULL }, /* for backwards compatibility, will disappear */
+ { "-o", 1, do_output, "-o name Set the output file name (default: stdout)\n" },
+ { "--spec", 1, do_spec, "--spec file.spec Build a .c file from a spec file" },
+ { "--def", 1, do_def, "--def file.spec Build a .def file from a spec file" },
+ { "--exe", 1, do_exe, "--exe name Build a .c file for the named executable" },
+ { "--debug", 0, do_debug, "--debug [files] Build a .c file containing debug channels declarations" },
+ { "--glue", 0, do_glue, "--glue [files] Build the 16-bit glue for the source files" },
+ { "--relay16", 0, do_relay16, "--relay16 Build the 16-bit relay assembly routines" },
+ { "--relay32", 0, do_relay32, "--relay32 Build the 32-bit relay assembly routines" },
{ NULL, 0, NULL, NULL }
};
@@ -192,7 +193,7 @@ static void do_usage(void)
for (opt = option_table; opt->name; opt++)
if (opt->usage) fprintf( stderr, " %s\n", opt->usage );
- fprintf( stderr, "\nExactly one of -spec, -def, -exe, -debug, -glue, -relay16 or -relay32 must be specified.\n\n" );
+ fprintf( stderr, "\nExactly one of --spec, --def, --exe, --debug, --glue, --relay16 or --relay32 must be specified.\n\n" );
exit(1);
}
@@ -238,6 +239,11 @@ static void do_name( const char *arg )
DLLName[sizeof(DLLName) - 1] = 0;
}
+static void do_entry( const char *arg )
+{
+ init_func = xstrdup( arg );
+}
+
static void do_spec( const char *arg )
{
if (exec_mode != MODE_NONE || !arg[0]) do_usage();
@@ -310,11 +316,6 @@ static void do_relay32(void)
exec_mode = MODE_RELAY32;
}
-static void do_sym(void)
-{
- /* nothing */
-}
-
static void do_lib( const char *arg )
{
lib_path = xrealloc( lib_path, (nb_lib_paths+1) * sizeof(*lib_path) );
@@ -345,22 +346,29 @@ static void parse_options( char *argv[] )
for (ptr = last = argv + 1; *ptr; ptr++)
{
+ /* first check the exact option name */
for (opt = option_table; opt->name; opt++)
{
- if (opt->has_arg && !strncmp( *ptr, opt->name, strlen(opt->name) ))
+ if (!strcmp( *ptr, opt->name ) ||
+ /* for long option check without the first dash too */
+ (opt->name[1] == '-' && !strcmp( *ptr, opt->name+1 )))
{
- arg=*ptr+strlen(opt->name);
- if (*arg=='\0')
- {
- ptr++;
- arg=*ptr;
- }
+ if (opt->has_arg) arg = *(++ptr);
+ else arg = NULL;
break;
}
- if (!strcmp( *ptr, opt->name ))
+ }
+
+ /* now check for option name concatenated with argument */
+ if (!opt->name)
+ {
+ for (opt = option_table; opt->name; opt++)
{
- arg=NULL;
- break;
+ if (opt->has_arg && !strncmp( *ptr, opt->name, strlen(opt->name) ))
+ {
+ arg = *ptr + strlen(opt->name);
+ break;
+ }
}
}
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
index f9cce46007f..325f37c891f 100644
--- a/tools/winebuild/parser.c
+++ b/tools/winebuild/parser.c
@@ -504,13 +504,7 @@ SPEC_TYPE ParseTopLevel( FILE *file, int def_only )
while ((token = GetToken(1)) != NULL)
{
- if (strcmp(token, "init") == 0)
- {
- if (SpecType == SPEC_WIN16)
- fatal_error( "init cannot be used for Win16 spec files\n" );
- init_func = xstrdup( GetToken(0) );
- }
- else if (strcmp(token, "rsrc") == 0)
+ if (strcmp(token, "rsrc") == 0)
{
if (!def_only)
{
diff --git a/tools/winebuild/winebuild.man.in b/tools/winebuild/winebuild.man.in
index 95139076e05..af7a03a3a36 100644
--- a/tools/winebuild/winebuild.man.in
+++ b/tools/winebuild/winebuild.man.in
@@ -19,7 +19,7 @@ option can be specified, as described in the \fBOPTIONS\fR section.
You have to specify exactly one of the following options, depending on
what you want winebuild to generate.
.TP
-.BI \-spec\ file.spec
+.BI \--spec\ file.spec
Build a C file from a spec file (see \fBSPEC FILE SYNTAX\fR for
details). The resulting C file must be compiled and linked to the
other object files to build a working Wine dll.
@@ -32,20 +32,20 @@ final dll, to allow
to get the list of all undefined symbols that need to be imported from
other dlls.
.TP
-.BI \-exe\ name
+.BI \--exe\ name
Build a C file for the named executable. This is basically the same as
-the -spec mode except that it doesn't require a .spec file as input,
+the --spec mode except that it doesn't require a .spec file as input,
since an executable doesn't export functions. The resulting C file
must be compiled and linked to the other object files to build a
working Wine executable, and all the other object files must be listed
as
.I input files.
.TP
-.BI \-def\ file.spec
+.BI \--def\ file.spec
Build a .def file from a spec file. This is used when building dlls
with a PE (Win32) compiler.
.TP
-.B \-debug
+.B \--debug
Build a C file containing the definitions for debugging channels. In
that mode the
.I input files
@@ -53,18 +53,18 @@ should be a list of C files to search for debug channel
definitions. The resulting C file must be compiled and linked with the
dll.
.TP
-.B \-glue
+.B \--glue
Build a C file containing the glue code for the 16-bit calls contained
in the
.I input files.
These calls must be specified in the source files using special
markers, as described in the \fBGLUE FUNCTIONS\fR section.
.TP
-.B \-relay16
+.B \--relay16
Generate the assembly code for the 16-bit relay routines. This is for
Wine internal usage only, you should never need to use this option.
.TP
-.B \-relay32
+.B \--relay32
Generate the assembly code for the 32-bit relay routines. This is for
Wine internal usage only, you should never need to use this option.
.SH OPTIONS
@@ -72,11 +72,22 @@ Wine internal usage only, you should never need to use this option.
.BI \-C\ directory
Change to the specified directory before reading source files. Only
meaningful in
-.BR \-debug\ and\ -glue\ modes.
+.BR \--debug\ and\ --glue\ modes.
.TP
.BI \-D\ symbol
Ignored for compatibility with the C compiler.
.TP
+.BI \-e\ function
+Specify the module entry point function; if not specified, the default
+is
+.B DllMain
+for dlls, and
+.B main
+or
+.B WinMain
+for CUI or GUI executables respectively. This is only valid for Win32
+modules.
+.TP
.BI \-f\ flags
Ignored for compatibility with the C compiler.
.TP
@@ -110,7 +121,7 @@ imported from it is actually called).
.BI \-M\ module
Specify that we are building a 16-bit dll, that will ultimately be
linked together with the 32-bit dll specified in \fImodule\fR. Only
-meaningful in \fB-spec\fR mode.
+meaningful in \fB--spec\fR mode.
.TP
.BI \-m\ mode
Set the executable mode, which can be one of the following:
@@ -132,7 +143,7 @@ function. A graphical executable has a \fBWinMain\fR entry point
instead. The ASCII/Unicode distinction applies to the strings that are
passed to the entry point.
.br
-This option is only meaningful in \fB-exe\fR mode.
+This option is only meaningful in \fB--exe\fR mode.
.TP
.BI \-N\ dllname
Set the internal name of the module. It is only used in Win16
@@ -143,7 +154,7 @@ KRNL386.EXE. It shouldn't be needed otherwise.
.BI \-o\ file
Set the name of the output file (default is standard output).
.TP
-.BI \-res\ rsrc.res
+.BI \-r\ rsrc.res
Load resources from the specified binary resource file. The
\fIrsrc.res\fR can be produced from a source resource file with
.BR wrc(1)
@@ -156,8 +167,6 @@ Turn on warnings.
A spec file should contain a number of optional directives, and then a
list of ordinal declarations. The general syntax is the following:
.PP
-.RB [ init\ \fIfunction\fR]
-.br
.RB [ rsrc\ \fIresfile\fR]
.br
.RB [ ignore\ (\ [ \fIsymbols...\fR ]\ )\ ]
@@ -182,10 +191,6 @@ list of ordinal declarations. The general syntax is the following:
.IB ordinal\ forward
.RI [ flags ]\ exportname\ forwardname
.SS "Optional directives"
-.B init
-specifies a function which will be called when this dll is
-loaded. This is only valid for Win32 modules.
-.PP
.B rsrc
specifies the path of the compiled resource file.
.PP
@@ -388,7 +393,7 @@ Glue functions are used to call down to 16-bit code from a 32-bit
function. This is done by declaring a special type of function
prototype in the source file that needs to call to 16-bit code, and
processing the source file through
-.I winebuild -glue.
+.I winebuild --glue.
.PP
These prototypes must be of one of the following forms:
.PP
diff --git a/tools/winemaker b/tools/winemaker
index c189660f481..a8a7ceb1276 100755
--- a/tools/winemaker
+++ b/tools/winemaker
@@ -1626,11 +1626,6 @@ sub generate_spec_file($$$)
return;
}
- if (defined @$target[$T_INIT] and ((@$target[$T_FLAGS] & $TF_WRAP) == 0)) {
- print FILEO "init @$target[$T_INIT]\n";
- }
- print FILEO "\n";
-
# Don't forget to export the 'Main' function for wrapped executables,
# except for MFC ones!
if ((@$target[$T_FLAGS]&($TF_WRAP|$TF_WRAPPER|$TF_MFC)) == $TF_WRAP) {
@@ -1902,9 +1897,9 @@ sub generate_project_files($)
$canon =~ s/_so$//;
if (@$target[$T_TYPE] == $TT_GUIEXE) {
- $mode = "-m gui -exe @$target[$T_NAME]";
+ $mode = "-m gui --exe @$target[$T_NAME]";
} elsif (@$target[$T_TYPE] == $TT_CUIEXE) {
- $mode = "-m cui -exe @$target[$T_NAME]";
+ $mode = "-m cui --exe @$target[$T_NAME]";
} else {
$mode = "";
}
@@ -1918,7 +1913,7 @@ sub generate_project_files($)
}
print FILEO "@$target[$T_NAME].spec.c: \$(${canon}_SPEC_SRCS) \$(${canon}_RC_SRCS:.rc=.res) \$(${canon}_OBJS)\n";
- print FILEO "\t\$(LD_PATH) \$(WINEBUILD) -fPIC -o \$\@ \$(${canon}_SPEC_SRCS:%=-spec %) \$(${canon}_RC_SRCS:%.rc=-res %.res) \$(${canon}_DLL_PATH) \$(WINE_DLL_PATH) \$(GLOBAL_DLL_PATH) $all_dlls $mode \$(${canon}_OBJS)\n";
+ print FILEO "\t\$(LD_PATH) \$(WINEBUILD) -fPIC -o \$\@ \$(${canon}_SPEC_SRCS:%=--spec %) \$(${canon}_RC_SRCS:%.rc=-r %.res) \$(${canon}_DLL_PATH) \$(WINE_DLL_PATH) \$(GLOBAL_DLL_PATH) $all_dlls $mode \$(${canon}_OBJS)\n";
print FILEO "\n";
print FILEO "@$target[$T_NAME].so: @$target[$T_NAME].spec.o \$(${canon}_OBJS) \$(${canon}_DEPENDS) \n";
if (@{@$target[$T_SOURCES_CXX]} > 0 or @{@$project_settings[$T_SOURCES_CXX]} > 0) {