Commit 7be7c67c authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Link in shell32 only in gui mode.

Add all the standard defines that MinGW provides (with the exception of __MINGW__, that's MinGW prerogative). Do not pass along linker options when only compiling.
parent bc362fd3
......@@ -266,8 +266,8 @@ int main(int argc, char **argv)
}
if (use_stdlib && use_msvcrt) gcc_argv[i++] = "-lmsvcrt";
if (gui_app) gcc_argv[i++] = "-lcomdlg32";
if (gui_app) gcc_argv[i++] = "-lshell32";
gcc_argv[i++] = "-ladvapi32";
gcc_argv[i++] = "-lshell32";
}
else
{
......@@ -277,11 +277,30 @@ int main(int argc, char **argv)
gcc_argv[i++] = "-fPIC";
if (use_stdinc)
{
if (use_msvcrt) gcc_argv[i++] = "-I" INCLUDEDIR "/msvcrt";
if (use_msvcrt)
{
gcc_argv[i++] = "-I" INCLUDEDIR "/msvcrt";
gcc_argv[i++] = "-D__MSVCRT__";
}
gcc_argv[i++] = "-I" INCLUDEDIR "/windows";
}
gcc_argv[i++] = "-D__WINE__";
gcc_argv[i++] = "-DWIN32";
gcc_argv[i++] = "-D_WIN32";
gcc_argv[i++] = "-D__WIN32";
gcc_argv[i++] = "-D__WIN32__";
gcc_argv[i++] = "-D__WINNT";
gcc_argv[i++] = "-D__WINNT__";
gcc_argv[i++] = "-D__stdcall=__attribute__((__stdcall__))";
gcc_argv[i++] = "-D__cdecl=__attribute__((__cdecl__))";
gcc_argv[i++] = "-D__fastcall=__attribute__((__fastcall__))";
gcc_argv[i++] = "-D_stdcall=__attribute__((__stdcall__))";
gcc_argv[i++] = "-D_cdecl=__attribute__((__cdecl__))";
gcc_argv[i++] = "-D_fastcall=__attribute__((__fastcall__))";
gcc_argv[i++] = "-D__declspec(x)=__attribute__((x))";
/* Wine specific defines */
gcc_argv[i++] = "-D__WINE__";
gcc_argv[i++] = "-DWINE_UNICODE_NATIVE";
gcc_argv[i++] = "-D__int8=char";
gcc_argv[i++] = "-D__int16=short";
......@@ -294,6 +313,8 @@ int main(int argc, char **argv)
; /* ignore this option */
else if (strcmp("-mwindows", argv[j]) == 0)
; /* ignore this option */
else if (strncmp("-Wl,", argv[j], 4) == 0)
; /* do not pass linking options to compiler */
else if (strcmp("-s", argv[j]) == 0)
; /* ignore this option */
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment