Teach winegcc to masquerade as cpp.

This commit is contained in:
Dimitrie O. Paun 2003-09-15 20:02:30 +00:00 committed by Alexandre Julliard
parent e66069d94e
commit 120abaed95
2 changed files with 13 additions and 6 deletions

View File

@ -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:

View File

@ -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");
if (!preprocessor)
{
strarray_add(gcc_argv, "-fshort-wchar");
strarray_add(gcc_argv, "-fPIC");
}
if (use_stdinc)
{
if (use_msvcrt)