1 /* Operating system specific defines to be used when targeting GCC for
2 hosting on Windows32, using GNU tools and the Windows32 API Library,
3 as distinct from winnt.h, which is used to build GCC for use with a
4 windows style library and tool set and uses the Microsoft tools.
5 Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
7 This file is part of GNU CC.
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING. If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
24 /* Most of this is the same as for cygwin, except for changing some
27 #include "i386/cygwin.h"
29 /* Please keep changes to CPP_PREDEFINES in sync with i386/crtdll. The
30 only difference between the two should be __MSVCRT__ needed to
31 distinguish MSVC from CRTDLL runtime in mingw headers. */
33 #define CPP_PREDEFINES "-Di386 -D_WIN32 -DWIN32 -D__WIN32__ \
34 -D__MINGW32__=0.2 -D__MSVCRT__ -DWINNT -D_X86_=1 -D__STDC__=1\
35 -D__stdcall=__attribute__((__stdcall__)) \
36 -D_stdcall=__attribute__((__stdcall__)) \
37 -D__cdecl=__attribute__((__cdecl__)) \
38 -D__declspec(x)=__attribute__((x)) \
39 -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
41 /* Specific a different directory for the standard include files. */
42 #undef STANDARD_INCLUDE_DIR
43 #define STANDARD_INCLUDE_DIR "/usr/local/i386-mingw32/include"
45 #define STANDARD_INCLUDE_COMPONENT "MINGW32"
48 #define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
50 /* For Windows applications, include more libraries, but always include
53 #define LIB_SPEC "%{mwindows:-lgdi32 -lcomdlg32} \
54 -luser32 -lkernel32 -ladvapi32 -lshell32"
56 /* Include in the mingw32 libraries with libgcc */
58 #define LIBGCC_SPEC "-lmingw32 -lgcc -lmoldname -lmsvcrt"
61 #define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s}"
63 /* MS runtime does not need a separate math library. */
64 #define MATH_LIBRARY ""
66 /* Output STRING, a string representing a filename, to FILE. We canonicalize
67 it to be in MS-DOS format. */
68 #define OUTPUT_QUOTED_STRING(FILE, STRING) \
72 putc ('\"', asm_file); \
73 if (STRING[1] == ':' \
74 && (STRING[2] == '/' || STRING[2] == '\\')) \
76 putc ('/', asm_file); \
77 putc ('/', asm_file); \
78 putc (*string, asm_file); \
82 while ((c = *string++) != 0) \
88 putc ('\\', asm_file); \
92 putc ('\"', asm_file); \