Commit 120abaed authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Teach winegcc to masquerade as cpp.

parent e66069d9
......@@ -29,8 +29,10 @@ install:: $(PROGRAMS)
$(INSTALL_PROGRAM) winegcc $(bindir)/winegcc
$(INSTALL_PROGRAM) winewrap $(bindir)/winewrap
cd $(bindir) && $(RM) wineg++ && $(LN_S) winegcc wineg++
cd $(bindir) && $(RM) winecpp && $(LN_S) winegcc winecpp
uninstall::
$(RM) $(bindir)/winegcc $(bindir)/wineg++ $(bindir)/winewrap
$(RM) $(bindir)/winegcc $(bindir)/wineg++ \
$(bindir)/winecpp $(bindir)/winewrap
### Dependencies:
......@@ -102,13 +102,14 @@ int main(int argc, char **argv)
{
strarray *gcc_argv;
int i, j;
int linking = 1, cpp = 0, use_static_linking = 0;
int linking = 1, cpp = 0, preprocessor = 0, use_static_linking = 0;
int use_stdinc = 1, use_stdlib = 1, use_msvcrt = 0, gui_app = 0;
tmp_files = strarray_alloc();
atexit(clean_temp_files);
if (strendswith(argv[0], "++")) cpp = 1;
if (strendswith(argv[0], "winecpp")) preprocessor = 1;
else if (strendswith(argv[0], "++")) cpp = 1;
for ( i = 1 ; i < argc ; i++ )
{
......@@ -161,6 +162,7 @@ int main(int argc, char **argv)
}
}
if (preprocessor) linking = 0;
if (use_static_linking) error("Static linking is not supported.");
gcc_argv = strarray_alloc();
......@@ -241,10 +243,13 @@ int main(int argc, char **argv)
}
else
{
strarray_add(gcc_argv, cpp ? "g++" : "gcc");
strarray_add(gcc_argv, preprocessor ? "cpp" : cpp ? "g++" : "gcc");
strarray_add(gcc_argv, "-fshort-wchar");
strarray_add(gcc_argv, "-fPIC");
if (!preprocessor)
{
strarray_add(gcc_argv, "-fshort-wchar");
strarray_add(gcc_argv, "-fPIC");
}
if (use_stdinc)
{
if (use_msvcrt)
......
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