Author: hyperion
Date: Sat Oct 25 13:13:25 2008
New Revision: 36963
URL:
http://svn.reactos.org/svn/reactos?rev=36963&view=rev
Log:
Visual C++ backend for rbuild (for now just a hacked mingw backend) and related
compilation fixes. Just run vcvars.bat from a RosBE console and "make"!
modified dll/win32/aclui/guid.c
modified dll/win32/aclui/precomp.h
modified drivers/bus/acpi/include/actypes.h
modified drivers/bus/acpi/include/platform/acenv.h
Miscellaneous compilation fixes
modified dll/win32/aclui/sidcache.c
Damn, forgot to commit this to trunk
deleted include/psdk/intrin.h
added include/psdk/intrin.h.bak
intrin.h is positively not a PSDK header
modified lib/3rdparty/mingw/wcrt1.c
Port to Visual C++
modified ReactOS-generic.rbuild
Use Visual C++'s built-in CRT headers for now
modified ReactOS-i386.rbuild
Translate global compiler flags to Visual C++
modified tools/rbuild/backend/mingw/mingw.cpp
No need for -pipe in Visual C++
Disable precompiled headers for now
Enable a whole lotta warnings, and disable a few. Should move this to a response file
somewhere
modified tools/rbuild/backend/mingw/modulehandler.cpp
.a -> .lib
.o -> .obj
.coff -> .res.obj, fix windres command line to remove the ambiguity
${gcc}/${gpp} -> ${cl}, translate command line options
ECHO_CC -> ECHO_CL
Pass *_RCFLAGS to gas instead of *_CFLAGS, for now, so that gas only sees includes and
defines (in the future we'll have something like *_ASFLAGS)
Disabled some gcc-specific code for now
modified tools/rbuild/module.cpp
.a -> .lib, .o -> .obj, lib<name>.a -> <name>.lib; and why the
hell is this in the front-end?
Added:
branches/the-real-msvc/include/psdk/intrin.h.bak (props changed)
- copied unchanged from r36953, trunk/reactos/include/psdk/intrin.h
Removed:
branches/the-real-msvc/include/psdk/intrin.h
Modified:
branches/the-real-msvc/ReactOS-generic.rbuild
branches/the-real-msvc/ReactOS-i386.rbuild
branches/the-real-msvc/dll/win32/aclui/guid.c
branches/the-real-msvc/dll/win32/aclui/precomp.h
branches/the-real-msvc/dll/win32/aclui/sidcache.c
branches/the-real-msvc/drivers/bus/acpi/include/actypes.h
branches/the-real-msvc/drivers/bus/acpi/include/platform/acenv.h
branches/the-real-msvc/lib/3rdparty/mingw/wcrt1.c
branches/the-real-msvc/tools/rbuild/backend/mingw/mingw.cpp
branches/the-real-msvc/tools/rbuild/backend/mingw/modulehandler.cpp
branches/the-real-msvc/tools/rbuild/module.cpp
Modified: branches/the-real-msvc/ReactOS-generic.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/ReactOS-generic.r…
==============================================================================
--- branches/the-real-msvc/ReactOS-generic.rbuild [iso-8859-1] (original)
+++ branches/the-real-msvc/ReactOS-generic.rbuild [iso-8859-1] Sat Oct 25 13:13:25 2008
@@ -64,8 +64,8 @@
<include root="intermediate">include/psdk</include>
<include>include/dxsdk</include>
<include root="intermediate">include/dxsdk</include>
- <include>include/crt</include>
- <include>include/crt/mingw32</include>
+ <!--<include>include/crt</include>-->
+ <!--<include>include/crt/mingw32</include>-->
<include>include/ddk</include>
<include>include/GL</include>
<include>include/ndk</include>
Modified: branches/the-real-msvc/ReactOS-i386.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/ReactOS-i386.rbui…
==============================================================================
--- branches/the-real-msvc/ReactOS-i386.rbuild [iso-8859-1] (original)
+++ branches/the-real-msvc/ReactOS-i386.rbuild [iso-8859-1] Sat Oct 25 13:13:25 2008
@@ -16,27 +16,41 @@
<property name="NTOSKRNL_SHARED" value="-file-alignment=0x1000
-section-alignment=0x1000 -shared"/>
<if property="OPTIMIZE" value="1">
+ <!--
<compilerflag>-Os</compilerflag>
<compilerflag>-ftracer</compilerflag>
<compilerflag>-momit-leaf-frame-pointer</compilerflag>
+ -->
+ <compilerflag>-O1</compilerflag>
</if>
<if property="OPTIMIZE" value="2">
+ <!--<compilerflag>-Os</compilerflag>-->
+ <compilerflag>-O2</compilerflag>
+ </if>
+ <if property="OPTIMIZE" value="3">
+ <!--<compilerflag>-O1</compilerflag>-->
+ <compilerflag>-Ox</compilerflag>
<compilerflag>-Os</compilerflag>
</if>
- <if property="OPTIMIZE" value="3">
- <compilerflag>-O1</compilerflag>
- </if>
<if property="OPTIMIZE" value="4">
- <compilerflag>-O2</compilerflag>
+ <!--<compilerflag>-O2</compilerflag>-->
+ <compilerflag>-Ox</compilerflag>
+ <compilerflag>-Os</compilerflag>
</if>
<if property="OPTIMIZE" value="5">
- <compilerflag>-O3</compilerflag>
+ <!--<compilerflag>-O3</compilerflag>-->
+ <compilerflag>-Ox</compilerflag>
+ <compilerflag>-Os</compilerflag>
</if>
+ <!--
<compilerflag>-mpreferred-stack-boundary=2</compilerflag>
<compilerflag>-fno-strict-aliasing</compilerflag>
<compilerflag>-Wno-strict-aliasing</compilerflag>
<compilerflag>-Wpointer-arith</compilerflag>
+ -->
+ <compilerflag>-Oy-</compilerflag>
+ <compilerflag>-GS-</compilerflag>
<linkerflag>-disable-stdcall-fixup</linkerflag>
</project>
Modified: branches/the-real-msvc/dll/win32/aclui/guid.c
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/dll/win32/aclui/g…
==============================================================================
--- branches/the-real-msvc/dll/win32/aclui/guid.c [iso-8859-1] (original)
+++ branches/the-real-msvc/dll/win32/aclui/guid.c [iso-8859-1] Sat Oct 25 13:13:25 2008
@@ -19,8 +19,11 @@
/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
+#include <windows.h>
+
#include <initguid.h>
-#include <windows.h>
+#include <objbase.h>
+
#include <aclui.h>
#include <objsel.h>
Modified: branches/the-real-msvc/dll/win32/aclui/precomp.h
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/dll/win32/aclui/p…
==============================================================================
--- branches/the-real-msvc/dll/win32/aclui/precomp.h [iso-8859-1] (original)
+++ branches/the-real-msvc/dll/win32/aclui/precomp.h [iso-8859-1] Sat Oct 25 13:13:25 2008
@@ -4,7 +4,7 @@
#include <windows.h>
#include <ndk/ntndk.h>
#include <commctrl.h>
-#include <oleauto.h>
+#include <ole2.h>
#include <objsel.h>
#include <prsht.h>
#include <aclui.h>
Modified: branches/the-real-msvc/dll/win32/aclui/sidcache.c
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/dll/win32/aclui/s…
==============================================================================
--- branches/the-real-msvc/dll/win32/aclui/sidcache.c [iso-8859-1] (original)
+++ branches/the-real-msvc/dll/win32/aclui/sidcache.c [iso-8859-1] Sat Oct 25 13:13:25
2008
@@ -178,7 +178,7 @@
if (SystemName != NULL && SystemName[0] != L'\0')
{
LsaSystemName.Buffer = SystemName;
- LsaSystemName.Length = wcslen(SystemName) * sizeof(WCHAR);
+ LsaSystemName.Length = (USHORT)(wcslen(SystemName) * sizeof(WCHAR)); /* FIXME:
possible overflow */
LsaSystemName.MaximumLength = LsaSystemName.Length + sizeof(WCHAR);
psn = &LsaSystemName;
}
Modified: branches/the-real-msvc/drivers/bus/acpi/include/actypes.h
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/drivers/bus/acpi/…
==============================================================================
--- branches/the-real-msvc/drivers/bus/acpi/include/actypes.h [iso-8859-1] (original)
+++ branches/the-real-msvc/drivers/bus/acpi/include/actypes.h [iso-8859-1] Sat Oct 25
13:13:25 2008
@@ -193,11 +193,11 @@
*/
#ifdef _MSC_VER
typedef ULONGLONG u64;
-typedef ULONG u32;
+//~ typedef ULONG u32;
typedef USHORT u16;
typedef UCHAR u8;
typedef LONGLONG s64;
-typedef LONG s32;
+//~ typedef LONG s32;
typedef SHORT s16;
typedef CHAR s8;
#endif
Modified: branches/the-real-msvc/drivers/bus/acpi/include/platform/acenv.h
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/drivers/bus/acpi/…
==============================================================================
--- branches/the-real-msvc/drivers/bus/acpi/include/platform/acenv.h [iso-8859-1]
(original)
+++ branches/the-real-msvc/drivers/bus/acpi/include/platform/acenv.h [iso-8859-1] Sat Oct
25 13:13:25 2008
@@ -111,10 +111,10 @@
#elif _AED_EFI
#include "acefi.h"
-#elif WIN32
+#elif defined(WIN32)
#include "acwin.h"
-#elif __FreeBSD__
+#elif defined(__FreeBSD__)
#include "acfreebsd.h"
#else
Removed: branches/the-real-msvc/include/psdk/intrin.h
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/include/psdk/intr…
==============================================================================
--- branches/the-real-msvc/include/psdk/intrin.h [iso-8859-1] (original)
+++ branches/the-real-msvc/include/psdk/intrin.h (removed)
@@ -1,96 +1,0 @@
-/*
- Compatibility <intrin.h> header for GCC -- GCC equivalents of intrinsic
- Microsoft Visual C++ functions. Originally developed for the ReactOS
- (<http://www.reactos.org/>) and TinyKrnl (<http://www.tinykrnl.org/>)
- projects.
-
- Copyright (c) 2006 KJK::Hyperion <hackbunny(a)reactos.com>
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the
"Software"),
- to deal in the Software without restriction, including without limitation
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
- and/or sell copies of the Software, and to permit persons to whom the
- Software is furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- DEALINGS IN THE SOFTWARE.
-*/
-
-#ifndef KJK_INTRIN_H_
-#define KJK_INTRIN_H_
-
-#ifndef __GNUC__
-#error Unsupported compiler
-#endif
-
-/*
- FIXME: review all "memory" clobbers, add/remove to match Visual C++
- behavior: some "obvious" memory barriers are not present in the Visual
C++
- implementation - e.g. __stosX; on the other hand, some memory barriers that
- *are* present could have been missed
-*/
-
-/*
- NOTE: this is a *compatibility* header. Some functions may look wrong at
- first, but they're only "as wrong" as they would be on Visual C++.
Our
- priority is compatibility
-
- NOTE: unlike most people who write inline asm for GCC, I didn't pull the
- constraints and the uses of __volatile__ out of my... hat. Do not touch
- them. I hate cargo cult programming
-
- NOTE: be very careful with declaring "memory" clobbers. Some
"obvious"
- barriers aren't there in Visual C++ (e.g. __stosX)
-
- NOTE: review all intrinsics with a return value, add/remove __volatile__
- where necessary. If an intrinsic whose value is ignored generates a no-op
- under Visual C++, __volatile__ must be omitted; if it always generates code
- (for example, if it has side effects), __volatile__ must be specified. GCC
- will only optimize out non-volatile asm blocks with outputs, so input-only
- blocks are safe. Oddities such as the non-volatile 'rdmsr' are intentional
- and follow Visual C++ behavior
-
- NOTE: on GCC 4.1.0, please use the __sync_* built-ins for barriers and
- atomic operations. Test the version like this:
-
- #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
- ...
-
- Pay attention to the type of barrier. Make it match with what Visual C++
- would use in the same case
-*/
-
-#if defined(__i386__)
-#include "intrin_x86.h"
-#elif defined(_PPC_)
-#include "intrin_ppc.h"
-#elif defined(_MIPS_)
-#include "intrin_mips.h"
-#elif defined(_M_ARM)
-#include "intrin_arm.h"
-#elif defined(__x86_64__)
-/* TODO: the x64 architecture shares most of the i386 intrinsics. It should be easy to
support */
-#include "intrin_x86.h"
-#else
-#error Unsupported architecture
-#endif
-
-
-/*** Miscellaneous ***/
-/* BUGBUG: only good for use in macros. Cannot be taken the address of */
-#define __noop(...) ((void)0)
-
-/* TODO: __assume. GCC only supports the weaker __builtin_expect */
-
-#endif
-
-/* EOF */
Propchange: branches/the-real-msvc/include/psdk/intrin.h.bak
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: branches/the-real-msvc/include/psdk/intrin.h.bak
------------------------------------------------------------------------------
svn:mergeinfo =
Modified: branches/the-real-msvc/lib/3rdparty/mingw/wcrt1.c
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/lib/3rdparty/ming…
==============================================================================
--- branches/the-real-msvc/lib/3rdparty/mingw/wcrt1.c [iso-8859-1] (original)
+++ branches/the-real-msvc/lib/3rdparty/mingw/wcrt1.c [iso-8859-1] Sat Oct 25 13:13:25
2008
@@ -42,7 +42,7 @@
#define __UNKNOWN_APP 0
#define __CONSOLE_APP 1
#define __GUI_APP 2
-__MINGW_IMPORT void __set_app_type(int);
+_CRTIMP void __set_app_type(int);
#endif /* __MSVCRT__ */
/* Global _fmode for this .exe, not the one in msvcrt.dll,
@@ -181,7 +181,7 @@
/*
* The function mainCRTStartup is the entry point for all console programs.
*/
-static void __attribute__((noreturn))
+static void __declspec(noreturn)
__mingw_wCRTStartup (void)
{
int nRet;
@@ -218,6 +218,7 @@
_pei386_runtime_relocator ();
#endif
+#if defined(__GNUC__)
#if defined(__i386__)
/* Align the stack to 16 bytes for the sake of SSE ops in main
or in functions inlined into main. */
@@ -231,6 +232,17 @@
#else
#error Unsupported architecture
#endif
+#endif
+
+#if defined(_MSC_VER)
+#if defined(_M_IX86)
+ /* Align the stack to 16 bytes for the sake of SSE ops in main
+ or in functions inlined into main. */
+ __asm and esp, 0FFFFFFF0h
+#else
+#error Unsupported architecture
+#endif
+#endif
/*
* Call the main function. If the user does not supply one
Modified: branches/the-real-msvc/tools/rbuild/backend/mingw/mingw.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/tools/rbuild/back…
==============================================================================
--- branches/the-real-msvc/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] (original)
+++ branches/the-real-msvc/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1] Sat Oct 25
13:13:25 2008
@@ -340,8 +340,8 @@
DetectCompiler ();
DetectBinutils ();
DetectNetwideAssembler ();
- DetectPipeSupport ();
- DetectPCHSupport ();
+ usePipe = true; //~ DetectPipeSupport ();
+ use_pch = false; //~ DetectPCHSupport ();
CreateMakefile ();
GenerateHeader ();
GenerateGlobalVariables ();
@@ -496,11 +496,12 @@
fprintf ( fMakefile, "PROJECT_WIDLFLAGS := $(PROJECT_CFLAGS)
$(PROJECT_CDEFINES)\n" );
fprintf ( fMakefile, "PROJECT_LFLAGS := '$(shell ${TARGET_CC}
-print-libgcc-file-name)' %s\n", GenerateProjectLFLAGS ().c_str () );
fprintf ( fMakefile, "PROJECT_LPPFLAGS := '$(shell ${TARGET_CPP}
-print-file-name=libstdc++.a)' '$(shell ${TARGET_CPP}
-print-file-name=libgcc.a)' '$(shell ${TARGET_CPP}
-print-file-name=libmingw32.a)' '$(shell ${TARGET_CPP}
-print-file-name=libmingwex.a)'\n" );
- fprintf ( fMakefile, "PROJECT_CFLAGS += -Wall\n" );
- fprintf ( fMakefile, "ifneq ($(OARCH),)\n" );
- fprintf ( fMakefile, "PROJECT_CFLAGS += -march=$(OARCH)\n" );
- fprintf ( fMakefile, "endif\n" );
- fprintf ( fMakefile, "PROJECT_CFLAGS += $(PROJECT_GCCOPTIONS)\n" );
+ //~ fprintf ( fMakefile, "PROJECT_CFLAGS += -Wall\n" );
+ fprintf ( fMakefile, "PROJECT_CFLAGS += -Wall -W4 -wd4820 -wd4214 -wd4201
-wd4668 -wd4255 -wd4005 -wd4127 -wd4710 -wd4711 -wd4100 -wd4738 -wd4706\n" );
+ //~ fprintf ( fMakefile, "ifneq ($(OARCH),)\n" );
+ //~ fprintf ( fMakefile, "PROJECT_CFLAGS += -march=$(OARCH)\n" );
+ //~ fprintf ( fMakefile, "endif\n" );
+ //~ fprintf ( fMakefile, "PROJECT_CFLAGS += $(PROJECT_GCCOPTIONS)\n" );
fprintf ( fMakefile, "\n" );
}
Modified: branches/the-real-msvc/tools/rbuild/backend/mingw/modulehandler.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/tools/rbuild/back…
==============================================================================
--- branches/the-real-msvc/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1]
(original)
+++ branches/the-real-msvc/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Sat
Oct 25 13:13:25 2008
@@ -284,7 +284,7 @@
return GetTargetFilename ( module, NULL );
return new FileLocation ( IntermediateDirectory,
module.output->relative_path,
- ReplaceExtension ( module.name, ".temp.a" ) );
+ ReplaceExtension ( module.name, ".temp.lib" )
);
}
/*static*/ bool
@@ -417,24 +417,24 @@
if ( module.type == BootSector )
return new FileLocation ( *module.output );
else if ( extension == ".rc" || extension == ".RC" )
- newExtension = "_" + module.name + ".coff";
+ newExtension = "_" + module.name + ".res.obj";
else if ( extension == ".mc" || extension == ".MC" )
newExtension = ".rc";
else if ( extension == ".spec" || extension == ".SPEC" )
- newExtension = "_" + module.name + ".stubs.o";
+ newExtension = "_" + module.name + ".stubs.obj";
else if ( extension == ".idl" || extension == ".IDL" )
{
if ( module.type == RpcServer )
- newExtension = "_s.o";
+ newExtension = "_s.obj";
else if ( module.type == RpcClient )
- newExtension = "_c.o";
+ newExtension = "_c.obj";
else if ( module.type == RpcProxy )
- newExtension = "_p.o";
+ newExtension = "_p.obj";
else
newExtension = ".h";
}
else
- newExtension = "_" + module.name + ".o";
+ newExtension = "_" + module.name + ".obj";
if ( module.type == BootSector )
destination_directory = OutputDirectory;
@@ -1041,8 +1041,8 @@
module.pch->file->name + ".gch" );
}
-Rule arRule1 ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).a:
$($(module_name)_OBJS) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).a",
+Rule arRule1 ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).lib:
$($(module_name)_OBJS) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).lib",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule arRule2 ( "\t$(ECHO_AR)\n"
"\t${ar} -rc $@ $($(module_name)_OBJS)\n",
@@ -1051,10 +1051,10 @@
"\t${host_ar} -rc $@ $($(module_name)_OBJS)\n",
NULL );
Rule gasRule ( "$(source): ${$(module_name)_precondition}\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_GAS)\n"
- "\t${gcc} -x assembler-with-cpp -o $@ -D__ASM__
$($(module_name)_CFLAGS) -c $<\n",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o",
+ "\t${gcc} -x assembler-with-cpp -o $@ -D__ASM__
$($(module_name)_RCFLAGS) -c $<\n",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule bootRule ( "$(source): ${$(module_name)_precondition}\n"
"$(module_output): $(source)$(dependencies) |
$(OUTPUT)$(SEP)$(source_dir)\n"
@@ -1062,20 +1062,20 @@
"\t$(Q)${nasm} -f win32 $< -o $@
$($(module_name)_NASMFLAGS)\n",
"$(OUTPUT)$(SEP)$(source_dir)$(SEP)", NULL );
Rule nasmRule ( "$(source): ${$(module_name)_precondition}\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_NASM)\n"
"\t$(Q)${nasm} -f win32 $< -o $@
$($(module_name)_NASMFLAGS)\n",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule windresRule ( "$(source): ${$(module_name)_precondition}\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).coff:
$(source)$(dependencies) $(WRC_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)
$(TEMPORARY)\n"
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).res.obj:
$(source)$(dependencies) $(WRC_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)
$(TEMPORARY)\n"
"\t$(ECHO_WRC)\n"
- "\t${gcc} -xc -E -DRC_INVOKED ${$(module_name)_RCFLAGS} $(source)
> $(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).rci.tmp\n"
+ "\t${cl} -TC -E -DRC_INVOKED ${$(module_name)_RCFLAGS} $(source)
> $(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).rci.tmp "/*> "
NUL*/ "\n"
"\t$(Q)$(WRC_TARGET) ${$(module_name)_RCFLAGS}
$(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).rci.tmp
$(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).res.tmp\n"
"\t-@${rm}
$(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).rci.tmp 2>$(NUL)\n"
- "\t${windres}
$(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).res.tmp -o $@\n"
+ "\t${windres} --output-format=coff
$(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).res.tmp -o $@\n"
"\t-@${rm}
$(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).res.tmp 2>$(NUL)\n",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).coff",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).res.obj",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule wmcRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).rc
$(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h: $(WMC_TARGET)
$(source) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WMC)\n"
@@ -1085,19 +1085,19 @@
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule winebuildKMDefRule (
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).spec.def:
$(source)$(dependencies) $(WINEBUILD_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WINEBLD)\n"
- "\t${gcc} -xc -E $(source) -I. >
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec\n"
+ "\t${cl} -TC -E $(source) -I. >
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec "/*> "
NUL*/ "\n"
"\t$(Q)$(WINEBUILD_TARGET)
$(WINEBUILD_FLAGS) -o
$(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext)_$(module_name).spec.def
--def -E $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec\n\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).spec.def",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule winebuildKMRule (
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.c:\n"
"\t${cp} $(NUL) $@ 1>$(NUL)\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.o:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.c$(dependencies)
| $(INTERMEDIATE)$(SEP)$(source_dir)\n"
- "\t$(ECHO_CC)\n"
- "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.obj:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.c$(dependencies)
| $(INTERMEDIATE)$(SEP)$(source_dir)\n"
+ "\t$(ECHO_CL)\n"
+ "\t${cl} -Fo$@
-Fd$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.pdb
$($(module_name)_CFLAGS)$(compiler_flags) -c $< "/*> " NUL*/
"\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.c",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.o",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.obj",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule winebuildDefRule (
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).spec.def:
$(source)$(dependencies) $(WINEBUILD_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WINEBLD)\n"
@@ -1108,11 +1108,11 @@
Rule winebuildRule (
"$(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext)_$(module_name).stubs.c:
$(source_path)$(SEP)$(source_name_noext).spec $(WINEBUILD_TARGET)\n"
"\t$(ECHO_WINEBLD)\n"
"\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o
$(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext)_$(module_name).stubs.c
--pedll $(source_path)$(SEP)$(source_name_noext).spec\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.o:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.c$(dependencies)
| $(INTERMEDIATE)$(SEP)$(source_dir)\n"
- "\t$(ECHO_CC)\n"
- "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.obj:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.c$(dependencies)
| $(INTERMEDIATE)$(SEP)$(source_dir)\n"
+ "\t$(ECHO_CL)\n"
+ "\t${cl} -Fo$@
-Fd$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.pdb
$($(module_name)_CFLAGS)$(compiler_flags) -c $< "/*> " NUL*/
"\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.c",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.o",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).stubs.obj",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule widlHeaderRule ( "$(source): ${$(module_name)_precondition}\n"
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).h:
$(source)$(dependencies) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
@@ -1124,34 +1124,34 @@
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h: $(source)$(dependencies)
$(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WIDL)\n"
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h -H
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h -s -S
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c $(source)\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.o:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h$(dependencies) |
$(INTERMEDIATE)$(SEP)$(source_dir)\n"
- "\t$(ECHO_CC)\n"
- "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.obj:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h$(dependencies) |
$(INTERMEDIATE)$(SEP)$(source_dir)\n"
+ "\t$(ECHO_CL)\n"
+ "\t${cl} -Fo$@
-Fd$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.pdb
$($(module_name)_CFLAGS)$(compiler_flags) -c $< "/*> " NUL*/
"\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.o",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.obj",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule widlClientRule ( "$(source): ${$(module_name)_precondition}\n"
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h: $(source)$(dependencies)
$(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WIDL)\n"
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h -H
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h -c -C
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(source)\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.o:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h$(dependencies) |
$(INTERMEDIATE)$(SEP)$(source_dir)\n"
- "\t$(ECHO_CC)\n"
- "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.obj:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h$(dependencies) |
$(INTERMEDIATE)$(SEP)$(source_dir)\n"
+ "\t$(ECHO_CL)\n"
+ "\t${cl} -Fo$@
-Fd$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.pdb
$($(module_name)_CFLAGS)$(compiler_flags) -c $< "/*> " NUL*/
"\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.o",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.obj",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule widlProxyRule ( "$(source): ${$(module_name)_precondition}\n"
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h: $(source)$(dependencies)
$(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WIDL)\n"
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h -H
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h -p -P
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c $(source)\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.o:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h$(dependencies) |
$(INTERMEDIATE)$(SEP)$(source_dir)\n"
- "\t$(ECHO_CC)\n"
- "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.obj:
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h$(dependencies) |
$(INTERMEDIATE)$(SEP)$(source_dir)\n"
+ "\t$(ECHO_CL)\n"
+ "\t${cl} -Fo$@
-Fd$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.pdb
$($(module_name)_CFLAGS)$(compiler_flags) -c $< "/*> " NUL*/
"\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.o",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.obj",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule widlTlbRule ( "$(source): ${$(module_name)_precondition}\n"
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(module_name).tlb:
$(source)$(dependencies) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
@@ -1159,25 +1159,25 @@
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -t -T
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).tlb $(source)\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
Rule gccRule ( "$(source): ${$(module_name)_precondition}\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
- "\t$(ECHO_CC)\n"
- "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o",
NULL );
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
+ "\t$(ECHO_CL)\n"
+ "\t${cl} -Fo$@
-Fd$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).pdb
$($(module_name)_CFLAGS)$(compiler_flags) -c $< "/*> " NUL*/
"\n",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj",
NULL );
Rule gccHostRule ( "$(source): ${$(module_name)_precondition}\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_CC)\n"
"\t${host_gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o",
NULL );
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj",
NULL );
Rule gppRule ( "$(source): ${$(module_name)_precondition}\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
- "\t$(ECHO_CC)\n"
- "\t${gpp} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o",
NULL );
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
+ "\t$(ECHO_CL)\n"
+ "\t${cl} -Fo$@
-Fd$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).pdb
$($(module_name)_CFLAGS)$(compiler_flags) -c $< "/*> " NUL*/
"\n",
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj",
NULL );
Rule gppHostRule ( "$(source): ${$(module_name)_precondition}\n"
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj:
$(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_CC)\n"
"\t${host_gpp} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c
$<\n",
-
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o",
NULL );
+
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).obj",
NULL );
Rule emptyRule ( "", NULL );
void
@@ -1647,8 +1647,8 @@
if ( pchFilename )
{
- string cc = ( ModuleHandlerInformations[module.type].DefaultHost ==
HostTrue ? "${host_gcc}" : "${gcc}" );
- string cppc = ( ModuleHandlerInformations[module.type].DefaultHost ==
HostTrue ? "${host_gpp}" : "${gpp}" );
+ string cc = ( ModuleHandlerInformations[module.type].DefaultHost ==
HostTrue ? "${host_gcc}" : "${cl}" );
+ string cppc = ( ModuleHandlerInformations[module.type].DefaultHost ==
HostTrue ? "${host_gpp}" : "${cl}" );
const FileLocation& baseHeaderFile = *module.pch->file;
CLEAN_FILE ( *pchFilename );
@@ -1665,7 +1665,7 @@
backend->GetFullPath ( *pchFilename ).c_str() );
fprintf ( fMakefile, "\t$(ECHO_PCH)\n" );
fprintf ( fMakefile,
- "\t%s -o %s %s -g %s\n\n",
+ "\t%s -o %s %s -Zi %s\n\n",
module.cplusplus ? cppc.c_str() : cc.c_str(),
backend->GetFullName ( *pchFilename ).c_str(),
cflagsMacro.c_str(),
@@ -1897,35 +1897,38 @@
string globalCflags = "";
if ( ModuleHandlerInformations[module.type].DefaultHost == HostFalse )
+ {
globalCflags += " $(PROJECT_CFLAGS)";
+ globalCflags += " -Zi";
+
+ if ( !module.allowWarnings )
+ globalCflags += " -WX";
+
+ globalCflags += " -Zl -MD";
+ globalCflags += " -D__MSVCRT__
-D__MINGW_IMPORT=__declspec(dllimport)";
+ globalCflags += " -D_CRT_SECURE_NO_WARNINGS";
+ globalCflags += " -D_CRT_NON_CONFORMING_SWPRINTFS";
+ }
else
+ {
globalCflags += " -Wall -Wpointer-arith -D__REACTOS__";
- globalCflags += " -g";
- if ( backend->usePipe )
- globalCflags += " -pipe";
- if ( !module.allowWarnings )
- globalCflags += " -Werror";
- if ( ModuleHandlerInformations[module.type].DefaultHost == HostTrue )
- {
+ globalCflags += " -g";
+
+ if ( !module.allowWarnings )
+ globalCflags += " -Werror";
+
if ( module.cplusplus )
globalCflags += " $(HOST_CPPFLAGS)";
else
globalCflags += " -Wno-strict-aliasing $(HOST_CFLAGS)";
}
- else
- {
- if ( module.cplusplus )
- {
- // HACK: use host headers when building C++
- globalCflags += " $(HOST_CPPFLAGS)";
- }
- else
- globalCflags += " -nostdinc";
- }
+
+ //~ if ( backend->usePipe )
+ //~ globalCflags += " -pipe";
// Always force disabling of sibling calls optimisation for GCC
// (TODO: Move to version-specific once this bug is fixed in GCC)
- globalCflags += " -fno-optimize-sibling-calls";
+ //~ globalCflags += " -fno-optimize-sibling-calls";
fprintf (
fMakefile,
@@ -1995,9 +1998,9 @@
if ( IsStaticLibrary ( module ) && module.isStartupLib )
{
- fprintf ( fMakefile,
- "%s += -Wno-main\n\n",
- cflagsMacro.c_str () );
+ //~ fprintf ( fMakefile,
+ //~ "%s += -Wno-main\n\n",
+ //~ cflagsMacro.c_str () );
}
fprintf ( fMakefile, "\n\n" );
@@ -3545,7 +3548,7 @@
fprintf ( fMakefile, "\t$(ECHO_BOOTPROG)\n" );
- fprintf ( fMakefile, "\t${gcc} $(%s_LINKFORMAT) %s %s -g -o %s\n",
+ fprintf ( fMakefile, "\t${gcc} $(%s_LINKFORMAT) %s %s -Zi -o %s\n",
module.buildtype.c_str(),
objectsMacro.c_str(),
libsMacro.c_str(),
Modified: branches/the-real-msvc/tools/rbuild/module.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/the-real-msvc/tools/rbuild/modu…
==============================================================================
--- branches/the-real-msvc/tools/rbuild/module.cpp [iso-8859-1] (original)
+++ branches/the-real-msvc/tools/rbuild/module.cpp [iso-8859-1] Sat Oct 25 13:13:25 2008
@@ -992,9 +992,9 @@
case BootProgram:
case StaticLibrary:
case HostStaticLibrary:
- return ".a";
+ return ".lib";
case ObjectLibrary:
- return ".o";
+ return ".obj";
case Kernel:
case NativeCUI:
case Win32CUI:
@@ -1016,7 +1016,7 @@
case Cabinet:
return ".cab";
case BootSector:
- return ".o";
+ return ".obj";
case Iso:
case LiveIso:
case IsoRegTest:
@@ -1027,7 +1027,7 @@
case RpcServer:
case RpcClient:
case RpcProxy:
- return ".o";
+ return ".obj";
case Alias:
case ElfExecutable:
case IdlHeader:
@@ -1284,7 +1284,7 @@
this->importLibrary = importLibrary;
dependency = new FileLocation ( HasImportLibrary () ? IntermediateDirectory :
output->directory,
output->relative_path,
- HasImportLibrary () ? "lib" + name +
".a" : output->name );
+ HasImportLibrary () ? name + ".lib" :
output->name );
}