From 5a11fa5fa19fc36fdf4ca64703945b37a015a039 Mon Sep 17 00:00:00 2001 From: "KJK::Hyperion" Date: Thu, 16 Apr 2009 02:27:50 +0000 Subject: [PATCH] Rbuild rationalization commit, umpteenth of infinite modified tools/rbuild/backend/mingw/mingw.cpp modified tools/rbuild/backend/mingw/mingw.h modified tools/rbuild/backend/mingw/modulehandler.cpp modified tools/rbuild/backend/mingw/modulehandler.h modified tools/rbuild/backend/mingw/rules.mak added tools/rbuild/compilerdirective.cpp modified tools/rbuild/compilerflag.cpp modified tools/rbuild/define.cpp modified tools/rbuild/include.cpp modified tools/rbuild/module.cpp modified tools/rbuild/pch.h modified tools/rbuild/project.cpp modified tools/rbuild/rbuild.dsp modified tools/rbuild/rbuild.h modified tools/rbuild/rbuild.mak modified tools/rbuild/rbuild.vcproj modified Makefile modified ReactOS-generic.rbuild Almost all build rules moved to a makefile.auto include (rules.mak). Size of makefile.auto reduced to about half The new rules correctly sort includes, defines and flags in priority order (built-in, project, module type, module, source file) The new rules don't duplicate flags anymore. Flag sets are defined once, as makefile variables, and then referred to by variable name Compiler-specific flags, includes and defines can now be set, for almost all compilers and tools , and have a new "compiler" attribute, containing a comma-separated list of compilers the directive applies to C++ compiler renamed to "cxx", "cpp" now correctly refers to the C preprocessor (or work-alike, built-in preprocessors) Drop "overridable" attribute for , as it never worked right New tag: works like , but undefines the variable before defining it. Several warnings suppressed thanks to it Slightly changed rule for resource file; conversion to object file now a separate phase that prints "[CVTRES]" Slightly changed definition of ${gas} Echo "[AS]" instead of "[GAS]" Echo "[RC]" for wrc modified include/crt/mingw32/intrin.h Now that the correct include paths are passed to the resource compiler, make headers more resource compiler-friendly modified dll/directx/wine/ddraw/ddraw.rbuild Apply GCC workaround for PSEH modified dll/directx/wine/wined3d/wined3d.rbuild modified dll/win32/riched20/riched20.rbuild -Wno-format no longer required modified dll/nls/idndl/idndl.rbuild modified dll/nls/idndl_redist/idndl_redist.rbuild modified dll/nls/normaliz_redist/normaliz_redist.rbuild modified lib/3rdparty/icu4ros/icu4ros.rbuild modified lib/nls/idna/idna.rbuild modified lib/nls/normalize/normalize.rbuild modified lib/nls/scripts/scripts.rbuild C++ compiler now identified by "cxx" modified drivers/storage/ide/uniata/uniata.rbuild modified drivers/wdm/audio/drivers/mpu401/mpu401.rbuild modified drivers/wdm/audio/drm/drmk/drmk.rbuild Disable exceptions and RTTI for kernel mode C++ code modified base/services/umpnpmgr/umpnpmgr.rbuild modified dll/cpl/ncpa/ncpa.rbuild modified dll/directx/amstream/amstream.rbuild modified dll/directx/dinput8/dinput8.rbuild modified dll/directx/dinput/dinput.rbuild modified dll/directx/qedit/qedit.rbuild modified dll/directx/quartz/quartz.rbuild modified dll/win32/advapi32/advapi32.rbuild modified dll/win32/atl/atl.rbuild modified dll/win32/avifil32/avifil32.rbuild modified dll/win32/browseui/browseui.rbuild modified dll/win32/comcat/comcat.rbuild modified dll/win32/crypt32/crypt32.rbuild modified dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild modified dll/win32/imm32/imm32.rbuild modified dll/win32/inetcomm/inetcomm.rbuild modified dll/win32/localspl/localspl.rbuild modified dll/win32/mlang/mlang.rbuild modified dll/win32/msctf/msctf.rbuild modified dll/win32/mshtml/mshtml.rbuild modified dll/win32/msi/msi.rbuild modified dll/win32/mstask/mstask.rbuild modified dll/win32/msxml3/msxml3.rbuild modified dll/win32/ntmarta/ntmarta.rbuild modified dll/win32/objsel/objsel.rbuild modified dll/win32/ole32/ole32.rbuild modified dll/win32/oleaut32/oleaut32.rbuild modified dll/win32/pdh/pdh.rbuild modified dll/win32/rpcrt4/rpcrt4.rbuild modified dll/win32/shell32/shell32.rbuild modified dll/win32/shlwapi/shlwapi.rbuild modified dll/win32/urlmon/urlmon.rbuild modified dll/win32/wuapi/wuapi.rbuild modified include/reactos/idl/idl.rbuild modified dll/win32/kernel32/kernel32.rbuild modified dll/nls/idndl/idndl.rbuild modified lib/nls/idna/idna.rbuild modified lib/nls/normalize/normalize.rbuild modified lib/nls/scripts/scripts.rbuild modified dll/win32/inseng/inseng.rbuild Use instead of for version macros modified base/setup/usetup/usetup.rbuild modified base/system/autochk/autochk.rbuild modified base/system/smss/smss.rbuild modified dll/3rdparty/dxtn/dxtn.rbuild modified dll/keyboard/kbda1/kbda1.rbuild modified dll/keyboard/kbda2/kbda2.rbuild modified dll/keyboard/kbda3/kbda3.rbuild modified dll/keyboard/kbdal/kbdal.rbuild modified dll/keyboard/kbdarme/kbdarme.rbuild modified dll/keyboard/kbdarmw/kbdarmw.rbuild modified dll/keyboard/kbdaze/kbdaze.rbuild modified dll/keyboard/kbdazel/kbdazel.rbuild modified dll/keyboard/kbdbe/kbdbe.rbuild modified dll/keyboard/kbdbga/kbdbga.rbuild modified dll/keyboard/kbdbgm/kbdbgm.rbuild modified dll/keyboard/kbdbgt/kbdbgt.rbuild modified dll/keyboard/kbdblr/kbdblr.rbuild modified dll/keyboard/kbdbr/kbdbr.rbuild modified dll/keyboard/kbdbur/kbdbur.rbuild modified dll/keyboard/kbdcan/kbdcan.rbuild modified dll/keyboard/kbdcr/kbdcr.rbuild modified dll/keyboard/kbdcz1/kbdcz1.rbuild modified dll/keyboard/kbdcz/kbdcz.rbuild modified dll/keyboard/kbdda/kbdda.rbuild modified dll/keyboard/kbddv/kbddv.rbuild modified dll/keyboard/kbdes/kbdes.rbuild modified dll/keyboard/kbdest/kbdest.rbuild modified dll/keyboard/kbdfc/kbdfc.rbuild modified dll/keyboard/kbdfi/kbdfi.rbuild modified dll/keyboard/kbdfr/kbdfr.rbuild modified dll/keyboard/kbdgeo/kbdgeo.rbuild modified dll/keyboard/kbdgerg/kbdgerg.rbuild modified dll/keyboard/kbdgneo/kbdgneo.rbuild modified dll/keyboard/kbdgr/kbdgr.rbuild modified dll/keyboard/kbdgrist/kbdgrist.rbuild modified dll/keyboard/kbdhe/kbdhe.rbuild modified dll/keyboard/kbdheb/kbdheb.rbuild modified dll/keyboard/kbdhu/kbdhu.rbuild modified dll/keyboard/kbdic/kbdic.rbuild modified dll/keyboard/kbdinasa/kbdinasa.rbuild modified dll/keyboard/kbdinben/kbdinben.rbuild modified dll/keyboard/kbdindev/kbdindev.rbuild modified dll/keyboard/kbdinguj/kbdinguj.rbuild modified dll/keyboard/kbdinmal/kbdinmal.rbuild modified dll/keyboard/kbdir/kbdir.rbuild modified dll/keyboard/kbdit/kbdit.rbuild modified dll/keyboard/kbdja/kbdja.rbuild modified dll/keyboard/kbdkaz/kbdkaz.rbuild modified dll/keyboard/kbdko/kbdko.rbuild modified dll/keyboard/kbdla/kbdla.rbuild modified dll/keyboard/kbdlt1/kbdlt1.rbuild modified dll/keyboard/kbdlv/kbdlv.rbuild modified dll/keyboard/kbdmac/kbdmac.rbuild modified dll/keyboard/kbdne/kbdne.rbuild modified dll/keyboard/kbdno/kbdno.rbuild modified dll/keyboard/kbdpl1/kbdpl1.rbuild modified dll/keyboard/kbdpo/kbdpo.rbuild modified dll/keyboard/kbdro/kbdro.rbuild modified dll/keyboard/kbdru1/kbdru1.rbuild modified dll/keyboard/kbdru/kbdru.rbuild modified dll/keyboard/kbdsg/kbdsg.rbuild modified dll/keyboard/kbdsk1/kbdsk1.rbuild modified dll/keyboard/kbdsk/kbdsk.rbuild modified dll/keyboard/kbdsw/kbdsw.rbuild modified dll/keyboard/kbdtat/kbdtat.rbuild modified dll/keyboard/kbdth0/kbdth0.rbuild modified dll/keyboard/kbdth1/kbdth1.rbuild modified dll/keyboard/kbdth2/kbdth2.rbuild modified dll/keyboard/kbdth3/kbdth3.rbuild modified dll/keyboard/kbdtuf/kbdtuf.rbuild modified dll/keyboard/kbdtuq/kbdtuq.rbuild modified dll/keyboard/kbduk/kbduk.rbuild modified dll/keyboard/kbdur/kbdur.rbuild modified dll/keyboard/kbdurs/kbdurs.rbuild modified dll/keyboard/kbdus/kbdus.rbuild modified dll/keyboard/kbdusa/kbdusa.rbuild modified dll/keyboard/kbdusl/kbdusl.rbuild modified dll/keyboard/kbdusr/kbdusr.rbuild modified dll/keyboard/kbdusx/kbdusx.rbuild modified dll/keyboard/kbduzb/kbduzb.rbuild modified dll/keyboard/kbdvntc/kbdvntc.rbuild modified dll/keyboard/kbdycc/kbdycc.rbuild modified dll/keyboard/kbdycl/kbdycl.rbuild modified dll/ntdll/ntdll.rbuild modified dll/win32/crtdll/crtdll.rbuild modified dll/win32/dhcpcsvc/dhcpcsvc.rbuild modified dll/win32/dnsapi/dnsapi.rbuild modified dll/win32/fmifs/fmifs.rbuild modified dll/win32/gdi32/gdi32.rbuild modified dll/win32/lpk/lpk.rbuild modified dll/win32/msvcrt/msvcrt.rbuild modified dll/win32/opengl32/opengl32.rbuild modified dll/win32/psapi/psapi.rbuild modified dll/win32/rasdlg/rasdlg.rbuild modified dll/win32/rasman/rasman.rbuild modified dll/win32/samlib/samlib.rbuild modified dll/win32/shimgvw/shimgvw.rbuild modified dll/win32/smdll/smdll.rbuild modified dll/win32/twain_32/twain_32.rbuild modified dll/win32/uext2/uext2.rbuild modified dll/win32/ufat/ufat.rbuild modified dll/win32/ufatx/ufatx.rbuild modified dll/win32/untfs/untfs.rbuild modified dll/win32/user32/user32.rbuild modified dll/win32/winspool/winspool.rbuild modified dll/win32/ws2_32/ws2_32.rbuild modified dll/win32/ws2help/ws2help.rbuild modified dll/win32/wshirda/wshirda.rbuild modified drivers/directx/dxapi/dxapi.rbuild modified drivers/directx/dxgthk/dxgthk.rbuild modified hal/halarm/generic/generic.rbuild modified hal/halarm/up/halup.rbuild modified hal/halppc/generic/generic.rbuild modified hal/halppc/up/halup.rbuild modified hal/halx86/generic/generic.rbuild modified hal/halx86/hal_generic.rbuild modified hal/halx86/hal_generic_pc.rbuild modified hal/halx86/hal_generic_up.rbuild modified hal/halx86/halmp.rbuild modified hal/halx86/halup.rbuild modified hal/halx86/halxbox.rbuild modified lib/3rdparty/libwine/libwine.rbuild modified lib/epsapi/epsapi.rbuild modified lib/fslib/ext2lib/ext2lib.rbuild modified lib/fslib/ntfslib/ntfslib.rbuild modified lib/fslib/vfatlib/vfatlib.rbuild modified lib/fslib/vfatxlib/vfatxlib.rbuild modified lib/ntdllsys/ntdllsys.rbuild modified lib/sdk/crt/crt.rbuild modified lib/sdk/dxguid/dxguid.rbuild modified lib/sdk/nt/nt.rbuild modified lib/sdk/strmiids/strmiids.rbuild modified lib/sdk/uuid/uuid.rbuild modified lib/smlib/smlib.rbuild modified lib/win32ksys/win32ksys.rbuild modified ntoskrnl/ntoskrnl-generic.rbuild modified subsystems/csr/csrsrv/csrsrv.rbuild modified subsystems/ntvdm/ntvdm.rbuild modified subsystems/win32/csrss/win32csr/win32csr.rbuild modified dll/win32/kernel32/kernel32.rbuild modified lib/drivers/oskittcp/oskittcp.rbuild Goodbye _DISABLE_TIDENTS, __USE_W32API svn path=/trunk/; revision=40538 --- reactos/Makefile | 9 +- reactos/ReactOS-generic.rbuild | 22 +- .../base/services/umpnpmgr/umpnpmgr.rbuild | 2 +- reactos/base/setup/usetup/usetup.rbuild | 1 - reactos/base/system/autochk/autochk.rbuild | 1 - reactos/base/system/smss/smss.rbuild | 1 - reactos/dll/3rdparty/dxtn/dxtn.rbuild | 1 - reactos/dll/cpl/ncpa/ncpa.rbuild | 2 +- reactos/dll/directx/amstream/amstream.rbuild | 2 +- reactos/dll/directx/dinput/dinput.rbuild | 2 +- reactos/dll/directx/dinput8/dinput8.rbuild | 2 +- reactos/dll/directx/qedit/qedit.rbuild | 2 +- reactos/dll/directx/quartz/quartz.rbuild | 2 +- reactos/dll/directx/wine/ddraw/ddraw.rbuild | 3 + .../dll/directx/wine/wined3d/wined3d.rbuild | 1 - reactos/dll/keyboard/kbda1/kbda1.rbuild | 1 - reactos/dll/keyboard/kbda2/kbda2.rbuild | 1 - reactos/dll/keyboard/kbda3/kbda3.rbuild | 1 - reactos/dll/keyboard/kbdal/kbdal.rbuild | 1 - reactos/dll/keyboard/kbdarme/kbdarme.rbuild | 1 - reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild | 1 - reactos/dll/keyboard/kbdaze/kbdaze.rbuild | 1 - reactos/dll/keyboard/kbdazel/kbdazel.rbuild | 1 - reactos/dll/keyboard/kbdbe/kbdbe.rbuild | 1 - reactos/dll/keyboard/kbdbga/kbdbga.rbuild | 1 - reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild | 1 - reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild | 1 - reactos/dll/keyboard/kbdblr/kbdblr.rbuild | 1 - reactos/dll/keyboard/kbdbr/kbdbr.rbuild | 1 - reactos/dll/keyboard/kbdbur/kbdbur.rbuild | 1 - reactos/dll/keyboard/kbdcan/kbdcan.rbuild | 1 - reactos/dll/keyboard/kbdcr/kbdcr.rbuild | 1 - reactos/dll/keyboard/kbdcz/kbdcz.rbuild | 1 - reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild | 1 - reactos/dll/keyboard/kbdda/kbdda.rbuild | 1 - reactos/dll/keyboard/kbddv/kbddv.rbuild | 1 - reactos/dll/keyboard/kbdes/kbdes.rbuild | 1 - reactos/dll/keyboard/kbdest/kbdest.rbuild | 1 - reactos/dll/keyboard/kbdfc/kbdfc.rbuild | 1 - reactos/dll/keyboard/kbdfi/kbdfi.rbuild | 1 - reactos/dll/keyboard/kbdfr/kbdfr.rbuild | 1 - reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild | 1 - reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild | 1 - reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild | 1 - reactos/dll/keyboard/kbdgr/kbdgr.rbuild | 1 - reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild | 1 - reactos/dll/keyboard/kbdhe/kbdhe.rbuild | 1 - reactos/dll/keyboard/kbdheb/kbdheb.rbuild | 1 - reactos/dll/keyboard/kbdhu/kbdhu.rbuild | 1 - reactos/dll/keyboard/kbdic/kbdic.rbuild | 1 - reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild | 1 - reactos/dll/keyboard/kbdinben/kbdinben.rbuild | 1 - reactos/dll/keyboard/kbdindev/kbdindev.rbuild | 1 - reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild | 1 - reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild | 1 - reactos/dll/keyboard/kbdir/kbdir.rbuild | 1 - reactos/dll/keyboard/kbdit/kbdit.rbuild | 1 - reactos/dll/keyboard/kbdja/kbdja.rbuild | 1 - reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild | 1 - reactos/dll/keyboard/kbdko/kbdko.rbuild | 1 - reactos/dll/keyboard/kbdla/kbdla.rbuild | 1 - reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild | 1 - reactos/dll/keyboard/kbdlv/kbdlv.rbuild | 1 - reactos/dll/keyboard/kbdmac/kbdmac.rbuild | 1 - reactos/dll/keyboard/kbdne/kbdne.rbuild | 1 - reactos/dll/keyboard/kbdno/kbdno.rbuild | 1 - reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild | 1 - reactos/dll/keyboard/kbdpo/kbdpo.rbuild | 1 - reactos/dll/keyboard/kbdro/kbdro.rbuild | 1 - reactos/dll/keyboard/kbdru/kbdru.rbuild | 1 - reactos/dll/keyboard/kbdru1/kbdru1.rbuild | 1 - reactos/dll/keyboard/kbdsg/kbdsg.rbuild | 1 - reactos/dll/keyboard/kbdsk/kbdsk.rbuild | 1 - reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild | 1 - reactos/dll/keyboard/kbdsw/kbdsw.rbuild | 1 - reactos/dll/keyboard/kbdtat/kbdtat.rbuild | 1 - reactos/dll/keyboard/kbdth0/kbdth0.rbuild | 1 - reactos/dll/keyboard/kbdth1/kbdth1.rbuild | 1 - reactos/dll/keyboard/kbdth2/kbdth2.rbuild | 1 - reactos/dll/keyboard/kbdth3/kbdth3.rbuild | 1 - reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild | 1 - reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild | 1 - reactos/dll/keyboard/kbduk/kbduk.rbuild | 1 - reactos/dll/keyboard/kbdur/kbdur.rbuild | 1 - reactos/dll/keyboard/kbdurs/kbdurs.rbuild | 1 - reactos/dll/keyboard/kbdus/kbdus.rbuild | 1 - reactos/dll/keyboard/kbdusa/kbdusa.rbuild | 1 - reactos/dll/keyboard/kbdusl/kbdusl.rbuild | 1 - reactos/dll/keyboard/kbdusr/kbdusr.rbuild | 1 - reactos/dll/keyboard/kbdusx/kbdusx.rbuild | 1 - reactos/dll/keyboard/kbduzb/kbduzb.rbuild | 1 - reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild | 1 - reactos/dll/keyboard/kbdycc/kbdycc.rbuild | 1 - reactos/dll/keyboard/kbdycl/kbdycl.rbuild | 1 - reactos/dll/nls/idndl/idndl.rbuild | 6 +- .../dll/nls/idndl_redist/idndl_redist.rbuild | 4 +- .../normaliz_redist/normaliz_redist.rbuild | 4 +- reactos/dll/ntdll/ntdll.rbuild | 1 - reactos/dll/win32/advapi32/advapi32.rbuild | 2 +- reactos/dll/win32/atl/atl.rbuild | 2 +- reactos/dll/win32/avifil32/avifil32.rbuild | 2 +- reactos/dll/win32/browseui/browseui.rbuild | 2 +- reactos/dll/win32/comcat/comcat.rbuild | 2 +- reactos/dll/win32/crtdll/crtdll.rbuild | 1 - reactos/dll/win32/crypt32/crypt32.rbuild | 2 +- reactos/dll/win32/dhcpcsvc/dhcpcsvc.rbuild | 1 - reactos/dll/win32/dnsapi/dnsapi.rbuild | 1 - reactos/dll/win32/fmifs/fmifs.rbuild | 1 - reactos/dll/win32/gdi32/gdi32.rbuild | 1 - .../dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild | 2 +- reactos/dll/win32/imm32/imm32.rbuild | 2 +- reactos/dll/win32/inetcomm/inetcomm.rbuild | 2 +- reactos/dll/win32/inseng/inseng.rbuild | 2 +- reactos/dll/win32/jscript/jscript.rbuild | 2 +- reactos/dll/win32/kernel32/kernel32.rbuild | 8 +- reactos/dll/win32/localspl/localspl.rbuild | 2 +- reactos/dll/win32/lpk/lpk.rbuild | 1 - reactos/dll/win32/mlang/mlang.rbuild | 2 +- reactos/dll/win32/msctf/msctf.rbuild | 2 +- reactos/dll/win32/mshtml/mshtml.rbuild | 2 +- reactos/dll/win32/msi/msi.rbuild | 2 +- reactos/dll/win32/mstask/mstask.rbuild | 4 +- reactos/dll/win32/msvcrt/msvcrt.rbuild | 1 - reactos/dll/win32/msxml3/msxml3.rbuild | 2 +- reactos/dll/win32/ntmarta/ntmarta.rbuild | 2 +- reactos/dll/win32/objsel/objsel.rbuild | 2 +- reactos/dll/win32/ole32/ole32.rbuild | 2 +- reactos/dll/win32/oleaut32/oleaut32.rbuild | 2 +- reactos/dll/win32/opengl32/opengl32.rbuild | 1 - reactos/dll/win32/pdh/pdh.rbuild | 2 +- reactos/dll/win32/psapi/psapi.rbuild | 1 - reactos/dll/win32/rasdlg/rasdlg.rbuild | 1 - reactos/dll/win32/rasman/rasman.rbuild | 1 - reactos/dll/win32/riched20/riched20.rbuild | 1 - reactos/dll/win32/rpcrt4/rpcrt4.rbuild | 2 +- reactos/dll/win32/samlib/samlib.rbuild | 1 - reactos/dll/win32/shell32/shell32.rbuild | 2 +- reactos/dll/win32/shimgvw/shimgvw.rbuild | 1 - reactos/dll/win32/shlwapi/shlwapi.rbuild | 2 +- reactos/dll/win32/smdll/smdll.rbuild | 1 - reactos/dll/win32/twain_32/twain_32.rbuild | 1 - reactos/dll/win32/uext2/uext2.rbuild | 1 - reactos/dll/win32/ufat/ufat.rbuild | 1 - reactos/dll/win32/ufatx/ufatx.rbuild | 1 - reactos/dll/win32/untfs/untfs.rbuild | 1 - reactos/dll/win32/urlmon/urlmon.rbuild | 2 +- reactos/dll/win32/user32/user32.rbuild | 1 - reactos/dll/win32/winspool/winspool.rbuild | 1 - reactos/dll/win32/ws2_32/ws2_32.rbuild | 1 - reactos/dll/win32/ws2help/ws2help.rbuild | 1 - reactos/dll/win32/wshirda/wshirda.rbuild | 1 - reactos/dll/win32/wuapi/wuapi.rbuild | 2 +- reactos/drivers/directx/dxapi/dxapi.rbuild | 1 - reactos/drivers/directx/dxgthk/dxgthk.rbuild | 1 - .../drivers/storage/ide/uniata/uniata.rbuild | 2 + .../wdm/audio/drivers/mpu401/mpu401.rbuild | 2 + .../drivers/wdm/audio/drm/drmk/drmk.rbuild | 2 + reactos/hal/halarm/generic/generic.rbuild | 1 - reactos/hal/halarm/up/halup.rbuild | 1 - reactos/hal/halppc/generic/generic.rbuild | 1 - reactos/hal/halppc/up/halup.rbuild | 1 - reactos/hal/halx86/generic/generic.rbuild | 3 - reactos/hal/halx86/hal_generic.rbuild | 1 - reactos/hal/halx86/hal_generic_pc.rbuild | 1 - reactos/hal/halx86/hal_generic_up.rbuild | 1 - reactos/hal/halx86/halmp.rbuild | 1 - reactos/hal/halx86/halup.rbuild | 1 - reactos/hal/halx86/halxbox.rbuild | 1 - reactos/include/crt/mingw32/intrin.h | 4 + reactos/include/reactos/idl/idl.rbuild | 4 +- reactos/lib/3rdparty/icu4ros/icu4ros.rbuild | 4 +- reactos/lib/3rdparty/libwine/libwine.rbuild | 2 - reactos/lib/drivers/oskittcp/oskittcp.rbuild | 1 - reactos/lib/epsapi/epsapi.rbuild | 1 - reactos/lib/fslib/ext2lib/ext2lib.rbuild | 1 - reactos/lib/fslib/ntfslib/ntfslib.rbuild | 1 - reactos/lib/fslib/vfatlib/vfatlib.rbuild | 1 - reactos/lib/fslib/vfatxlib/vfatxlib.rbuild | 1 - reactos/lib/nls/idna/idna.rbuild | 6 +- reactos/lib/nls/normalize/normalize.rbuild | 8 +- reactos/lib/nls/scripts/scripts.rbuild | 8 +- reactos/lib/ntdllsys/ntdllsys.rbuild | 1 - reactos/lib/sdk/crt/crt.rbuild | 1 - reactos/lib/sdk/dxguid/dxguid.rbuild | 1 - reactos/lib/sdk/nt/nt.rbuild | 1 - reactos/lib/sdk/strmiids/strmiids.rbuild | 1 - reactos/lib/sdk/uuid/uuid.rbuild | 1 - reactos/lib/smlib/smlib.rbuild | 1 - reactos/lib/win32ksys/win32ksys.rbuild | 1 - reactos/ntoskrnl/ntoskrnl-generic.rbuild | 1 - reactos/subsystems/csr/csrsrv/csrsrv.rbuild | 1 - reactos/subsystems/ntvdm/ntvdm.rbuild | 1 - .../win32/csrss/win32csr/win32csr.rbuild | 1 - reactos/tools/rbuild/backend/mingw/mingw.cpp | 188 ++-- reactos/tools/rbuild/backend/mingw/mingw.h | 10 +- .../rbuild/backend/mingw/modulehandler.cpp | 867 ++++++------------ .../rbuild/backend/mingw/modulehandler.h | 17 +- reactos/tools/rbuild/backend/mingw/rules.mak | 454 ++++++++- reactos/tools/rbuild/compilerdirective.cpp | 145 +++ reactos/tools/rbuild/compilerflag.cpp | 17 +- reactos/tools/rbuild/define.cpp | 21 +- reactos/tools/rbuild/include.cpp | 8 + reactos/tools/rbuild/module.cpp | 2 +- reactos/tools/rbuild/pch.h | 1 + reactos/tools/rbuild/project.cpp | 2 +- reactos/tools/rbuild/rbuild.dsp | 18 +- reactos/tools/rbuild/rbuild.h | 37 +- reactos/tools/rbuild/rbuild.mak | 5 + reactos/tools/rbuild/rbuild.vcproj | 24 + 209 files changed, 1144 insertions(+), 985 deletions(-) create mode 100644 reactos/tools/rbuild/compilerdirective.cpp diff --git a/reactos/Makefile b/reactos/Makefile index 1ac53b3def2..7370bfa3735 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -220,12 +220,14 @@ ifeq ($(HALFVERBOSEECHO),yes) ECHO_CC =@echo $(QUOTE)[CC] $<$(QUOTE) ECHO_HOSTCC =@echo $(QUOTE)[HOST-CC] $<$(QUOTE) ECHO_CL =@echo $(QUOTE)[CL] $<$(QUOTE) - ECHO_GAS =@echo $(QUOTE)[GAS] $<$(QUOTE) + ECHO_AS =@echo $(QUOTE)[AS] $<$(QUOTE) ECHO_NASM =@echo $(QUOTE)[NASM] $<$(QUOTE) ECHO_AR =@echo $(QUOTE)[AR] $@$(QUOTE) ECHO_HOSTAR =@echo $(QUOTE)[HOST-AR] $@$(QUOTE) ECHO_WINEBLD =@echo $(QUOTE)[WINEBLD] $@$(QUOTE) ECHO_WRC =@echo $(QUOTE)[WRC] $@$(QUOTE) + ECHO_RC =@echo $(QUOTE)[RC] $@$(QUOTE) + ECHO_CVTRES =@echo $(QUOTE)[CVTRES] $@$(QUOTE) ECHO_WIDL =@echo $(QUOTE)[WIDL] $@$(QUOTE) ECHO_BIN2RES =@echo $(QUOTE)[BIN2RES] $<$(QUOTE) ECHO_DLLTOOL =@echo $(QUOTE)[DLLTOOL] $@$(QUOTE) @@ -256,12 +258,14 @@ else ECHO_CPP = ECHO_CC = ECHO_HOSTCC = - ECHO_GAS = + ECHO_AS = ECHO_NASM = ECHO_AR = ECHO_HOSTAR = ECHO_WINEBLD = ECHO_WRC = + ECHO_RC = + ECHO_CVTRES = ECHO_WIDL = ECHO_BIN2RES = ECHO_DLLTOOL = @@ -315,6 +319,7 @@ ifeq ($(TARGET_CPP),) endif gcc = $(Q)$(TARGET_CC) gpp = $(Q)$(TARGET_CPP) +gas = $(Q)$(TARGET_CC) -x assembler-with-cpp ld = $(Q)$(PREFIX_)ld nm = $(Q)$(PREFIX_)nm objdump = $(Q)$(PREFIX_)objdump diff --git a/reactos/ReactOS-generic.rbuild b/reactos/ReactOS-generic.rbuild index f4915c95289..38310d6149e 100644 --- a/reactos/ReactOS-generic.rbuild +++ b/reactos/ReactOS-generic.rbuild @@ -20,41 +20,41 @@ - 0x400 + 0x400 0x600 - 0x400 + 0x400 0x400 0x400 - 0x500 + 0x500 0x600 - 0x500 + 0x500 0x500 0x500 - 0x501 + 0x501 0x600 - 0x501 + 0x501 0x501 0x501 - 0x502 + 0x502 0x600 - 0x502 + 0x502 0x502 0x502 - 0x600 + 0x600 0x600 - 0x600 + 0x600 0x600 0x600 @@ -121,5 +121,5 @@ - -Wno-non-virtual-dtor + -Wno-non-virtual-dtor diff --git a/reactos/base/services/umpnpmgr/umpnpmgr.rbuild b/reactos/base/services/umpnpmgr/umpnpmgr.rbuild index 6b474c1c14a..36d2d747d01 100644 --- a/reactos/base/services/umpnpmgr/umpnpmgr.rbuild +++ b/reactos/base/services/umpnpmgr/umpnpmgr.rbuild @@ -3,7 +3,7 @@ . . - 0x600 + 0x600 pnp_server ntdll kernel32 diff --git a/reactos/base/setup/usetup/usetup.rbuild b/reactos/base/setup/usetup/usetup.rbuild index a4174698af2..7dc44c1a921 100644 --- a/reactos/base/setup/usetup/usetup.rbuild +++ b/reactos/base/setup/usetup/usetup.rbuild @@ -6,7 +6,6 @@ . . include/reactos/drivers - zlib inflib diff --git a/reactos/base/system/autochk/autochk.rbuild b/reactos/base/system/autochk/autochk.rbuild index 8f287f651d0..f2464aefbd7 100644 --- a/reactos/base/system/autochk/autochk.rbuild +++ b/reactos/base/system/autochk/autochk.rbuild @@ -2,7 +2,6 @@ . - nt ntdll autochk.c diff --git a/reactos/base/system/smss/smss.rbuild b/reactos/base/system/smss/smss.rbuild index 015b5913da4..e305e15f12d 100644 --- a/reactos/base/system/smss/smss.rbuild +++ b/reactos/base/system/smss/smss.rbuild @@ -3,7 +3,6 @@ . include/reactos/subsys - nt smlib ntdll diff --git a/reactos/dll/3rdparty/dxtn/dxtn.rbuild b/reactos/dll/3rdparty/dxtn/dxtn.rbuild index dd49edcfafe..325a5599002 100644 --- a/reactos/dll/3rdparty/dxtn/dxtn.rbuild +++ b/reactos/dll/3rdparty/dxtn/dxtn.rbuild @@ -1,7 +1,6 @@ . - fxt1.c dxtn.c wrapper.c diff --git a/reactos/dll/cpl/ncpa/ncpa.rbuild b/reactos/dll/cpl/ncpa/ncpa.rbuild index 7f3ff1437fc..75ff5ac4c16 100644 --- a/reactos/dll/cpl/ncpa/ncpa.rbuild +++ b/reactos/dll/cpl/ncpa/ncpa.rbuild @@ -4,7 +4,7 @@ . - 0x600 + 0x600 kernel32 advapi32 diff --git a/reactos/dll/directx/amstream/amstream.rbuild b/reactos/dll/directx/amstream/amstream.rbuild index 3411607fbb3..f836a521d22 100644 --- a/reactos/dll/directx/amstream/amstream.rbuild +++ b/reactos/dll/directx/amstream/amstream.rbuild @@ -3,7 +3,7 @@ . include/reactos/wine - 0x600 + 0x600 amstream.c main.c diff --git a/reactos/dll/directx/dinput/dinput.rbuild b/reactos/dll/directx/dinput/dinput.rbuild index 127853bc2b4..ceef78f9dc1 100644 --- a/reactos/dll/directx/dinput/dinput.rbuild +++ b/reactos/dll/directx/dinput/dinput.rbuild @@ -3,7 +3,7 @@ - 0x600 + 0x600 . include/reactos/wine wine diff --git a/reactos/dll/directx/dinput8/dinput8.rbuild b/reactos/dll/directx/dinput8/dinput8.rbuild index 687473cfb79..64a9d2e4aa6 100644 --- a/reactos/dll/directx/dinput8/dinput8.rbuild +++ b/reactos/dll/directx/dinput8/dinput8.rbuild @@ -3,7 +3,7 @@ - 0x600 + 0x600 . include/reactos/wine wine diff --git a/reactos/dll/directx/qedit/qedit.rbuild b/reactos/dll/directx/qedit/qedit.rbuild index 4d08625d79f..5d28c9140ac 100644 --- a/reactos/dll/directx/qedit/qedit.rbuild +++ b/reactos/dll/directx/qedit/qedit.rbuild @@ -3,7 +3,7 @@ . include/reactos/wine - 0x600 + 0x600 main.c mediadet.c diff --git a/reactos/dll/directx/quartz/quartz.rbuild b/reactos/dll/directx/quartz/quartz.rbuild index 381bf1d2d1a..18d70e5084f 100644 --- a/reactos/dll/directx/quartz/quartz.rbuild +++ b/reactos/dll/directx/quartz/quartz.rbuild @@ -6,7 +6,7 @@ . include/reactos/wine - 0x600 + 0x600 wine uuid advapi32 diff --git a/reactos/dll/directx/wine/ddraw/ddraw.rbuild b/reactos/dll/directx/wine/ddraw/ddraw.rbuild index 9f9b1c98f0a..1a09e11c6b2 100644 --- a/reactos/dll/directx/wine/ddraw/ddraw.rbuild +++ b/reactos/dll/directx/wine/ddraw/ddraw.rbuild @@ -40,4 +40,7 @@ viewport.c wineheaders + + + -fno-unit-at-a-time diff --git a/reactos/dll/directx/wine/wined3d/wined3d.rbuild b/reactos/dll/directx/wine/wined3d/wined3d.rbuild index d16f0c1ecd3..9d0f7896853 100644 --- a/reactos/dll/directx/wine/wined3d/wined3d.rbuild +++ b/reactos/dll/directx/wine/wined3d/wined3d.rbuild @@ -2,7 +2,6 @@ - -Wno-format . include/reactos/wine diff --git a/reactos/dll/keyboard/kbda1/kbda1.rbuild b/reactos/dll/keyboard/kbda1/kbda1.rbuild index d21878bfcdc..31d033df20d 100644 --- a/reactos/dll/keyboard/kbda1/kbda1.rbuild +++ b/reactos/dll/keyboard/kbda1/kbda1.rbuild @@ -3,7 +3,6 @@ include - kbda1.c kbda1.rc diff --git a/reactos/dll/keyboard/kbda2/kbda2.rbuild b/reactos/dll/keyboard/kbda2/kbda2.rbuild index b3a1cf5edf7..4cf31ccc2fa 100644 --- a/reactos/dll/keyboard/kbda2/kbda2.rbuild +++ b/reactos/dll/keyboard/kbda2/kbda2.rbuild @@ -3,7 +3,6 @@ include - kbda2.c kbda2.rc diff --git a/reactos/dll/keyboard/kbda3/kbda3.rbuild b/reactos/dll/keyboard/kbda3/kbda3.rbuild index 706f49ef293..9d7c0d09a22 100644 --- a/reactos/dll/keyboard/kbda3/kbda3.rbuild +++ b/reactos/dll/keyboard/kbda3/kbda3.rbuild @@ -3,7 +3,6 @@ include - kbda3.c kbda3.rc diff --git a/reactos/dll/keyboard/kbdal/kbdal.rbuild b/reactos/dll/keyboard/kbdal/kbdal.rbuild index d07739919a9..073cb694d3b 100644 --- a/reactos/dll/keyboard/kbdal/kbdal.rbuild +++ b/reactos/dll/keyboard/kbdal/kbdal.rbuild @@ -3,7 +3,6 @@ include - kbdal.c kbdal.rc diff --git a/reactos/dll/keyboard/kbdarme/kbdarme.rbuild b/reactos/dll/keyboard/kbdarme/kbdarme.rbuild index 4c3cecec6f7..5b057472893 100644 --- a/reactos/dll/keyboard/kbdarme/kbdarme.rbuild +++ b/reactos/dll/keyboard/kbdarme/kbdarme.rbuild @@ -3,7 +3,6 @@ include - kbdarme.c kbdarme.rc diff --git a/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild b/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild index d4537a8838a..2564cceba8f 100644 --- a/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild +++ b/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild @@ -3,7 +3,6 @@ include - kbdarmw.c kbdarmw.rc diff --git a/reactos/dll/keyboard/kbdaze/kbdaze.rbuild b/reactos/dll/keyboard/kbdaze/kbdaze.rbuild index 4e68b5fda32..dc9396f2a7b 100644 --- a/reactos/dll/keyboard/kbdaze/kbdaze.rbuild +++ b/reactos/dll/keyboard/kbdaze/kbdaze.rbuild @@ -3,7 +3,6 @@ include - kbdaze.c kbdaze.rc diff --git a/reactos/dll/keyboard/kbdazel/kbdazel.rbuild b/reactos/dll/keyboard/kbdazel/kbdazel.rbuild index 9237dc3574b..bce7694060b 100644 --- a/reactos/dll/keyboard/kbdazel/kbdazel.rbuild +++ b/reactos/dll/keyboard/kbdazel/kbdazel.rbuild @@ -3,7 +3,6 @@ include - kbdazel.c kbdazel.rc diff --git a/reactos/dll/keyboard/kbdbe/kbdbe.rbuild b/reactos/dll/keyboard/kbdbe/kbdbe.rbuild index e6970dc79ac..7e5eb929eef 100644 --- a/reactos/dll/keyboard/kbdbe/kbdbe.rbuild +++ b/reactos/dll/keyboard/kbdbe/kbdbe.rbuild @@ -3,7 +3,6 @@ include - kbdbe.c kbdbe.rc diff --git a/reactos/dll/keyboard/kbdbga/kbdbga.rbuild b/reactos/dll/keyboard/kbdbga/kbdbga.rbuild index 1c0ec909d1b..544bb45d3c1 100644 --- a/reactos/dll/keyboard/kbdbga/kbdbga.rbuild +++ b/reactos/dll/keyboard/kbdbga/kbdbga.rbuild @@ -3,7 +3,6 @@ include - kbdbga.c kbdbga.rc diff --git a/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild b/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild index a7ff22d6d47..8b55a01f338 100644 --- a/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild +++ b/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild @@ -3,7 +3,6 @@ include - kbdbgm.c kbdbgm.rc diff --git a/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild b/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild index 1be0f36aef3..63592e5071f 100644 --- a/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild +++ b/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild @@ -3,7 +3,6 @@ include - kbdbgt.c kbdbgt.rc diff --git a/reactos/dll/keyboard/kbdblr/kbdblr.rbuild b/reactos/dll/keyboard/kbdblr/kbdblr.rbuild index 4124f943ad4..21815ed16d8 100644 --- a/reactos/dll/keyboard/kbdblr/kbdblr.rbuild +++ b/reactos/dll/keyboard/kbdblr/kbdblr.rbuild @@ -3,7 +3,6 @@ include - kbdblr.c kbdblr.rc diff --git a/reactos/dll/keyboard/kbdbr/kbdbr.rbuild b/reactos/dll/keyboard/kbdbr/kbdbr.rbuild index 245bc53c28f..72ff9aba4bf 100644 --- a/reactos/dll/keyboard/kbdbr/kbdbr.rbuild +++ b/reactos/dll/keyboard/kbdbr/kbdbr.rbuild @@ -3,7 +3,6 @@ include - kbdbr.c kbdbr.rc diff --git a/reactos/dll/keyboard/kbdbur/kbdbur.rbuild b/reactos/dll/keyboard/kbdbur/kbdbur.rbuild index b273739a0a2..a452a072baf 100644 --- a/reactos/dll/keyboard/kbdbur/kbdbur.rbuild +++ b/reactos/dll/keyboard/kbdbur/kbdbur.rbuild @@ -3,7 +3,6 @@ include - kbdbur.c kbdbur.rc diff --git a/reactos/dll/keyboard/kbdcan/kbdcan.rbuild b/reactos/dll/keyboard/kbdcan/kbdcan.rbuild index a599c0c1b4c..31a1183dbd1 100644 --- a/reactos/dll/keyboard/kbdcan/kbdcan.rbuild +++ b/reactos/dll/keyboard/kbdcan/kbdcan.rbuild @@ -3,7 +3,6 @@ include - kbdcan.c kbdcan.rc diff --git a/reactos/dll/keyboard/kbdcr/kbdcr.rbuild b/reactos/dll/keyboard/kbdcr/kbdcr.rbuild index 04d8b7fb587..32784f9fcc7 100644 --- a/reactos/dll/keyboard/kbdcr/kbdcr.rbuild +++ b/reactos/dll/keyboard/kbdcr/kbdcr.rbuild @@ -3,7 +3,6 @@ include - kbdcr.c kbdcr.rc diff --git a/reactos/dll/keyboard/kbdcz/kbdcz.rbuild b/reactos/dll/keyboard/kbdcz/kbdcz.rbuild index a1da5823b65..639fbc85650 100644 --- a/reactos/dll/keyboard/kbdcz/kbdcz.rbuild +++ b/reactos/dll/keyboard/kbdcz/kbdcz.rbuild @@ -3,7 +3,6 @@ include - kbdcz.c kbdcz.rc diff --git a/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild b/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild index 004eae0b170..01a3ed1c5e4 100644 --- a/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild +++ b/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild @@ -3,7 +3,6 @@ include - kbdcz1.c kbdcz1.rc diff --git a/reactos/dll/keyboard/kbdda/kbdda.rbuild b/reactos/dll/keyboard/kbdda/kbdda.rbuild index 655cfa86217..4c6337a199a 100644 --- a/reactos/dll/keyboard/kbdda/kbdda.rbuild +++ b/reactos/dll/keyboard/kbdda/kbdda.rbuild @@ -3,7 +3,6 @@ include - kbdda.c kbdda.rc diff --git a/reactos/dll/keyboard/kbddv/kbddv.rbuild b/reactos/dll/keyboard/kbddv/kbddv.rbuild index c67a0a6a26c..5acfd24e375 100644 --- a/reactos/dll/keyboard/kbddv/kbddv.rbuild +++ b/reactos/dll/keyboard/kbddv/kbddv.rbuild @@ -3,7 +3,6 @@ include - kbddv.c kbddv.rc diff --git a/reactos/dll/keyboard/kbdes/kbdes.rbuild b/reactos/dll/keyboard/kbdes/kbdes.rbuild index fa3363c9fa8..b580af90812 100644 --- a/reactos/dll/keyboard/kbdes/kbdes.rbuild +++ b/reactos/dll/keyboard/kbdes/kbdes.rbuild @@ -3,7 +3,6 @@ include - kbdes.c kbdes.rc diff --git a/reactos/dll/keyboard/kbdest/kbdest.rbuild b/reactos/dll/keyboard/kbdest/kbdest.rbuild index f898f9b8375..b979a0c1683 100644 --- a/reactos/dll/keyboard/kbdest/kbdest.rbuild +++ b/reactos/dll/keyboard/kbdest/kbdest.rbuild @@ -3,7 +3,6 @@ include - kbdest.c kbdest.rc diff --git a/reactos/dll/keyboard/kbdfc/kbdfc.rbuild b/reactos/dll/keyboard/kbdfc/kbdfc.rbuild index bd8a500e439..9459811080e 100644 --- a/reactos/dll/keyboard/kbdfc/kbdfc.rbuild +++ b/reactos/dll/keyboard/kbdfc/kbdfc.rbuild @@ -3,7 +3,6 @@ include - kbdfc.c kbdfc.rc diff --git a/reactos/dll/keyboard/kbdfi/kbdfi.rbuild b/reactos/dll/keyboard/kbdfi/kbdfi.rbuild index 4f6321f54dc..1089de6ec74 100644 --- a/reactos/dll/keyboard/kbdfi/kbdfi.rbuild +++ b/reactos/dll/keyboard/kbdfi/kbdfi.rbuild @@ -3,7 +3,6 @@ include - kbdfi.c kbdfi.rc diff --git a/reactos/dll/keyboard/kbdfr/kbdfr.rbuild b/reactos/dll/keyboard/kbdfr/kbdfr.rbuild index 048e1215d5b..f6319af96de 100644 --- a/reactos/dll/keyboard/kbdfr/kbdfr.rbuild +++ b/reactos/dll/keyboard/kbdfr/kbdfr.rbuild @@ -3,7 +3,6 @@ include - kbdfr.c kbdfr.rc diff --git a/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild b/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild index f69c36fe323..853dbb48fd6 100644 --- a/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild +++ b/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild @@ -3,7 +3,6 @@ include - kbdgeo.c kbdgeo.rc diff --git a/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild b/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild index 2f6474028f0..684cdcee39f 100644 --- a/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild +++ b/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild @@ -3,7 +3,6 @@ include - kbdgerg.c kbdgerg.rc diff --git a/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild b/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild index 9c5c381aff6..4b43e916f32 100644 --- a/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild +++ b/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild @@ -3,7 +3,6 @@ include - kbdgneo.c kbdgneo.rc diff --git a/reactos/dll/keyboard/kbdgr/kbdgr.rbuild b/reactos/dll/keyboard/kbdgr/kbdgr.rbuild index dce5253b974..246cfb386df 100644 --- a/reactos/dll/keyboard/kbdgr/kbdgr.rbuild +++ b/reactos/dll/keyboard/kbdgr/kbdgr.rbuild @@ -3,7 +3,6 @@ include - kbdgr.c kbdgr.rc diff --git a/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild b/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild index 6b67df677bb..e8978cf7a2f 100644 --- a/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild +++ b/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild @@ -3,7 +3,6 @@ include - kbdgrist.c kbdgrist.rc diff --git a/reactos/dll/keyboard/kbdhe/kbdhe.rbuild b/reactos/dll/keyboard/kbdhe/kbdhe.rbuild index 1666ba76623..32f2b711484 100644 --- a/reactos/dll/keyboard/kbdhe/kbdhe.rbuild +++ b/reactos/dll/keyboard/kbdhe/kbdhe.rbuild @@ -3,7 +3,6 @@ include - kbdhe.c kbdhe.rc diff --git a/reactos/dll/keyboard/kbdheb/kbdheb.rbuild b/reactos/dll/keyboard/kbdheb/kbdheb.rbuild index 3a202ea3bbf..8320aa495ab 100644 --- a/reactos/dll/keyboard/kbdheb/kbdheb.rbuild +++ b/reactos/dll/keyboard/kbdheb/kbdheb.rbuild @@ -3,7 +3,6 @@ include - kbdheb.c kbdheb.rc diff --git a/reactos/dll/keyboard/kbdhu/kbdhu.rbuild b/reactos/dll/keyboard/kbdhu/kbdhu.rbuild index e99544b39a6..dd1a3b69a65 100644 --- a/reactos/dll/keyboard/kbdhu/kbdhu.rbuild +++ b/reactos/dll/keyboard/kbdhu/kbdhu.rbuild @@ -3,7 +3,6 @@ include - kbdhu.c kbdhu.rc diff --git a/reactos/dll/keyboard/kbdic/kbdic.rbuild b/reactos/dll/keyboard/kbdic/kbdic.rbuild index 060fda62231..c784c17dace 100644 --- a/reactos/dll/keyboard/kbdic/kbdic.rbuild +++ b/reactos/dll/keyboard/kbdic/kbdic.rbuild @@ -3,7 +3,6 @@ include - kbdic.c kbdic.rc diff --git a/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild b/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild index 108c8afd155..bf312f1a57c 100644 --- a/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild +++ b/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild @@ -3,7 +3,6 @@ include - kbdinasa.c kbdinasa.rc diff --git a/reactos/dll/keyboard/kbdinben/kbdinben.rbuild b/reactos/dll/keyboard/kbdinben/kbdinben.rbuild index ab3ece5a624..72bd07de614 100644 --- a/reactos/dll/keyboard/kbdinben/kbdinben.rbuild +++ b/reactos/dll/keyboard/kbdinben/kbdinben.rbuild @@ -3,7 +3,6 @@ include - kbdinben.c kbdinben.rc diff --git a/reactos/dll/keyboard/kbdindev/kbdindev.rbuild b/reactos/dll/keyboard/kbdindev/kbdindev.rbuild index 4fcd9ddf97a..67b110409bc 100644 --- a/reactos/dll/keyboard/kbdindev/kbdindev.rbuild +++ b/reactos/dll/keyboard/kbdindev/kbdindev.rbuild @@ -3,7 +3,6 @@ include - kbdindev.c kbdindev.rc diff --git a/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild b/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild index 949c0c316d8..c584273dfc2 100644 --- a/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild +++ b/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild @@ -3,7 +3,6 @@ include - kbdinguj.c kbdinguj.rc diff --git a/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild b/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild index e654261f9ad..48304136ee0 100644 --- a/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild +++ b/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild @@ -3,7 +3,6 @@ include - kbdinmal.c kbdinmal.rc diff --git a/reactos/dll/keyboard/kbdir/kbdir.rbuild b/reactos/dll/keyboard/kbdir/kbdir.rbuild index 01d5f2d7339..787f7d58e6f 100644 --- a/reactos/dll/keyboard/kbdir/kbdir.rbuild +++ b/reactos/dll/keyboard/kbdir/kbdir.rbuild @@ -3,7 +3,6 @@ include - kbdir.c kbdir.rc diff --git a/reactos/dll/keyboard/kbdit/kbdit.rbuild b/reactos/dll/keyboard/kbdit/kbdit.rbuild index de85dfe61b5..136233af040 100644 --- a/reactos/dll/keyboard/kbdit/kbdit.rbuild +++ b/reactos/dll/keyboard/kbdit/kbdit.rbuild @@ -3,7 +3,6 @@ include - kbdit.c kbdit.rc diff --git a/reactos/dll/keyboard/kbdja/kbdja.rbuild b/reactos/dll/keyboard/kbdja/kbdja.rbuild index 96b5478f30e..40e6b663adc 100644 --- a/reactos/dll/keyboard/kbdja/kbdja.rbuild +++ b/reactos/dll/keyboard/kbdja/kbdja.rbuild @@ -3,7 +3,6 @@ include - kbdja.c kbdja.rc diff --git a/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild b/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild index 4ea0dedef4a..3aba85c86c5 100644 --- a/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild +++ b/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild @@ -3,7 +3,6 @@ include - kbdkaz.c kbdkaz.rc diff --git a/reactos/dll/keyboard/kbdko/kbdko.rbuild b/reactos/dll/keyboard/kbdko/kbdko.rbuild index 19bcb0fa014..a448d4fb8a5 100644 --- a/reactos/dll/keyboard/kbdko/kbdko.rbuild +++ b/reactos/dll/keyboard/kbdko/kbdko.rbuild @@ -3,7 +3,6 @@ include - kbdko.c kbdko.rc diff --git a/reactos/dll/keyboard/kbdla/kbdla.rbuild b/reactos/dll/keyboard/kbdla/kbdla.rbuild index c6dc9ff7b84..543e4c23669 100644 --- a/reactos/dll/keyboard/kbdla/kbdla.rbuild +++ b/reactos/dll/keyboard/kbdla/kbdla.rbuild @@ -3,7 +3,6 @@ include - kbdla.c kbdla.rc diff --git a/reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild b/reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild index 20f79ffbc35..e65ce45c29e 100644 --- a/reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild +++ b/reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild @@ -3,7 +3,6 @@ include - kbdlt1.c kbdlt1.rc diff --git a/reactos/dll/keyboard/kbdlv/kbdlv.rbuild b/reactos/dll/keyboard/kbdlv/kbdlv.rbuild index d832f6b5a3d..20e5c90abf8 100644 --- a/reactos/dll/keyboard/kbdlv/kbdlv.rbuild +++ b/reactos/dll/keyboard/kbdlv/kbdlv.rbuild @@ -3,7 +3,6 @@ include - kbdlv.c kbdlv.rc diff --git a/reactos/dll/keyboard/kbdmac/kbdmac.rbuild b/reactos/dll/keyboard/kbdmac/kbdmac.rbuild index dd11d036d8a..f6d2ed58ead 100644 --- a/reactos/dll/keyboard/kbdmac/kbdmac.rbuild +++ b/reactos/dll/keyboard/kbdmac/kbdmac.rbuild @@ -3,7 +3,6 @@ include - kbdmac.c kbdmac.rc diff --git a/reactos/dll/keyboard/kbdne/kbdne.rbuild b/reactos/dll/keyboard/kbdne/kbdne.rbuild index 6ae67a41598..6eab2d336d2 100644 --- a/reactos/dll/keyboard/kbdne/kbdne.rbuild +++ b/reactos/dll/keyboard/kbdne/kbdne.rbuild @@ -3,7 +3,6 @@ include - kbdne.c kbdne.rc diff --git a/reactos/dll/keyboard/kbdno/kbdno.rbuild b/reactos/dll/keyboard/kbdno/kbdno.rbuild index 144cbac3f3f..49e0b73be9a 100644 --- a/reactos/dll/keyboard/kbdno/kbdno.rbuild +++ b/reactos/dll/keyboard/kbdno/kbdno.rbuild @@ -3,7 +3,6 @@ include - kbdno.c kbdno.rc diff --git a/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild b/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild index 1f8afcb5696..36b4b2e4bbd 100644 --- a/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild +++ b/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild @@ -3,7 +3,6 @@ include - kbdpl1.c kbdpl1.rc diff --git a/reactos/dll/keyboard/kbdpo/kbdpo.rbuild b/reactos/dll/keyboard/kbdpo/kbdpo.rbuild index 1630eeac082..c8c4002c694 100644 --- a/reactos/dll/keyboard/kbdpo/kbdpo.rbuild +++ b/reactos/dll/keyboard/kbdpo/kbdpo.rbuild @@ -3,7 +3,6 @@ include - kbdpo.c kbdpo.rc diff --git a/reactos/dll/keyboard/kbdro/kbdro.rbuild b/reactos/dll/keyboard/kbdro/kbdro.rbuild index 7ea37f79f21..f8e7af61dab 100644 --- a/reactos/dll/keyboard/kbdro/kbdro.rbuild +++ b/reactos/dll/keyboard/kbdro/kbdro.rbuild @@ -3,7 +3,6 @@ include - kbdro.c kbdro.rc diff --git a/reactos/dll/keyboard/kbdru/kbdru.rbuild b/reactos/dll/keyboard/kbdru/kbdru.rbuild index d49aebb6c3c..95a66419919 100644 --- a/reactos/dll/keyboard/kbdru/kbdru.rbuild +++ b/reactos/dll/keyboard/kbdru/kbdru.rbuild @@ -3,7 +3,6 @@ include - kbdru.c kbdru.rc diff --git a/reactos/dll/keyboard/kbdru1/kbdru1.rbuild b/reactos/dll/keyboard/kbdru1/kbdru1.rbuild index a71d3e87e70..150ebaf717c 100644 --- a/reactos/dll/keyboard/kbdru1/kbdru1.rbuild +++ b/reactos/dll/keyboard/kbdru1/kbdru1.rbuild @@ -3,7 +3,6 @@ include - kbdru1.c kbdru1.rc diff --git a/reactos/dll/keyboard/kbdsg/kbdsg.rbuild b/reactos/dll/keyboard/kbdsg/kbdsg.rbuild index 56cde304e04..4c5ac0c6f44 100644 --- a/reactos/dll/keyboard/kbdsg/kbdsg.rbuild +++ b/reactos/dll/keyboard/kbdsg/kbdsg.rbuild @@ -3,7 +3,6 @@ include - kbdsg.c kbdsg.rc diff --git a/reactos/dll/keyboard/kbdsk/kbdsk.rbuild b/reactos/dll/keyboard/kbdsk/kbdsk.rbuild index 37929936f57..fb0a45c982b 100644 --- a/reactos/dll/keyboard/kbdsk/kbdsk.rbuild +++ b/reactos/dll/keyboard/kbdsk/kbdsk.rbuild @@ -3,7 +3,6 @@ include - kbdsk.c kbdsk.rc diff --git a/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild b/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild index 35ada294241..8ff34acbfe5 100644 --- a/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild +++ b/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild @@ -3,7 +3,6 @@ include - kbdsk1.c kbdsk1.rc diff --git a/reactos/dll/keyboard/kbdsw/kbdsw.rbuild b/reactos/dll/keyboard/kbdsw/kbdsw.rbuild index 164576462d5..137fff9a3b9 100644 --- a/reactos/dll/keyboard/kbdsw/kbdsw.rbuild +++ b/reactos/dll/keyboard/kbdsw/kbdsw.rbuild @@ -3,7 +3,6 @@ include - kbdsw.c kbdsw.rc diff --git a/reactos/dll/keyboard/kbdtat/kbdtat.rbuild b/reactos/dll/keyboard/kbdtat/kbdtat.rbuild index 52e17cf0618..e6f23cdd4bb 100644 --- a/reactos/dll/keyboard/kbdtat/kbdtat.rbuild +++ b/reactos/dll/keyboard/kbdtat/kbdtat.rbuild @@ -3,7 +3,6 @@ include - kbdtat.c kbdtat.rc diff --git a/reactos/dll/keyboard/kbdth0/kbdth0.rbuild b/reactos/dll/keyboard/kbdth0/kbdth0.rbuild index 19c88fab78c..af6bbfe3a4f 100644 --- a/reactos/dll/keyboard/kbdth0/kbdth0.rbuild +++ b/reactos/dll/keyboard/kbdth0/kbdth0.rbuild @@ -3,7 +3,6 @@ include - kbdth0.c kbdth0.rc diff --git a/reactos/dll/keyboard/kbdth1/kbdth1.rbuild b/reactos/dll/keyboard/kbdth1/kbdth1.rbuild index cba8a7cfda0..50a76792692 100644 --- a/reactos/dll/keyboard/kbdth1/kbdth1.rbuild +++ b/reactos/dll/keyboard/kbdth1/kbdth1.rbuild @@ -3,7 +3,6 @@ include - kbdth1.c kbdth1.rc diff --git a/reactos/dll/keyboard/kbdth2/kbdth2.rbuild b/reactos/dll/keyboard/kbdth2/kbdth2.rbuild index bc12af6f78a..b86aa31e287 100644 --- a/reactos/dll/keyboard/kbdth2/kbdth2.rbuild +++ b/reactos/dll/keyboard/kbdth2/kbdth2.rbuild @@ -3,7 +3,6 @@ include - kbdth2.c kbdth2.rc diff --git a/reactos/dll/keyboard/kbdth3/kbdth3.rbuild b/reactos/dll/keyboard/kbdth3/kbdth3.rbuild index 1488a51a595..e166f086a7b 100644 --- a/reactos/dll/keyboard/kbdth3/kbdth3.rbuild +++ b/reactos/dll/keyboard/kbdth3/kbdth3.rbuild @@ -3,7 +3,6 @@ include - kbdth3.c kbdth3.rc diff --git a/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild b/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild index 0e51c022443..56efedbfa26 100644 --- a/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild +++ b/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild @@ -3,7 +3,6 @@ include - kbdtuf.c kbdtuf.rc diff --git a/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild b/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild index 65de4c0b95a..58281d92cb2 100644 --- a/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild +++ b/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild @@ -3,7 +3,6 @@ include - kbdtuq.c kbdtuq.rc diff --git a/reactos/dll/keyboard/kbduk/kbduk.rbuild b/reactos/dll/keyboard/kbduk/kbduk.rbuild index 0e627d42288..ac8308b98b5 100644 --- a/reactos/dll/keyboard/kbduk/kbduk.rbuild +++ b/reactos/dll/keyboard/kbduk/kbduk.rbuild @@ -3,7 +3,6 @@ include - kbduk.c kbduk.rc diff --git a/reactos/dll/keyboard/kbdur/kbdur.rbuild b/reactos/dll/keyboard/kbdur/kbdur.rbuild index d12c96610c6..3de98772b7a 100644 --- a/reactos/dll/keyboard/kbdur/kbdur.rbuild +++ b/reactos/dll/keyboard/kbdur/kbdur.rbuild @@ -3,7 +3,6 @@ include - kbdur.c kbdur.rc diff --git a/reactos/dll/keyboard/kbdurs/kbdurs.rbuild b/reactos/dll/keyboard/kbdurs/kbdurs.rbuild index 32487048465..e92e36929dd 100644 --- a/reactos/dll/keyboard/kbdurs/kbdurs.rbuild +++ b/reactos/dll/keyboard/kbdurs/kbdurs.rbuild @@ -3,7 +3,6 @@ include - kbdurs.c kbdurs.rc diff --git a/reactos/dll/keyboard/kbdus/kbdus.rbuild b/reactos/dll/keyboard/kbdus/kbdus.rbuild index 087d453d8fe..88b0f3cc717 100644 --- a/reactos/dll/keyboard/kbdus/kbdus.rbuild +++ b/reactos/dll/keyboard/kbdus/kbdus.rbuild @@ -3,7 +3,6 @@ include - kbdus.c kbdus.rc diff --git a/reactos/dll/keyboard/kbdusa/kbdusa.rbuild b/reactos/dll/keyboard/kbdusa/kbdusa.rbuild index d38ccd1a67c..74af4683131 100644 --- a/reactos/dll/keyboard/kbdusa/kbdusa.rbuild +++ b/reactos/dll/keyboard/kbdusa/kbdusa.rbuild @@ -3,7 +3,6 @@ include - kbdusa.c kbdusa.rc diff --git a/reactos/dll/keyboard/kbdusl/kbdusl.rbuild b/reactos/dll/keyboard/kbdusl/kbdusl.rbuild index 792c77911ad..5cab9fa3c69 100644 --- a/reactos/dll/keyboard/kbdusl/kbdusl.rbuild +++ b/reactos/dll/keyboard/kbdusl/kbdusl.rbuild @@ -3,7 +3,6 @@ include - kbdusl.c kbdusl.rc diff --git a/reactos/dll/keyboard/kbdusr/kbdusr.rbuild b/reactos/dll/keyboard/kbdusr/kbdusr.rbuild index 6ab80b150f9..5be90099a4f 100644 --- a/reactos/dll/keyboard/kbdusr/kbdusr.rbuild +++ b/reactos/dll/keyboard/kbdusr/kbdusr.rbuild @@ -3,7 +3,6 @@ include - kbdusr.c kbdusr.rc diff --git a/reactos/dll/keyboard/kbdusx/kbdusx.rbuild b/reactos/dll/keyboard/kbdusx/kbdusx.rbuild index e23ca9260ee..1cc3aa2ae50 100644 --- a/reactos/dll/keyboard/kbdusx/kbdusx.rbuild +++ b/reactos/dll/keyboard/kbdusx/kbdusx.rbuild @@ -3,7 +3,6 @@ include - kbdusx.c kbdusx.rc diff --git a/reactos/dll/keyboard/kbduzb/kbduzb.rbuild b/reactos/dll/keyboard/kbduzb/kbduzb.rbuild index ba6fd5e061a..90a11665813 100644 --- a/reactos/dll/keyboard/kbduzb/kbduzb.rbuild +++ b/reactos/dll/keyboard/kbduzb/kbduzb.rbuild @@ -3,7 +3,6 @@ include - kbduzb.c kbduzb.rc diff --git a/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild b/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild index 66c82a51272..65566f9c2a9 100644 --- a/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild +++ b/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild @@ -3,7 +3,6 @@ include - kbdvntc.c kbdvntc.rc diff --git a/reactos/dll/keyboard/kbdycc/kbdycc.rbuild b/reactos/dll/keyboard/kbdycc/kbdycc.rbuild index 2be63d9db69..36fe9bf4a80 100644 --- a/reactos/dll/keyboard/kbdycc/kbdycc.rbuild +++ b/reactos/dll/keyboard/kbdycc/kbdycc.rbuild @@ -3,7 +3,6 @@ include - kbdycc.c kbdycc.rc diff --git a/reactos/dll/keyboard/kbdycl/kbdycl.rbuild b/reactos/dll/keyboard/kbdycl/kbdycl.rbuild index f79c1e7ec6c..f188c314195 100644 --- a/reactos/dll/keyboard/kbdycl/kbdycl.rbuild +++ b/reactos/dll/keyboard/kbdycl/kbdycl.rbuild @@ -3,7 +3,6 @@ include - kbdycl.c kbdycl.rc diff --git a/reactos/dll/nls/idndl/idndl.rbuild b/reactos/dll/nls/idndl/idndl.rbuild index 9da63547a4c..562fb5e0dcb 100644 --- a/reactos/dll/nls/idndl/idndl.rbuild +++ b/reactos/dll/nls/idndl/idndl.rbuild @@ -2,9 +2,9 @@ kernel32 - -fno-exceptions - -fno-rtti - 0x600 + -fno-exceptions + -fno-rtti + 0x600 idndl.cpp diff --git a/reactos/dll/nls/idndl_redist/idndl_redist.rbuild b/reactos/dll/nls/idndl_redist/idndl_redist.rbuild index b5826dcf817..1fb4dbfcab6 100644 --- a/reactos/dll/nls/idndl_redist/idndl_redist.rbuild +++ b/reactos/dll/nls/idndl_redist/idndl_redist.rbuild @@ -3,8 +3,8 @@ kernel32 scripts - -fno-exceptions - -fno-rtti + -fno-exceptions + -fno-rtti --entry=0 icu/source/common . diff --git a/reactos/dll/nls/normaliz_redist/normaliz_redist.rbuild b/reactos/dll/nls/normaliz_redist/normaliz_redist.rbuild index 2876cc0602a..7f37225aa4c 100644 --- a/reactos/dll/nls/normaliz_redist/normaliz_redist.rbuild +++ b/reactos/dll/nls/normaliz_redist/normaliz_redist.rbuild @@ -9,8 +9,8 @@ idna normaliz_redist_data kernel32 - -fno-exceptions - -fno-rtti + -fno-exceptions + -fno-rtti icu/source/common normaliz.cpp diff --git a/reactos/dll/ntdll/ntdll.rbuild b/reactos/dll/ntdll/ntdll.rbuild index 124e2e4c84b..0ed2710a86f 100644 --- a/reactos/dll/ntdll/ntdll.rbuild +++ b/reactos/dll/ntdll/ntdll.rbuild @@ -11,7 +11,6 @@ include/reactos/subsys - rtl diff --git a/reactos/dll/win32/advapi32/advapi32.rbuild b/reactos/dll/win32/advapi32/advapi32.rbuild index bf1e94b67f9..50e4872178c 100644 --- a/reactos/dll/win32/advapi32/advapi32.rbuild +++ b/reactos/dll/win32/advapi32/advapi32.rbuild @@ -6,7 +6,7 @@ . . - 0x600 + 0x600 scm_client diff --git a/reactos/dll/win32/atl/atl.rbuild b/reactos/dll/win32/atl/atl.rbuild index e98915e4d72..6bb3a5c9cf2 100644 --- a/reactos/dll/win32/atl/atl.rbuild +++ b/reactos/dll/win32/atl/atl.rbuild @@ -7,7 +7,7 @@ . include/reactos/wine - 0x600 + 0x600 atl_ax.c atl_main.c registrar.c diff --git a/reactos/dll/win32/avifil32/avifil32.rbuild b/reactos/dll/win32/avifil32/avifil32.rbuild index 49e524cf776..864b1332c92 100644 --- a/reactos/dll/win32/avifil32/avifil32.rbuild +++ b/reactos/dll/win32/avifil32/avifil32.rbuild @@ -7,7 +7,7 @@ . include/reactos/wine - 0x600 + 0x600 acmstream.c api.c avifile.c diff --git a/reactos/dll/win32/browseui/browseui.rbuild b/reactos/dll/win32/browseui/browseui.rbuild index 881c743135c..8a3a2890a08 100644 --- a/reactos/dll/win32/browseui/browseui.rbuild +++ b/reactos/dll/win32/browseui/browseui.rbuild @@ -7,7 +7,7 @@ include/reactos/wine . - 0x600 + 0x600 wine ole32 user32 diff --git a/reactos/dll/win32/comcat/comcat.rbuild b/reactos/dll/win32/comcat/comcat.rbuild index 1d936cb2e95..8355869930c 100644 --- a/reactos/dll/win32/comcat/comcat.rbuild +++ b/reactos/dll/win32/comcat/comcat.rbuild @@ -6,7 +6,7 @@ . include/reactos/wine - 0x600 + 0x600 wine ole32 user32 diff --git a/reactos/dll/win32/crtdll/crtdll.rbuild b/reactos/dll/win32/crtdll/crtdll.rbuild index dbc55549801..47d0fdeaada 100644 --- a/reactos/dll/win32/crtdll/crtdll.rbuild +++ b/reactos/dll/win32/crtdll/crtdll.rbuild @@ -2,7 +2,6 @@ . include - diff --git a/reactos/dll/win32/crypt32/crypt32.rbuild b/reactos/dll/win32/crypt32/crypt32.rbuild index bb613bf4d37..3c276b9ad8e 100644 --- a/reactos/dll/win32/crypt32/crypt32.rbuild +++ b/reactos/dll/win32/crypt32/crypt32.rbuild @@ -3,7 +3,7 @@ . include/reactos/wine - 0x600 + 0x600 wine user32 advapi32 diff --git a/reactos/dll/win32/dhcpcsvc/dhcpcsvc.rbuild b/reactos/dll/win32/dhcpcsvc/dhcpcsvc.rbuild index d664f66aea5..3f850f22f27 100644 --- a/reactos/dll/win32/dhcpcsvc/dhcpcsvc.rbuild +++ b/reactos/dll/win32/dhcpcsvc/dhcpcsvc.rbuild @@ -1,7 +1,6 @@ include - ntdll kernel32 ws2_32 diff --git a/reactos/dll/win32/dnsapi/dnsapi.rbuild b/reactos/dll/win32/dnsapi/dnsapi.rbuild index 9b65fc570be..08acd54a22a 100644 --- a/reactos/dll/win32/dnsapi/dnsapi.rbuild +++ b/reactos/dll/win32/dnsapi/dnsapi.rbuild @@ -3,7 +3,6 @@ include src adns_win32 - adns ntdll diff --git a/reactos/dll/win32/fmifs/fmifs.rbuild b/reactos/dll/win32/fmifs/fmifs.rbuild index 39170c32b82..c5a16d413a6 100644 --- a/reactos/dll/win32/fmifs/fmifs.rbuild +++ b/reactos/dll/win32/fmifs/fmifs.rbuild @@ -1,7 +1,6 @@ . - ntdll kernel32 chkdsk.c diff --git a/reactos/dll/win32/gdi32/gdi32.rbuild b/reactos/dll/win32/gdi32/gdi32.rbuild index e407d5a28a8..ba5b650ceaa 100644 --- a/reactos/dll/win32/gdi32/gdi32.rbuild +++ b/reactos/dll/win32/gdi32/gdi32.rbuild @@ -1,7 +1,6 @@ include - user32 kernel32 diff --git a/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild b/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild index 13c9f76ebe1..abfce65e6d8 100644 --- a/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild +++ b/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild @@ -8,7 +8,7 @@ include/reactos/wine include/reactos - 0x600 + 0x600 wineheaders chm.c content.c diff --git a/reactos/dll/win32/imm32/imm32.rbuild b/reactos/dll/win32/imm32/imm32.rbuild index c0cd3c67471..2a15eb09246 100644 --- a/reactos/dll/win32/imm32/imm32.rbuild +++ b/reactos/dll/win32/imm32/imm32.rbuild @@ -6,7 +6,7 @@ . include/reactos/wine - 0x600 + 0x600 imm.c version.rc wine diff --git a/reactos/dll/win32/inetcomm/inetcomm.rbuild b/reactos/dll/win32/inetcomm/inetcomm.rbuild index e47321ffaa9..a82aea1bcde 100644 --- a/reactos/dll/win32/inetcomm/inetcomm.rbuild +++ b/reactos/dll/win32/inetcomm/inetcomm.rbuild @@ -7,7 +7,7 @@ . include/reactos/wine - 0x600 + 0x600 imaptransport.c inetcomm_main.c internettransport.c diff --git a/reactos/dll/win32/inseng/inseng.rbuild b/reactos/dll/win32/inseng/inseng.rbuild index cfcef820d94..a41d0c80c39 100644 --- a/reactos/dll/win32/inseng/inseng.rbuild +++ b/reactos/dll/win32/inseng/inseng.rbuild @@ -4,7 +4,7 @@ . include/reactos/wine - 0x600 + 0x600 inseng_main.c regsvr.c wine diff --git a/reactos/dll/win32/jscript/jscript.rbuild b/reactos/dll/win32/jscript/jscript.rbuild index 4f18caa7599..80c3d6cbc43 100644 --- a/reactos/dll/win32/jscript/jscript.rbuild +++ b/reactos/dll/win32/jscript/jscript.rbuild @@ -3,7 +3,7 @@ . - . + . include/reactos/wine diff --git a/reactos/dll/win32/kernel32/kernel32.rbuild b/reactos/dll/win32/kernel32/kernel32.rbuild index 40fc2b3cbe4..be474c6cb74 100644 --- a/reactos/dll/win32/kernel32/kernel32.rbuild +++ b/reactos/dll/win32/kernel32/kernel32.rbuild @@ -6,8 +6,7 @@ include include/reactos/subsys - - 0x0600 + 0x0600 0x05020100 errcodes @@ -130,8 +129,8 @@ - -fno-exceptions - -fno-rtti + -fno-exceptions + -fno-rtti icustubs.cpp @@ -143,7 +142,6 @@ . . include - kernel32_base wine pseh diff --git a/reactos/dll/win32/localspl/localspl.rbuild b/reactos/dll/win32/localspl/localspl.rbuild index 6c9ebeda826..0ae57f3b349 100644 --- a/reactos/dll/win32/localspl/localspl.rbuild +++ b/reactos/dll/win32/localspl/localspl.rbuild @@ -3,7 +3,7 @@ . include/reactos/wine - 0x600 + 0x600 localmon.c localspl_main.c provider.c diff --git a/reactos/dll/win32/lpk/lpk.rbuild b/reactos/dll/win32/lpk/lpk.rbuild index 44d703b1040..317e5221974 100644 --- a/reactos/dll/win32/lpk/lpk.rbuild +++ b/reactos/dll/win32/lpk/lpk.rbuild @@ -1,7 +1,6 @@ include - ntdll kernel32 diff --git a/reactos/dll/win32/mlang/mlang.rbuild b/reactos/dll/win32/mlang/mlang.rbuild index b53438c5ab9..20baacb6976 100644 --- a/reactos/dll/win32/mlang/mlang.rbuild +++ b/reactos/dll/win32/mlang/mlang.rbuild @@ -7,7 +7,7 @@ . include/reactos/wine - 0x600 + 0x600 mlang.c regsvr.c wine diff --git a/reactos/dll/win32/msctf/msctf.rbuild b/reactos/dll/win32/msctf/msctf.rbuild index aad46f2eba5..32a5d02b32b 100644 --- a/reactos/dll/win32/msctf/msctf.rbuild +++ b/reactos/dll/win32/msctf/msctf.rbuild @@ -4,7 +4,7 @@ . include/reactos/wine - 0x600 + 0x600 categorymgr.c context.c documentmgr.c diff --git a/reactos/dll/win32/mshtml/mshtml.rbuild b/reactos/dll/win32/mshtml/mshtml.rbuild index 06d8ac031d5..ead2dcb4deb 100644 --- a/reactos/dll/win32/mshtml/mshtml.rbuild +++ b/reactos/dll/win32/mshtml/mshtml.rbuild @@ -7,7 +7,7 @@ . include/reactos/wine - 0x600 + 0x600 conpoint.c dispex.c editor.c diff --git a/reactos/dll/win32/msi/msi.rbuild b/reactos/dll/win32/msi/msi.rbuild index 663ae896c5b..a92bc40681e 100644 --- a/reactos/dll/win32/msi/msi.rbuild +++ b/reactos/dll/win32/msi/msi.rbuild @@ -7,7 +7,7 @@ . include/reactos/wine - 0x600 + 0x600 action.c alter.c appsearch.c diff --git a/reactos/dll/win32/mstask/mstask.rbuild b/reactos/dll/win32/mstask/mstask.rbuild index 1e5e6ec1c99..503eaf389a2 100644 --- a/reactos/dll/win32/mstask/mstask.rbuild +++ b/reactos/dll/win32/mstask/mstask.rbuild @@ -7,8 +7,8 @@ . include/reactos/wine - 0x600 - 0x600 + 0x600 + 0x600 factory.c mstask_main.c task.c diff --git a/reactos/dll/win32/msvcrt/msvcrt.rbuild b/reactos/dll/win32/msvcrt/msvcrt.rbuild index 1e058111831..38e0c586a01 100644 --- a/reactos/dll/win32/msvcrt/msvcrt.rbuild +++ b/reactos/dll/win32/msvcrt/msvcrt.rbuild @@ -2,7 +2,6 @@ . include - diff --git a/reactos/dll/win32/msxml3/msxml3.rbuild b/reactos/dll/win32/msxml3/msxml3.rbuild index 13d93da488a..09bc90783bb 100644 --- a/reactos/dll/win32/msxml3/msxml3.rbuild +++ b/reactos/dll/win32/msxml3/msxml3.rbuild @@ -7,7 +7,7 @@ . msxml3_v1 - 0x601 + 0x601 libxml2 libxslt diff --git a/reactos/dll/win32/ntmarta/ntmarta.rbuild b/reactos/dll/win32/ntmarta/ntmarta.rbuild index e04fa190cea..8a80e3118d1 100644 --- a/reactos/dll/win32/ntmarta/ntmarta.rbuild +++ b/reactos/dll/win32/ntmarta/ntmarta.rbuild @@ -2,7 +2,7 @@ . - 0x600 + 0x600 ntdll kernel32 advapi32 diff --git a/reactos/dll/win32/objsel/objsel.rbuild b/reactos/dll/win32/objsel/objsel.rbuild index 4298f36481a..ab90ff9662c 100644 --- a/reactos/dll/win32/objsel/objsel.rbuild +++ b/reactos/dll/win32/objsel/objsel.rbuild @@ -7,7 +7,7 @@ . include/reactos/wine - 0x600 + 0x600 wine ole32 user32 diff --git a/reactos/dll/win32/ole32/ole32.rbuild b/reactos/dll/win32/ole32/ole32.rbuild index 66221ec1525..a341cb203a7 100644 --- a/reactos/dll/win32/ole32/ole32.rbuild +++ b/reactos/dll/win32/ole32/ole32.rbuild @@ -7,7 +7,7 @@ . include/reactos/wine - 0x600 + 0x600 OLE32_ CLSID_PSFactoryBuffer diff --git a/reactos/dll/win32/oleaut32/oleaut32.rbuild b/reactos/dll/win32/oleaut32/oleaut32.rbuild index fe4acf15e42..5d5c1846f70 100644 --- a/reactos/dll/win32/oleaut32/oleaut32.rbuild +++ b/reactos/dll/win32/oleaut32/oleaut32.rbuild @@ -8,7 +8,7 @@ include/reactos/libs/libjpeg include/reactos/wine - 0x600 + 0x600 CLSID_PSDispatch diff --git a/reactos/dll/win32/opengl32/opengl32.rbuild b/reactos/dll/win32/opengl32/opengl32.rbuild index 6836100f080..96d645379d0 100644 --- a/reactos/dll/win32/opengl32/opengl32.rbuild +++ b/reactos/dll/win32/opengl32/opengl32.rbuild @@ -1,6 +1,5 @@ - ntdll kernel32 gdi32 diff --git a/reactos/dll/win32/pdh/pdh.rbuild b/reactos/dll/win32/pdh/pdh.rbuild index e79416c36c6..8b325822abd 100644 --- a/reactos/dll/win32/pdh/pdh.rbuild +++ b/reactos/dll/win32/pdh/pdh.rbuild @@ -3,7 +3,7 @@ . include/reactos/wine - 0x600 + 0x600 wine kernel32 ntdll diff --git a/reactos/dll/win32/psapi/psapi.rbuild b/reactos/dll/win32/psapi/psapi.rbuild index 2532d8e741f..dc878155644 100644 --- a/reactos/dll/win32/psapi/psapi.rbuild +++ b/reactos/dll/win32/psapi/psapi.rbuild @@ -2,7 +2,6 @@ . include - epsapi pseh ntdll diff --git a/reactos/dll/win32/rasdlg/rasdlg.rbuild b/reactos/dll/win32/rasdlg/rasdlg.rbuild index a903c55401f..4a12179090b 100644 --- a/reactos/dll/win32/rasdlg/rasdlg.rbuild +++ b/reactos/dll/win32/rasdlg/rasdlg.rbuild @@ -1,7 +1,6 @@ . - wine kernel32 ntdll diff --git a/reactos/dll/win32/rasman/rasman.rbuild b/reactos/dll/win32/rasman/rasman.rbuild index c2e6da74923..c177d0ea4ee 100644 --- a/reactos/dll/win32/rasman/rasman.rbuild +++ b/reactos/dll/win32/rasman/rasman.rbuild @@ -1,7 +1,6 @@ . - wine kernel32 ntdll diff --git a/reactos/dll/win32/riched20/riched20.rbuild b/reactos/dll/win32/riched20/riched20.rbuild index ed098add847..b96c5170121 100644 --- a/reactos/dll/win32/riched20/riched20.rbuild +++ b/reactos/dll/win32/riched20/riched20.rbuild @@ -3,7 +3,6 @@ - -Wno-format . include/reactos/wine diff --git a/reactos/dll/win32/rpcrt4/rpcrt4.rbuild b/reactos/dll/win32/rpcrt4/rpcrt4.rbuild index a50ef3f71b0..bdddd425503 100644 --- a/reactos/dll/win32/rpcrt4/rpcrt4.rbuild +++ b/reactos/dll/win32/rpcrt4/rpcrt4.rbuild @@ -3,7 +3,7 @@ . include/reactos/wine - 0x600 + 0x600 diff --git a/reactos/dll/win32/samlib/samlib.rbuild b/reactos/dll/win32/samlib/samlib.rbuild index e5e0ba318ae..32c5727607f 100644 --- a/reactos/dll/win32/samlib/samlib.rbuild +++ b/reactos/dll/win32/samlib/samlib.rbuild @@ -1,7 +1,6 @@ . - ntdll kernel32 advapi32 diff --git a/reactos/dll/win32/shell32/shell32.rbuild b/reactos/dll/win32/shell32/shell32.rbuild index 76ab0c8efce..0c3c558bb59 100644 --- a/reactos/dll/win32/shell32/shell32.rbuild +++ b/reactos/dll/win32/shell32/shell32.rbuild @@ -6,7 +6,7 @@ include/reactos/wine - 0x600 + 0x600 wine uuid recyclebin diff --git a/reactos/dll/win32/shimgvw/shimgvw.rbuild b/reactos/dll/win32/shimgvw/shimgvw.rbuild index 8d42f9acdff..719baf651f5 100644 --- a/reactos/dll/win32/shimgvw/shimgvw.rbuild +++ b/reactos/dll/win32/shimgvw/shimgvw.rbuild @@ -1,7 +1,6 @@ . - kernel32 advapi32 comctl32 diff --git a/reactos/dll/win32/shlwapi/shlwapi.rbuild b/reactos/dll/win32/shlwapi/shlwapi.rbuild index fe272418e8e..dc89c3e9dd6 100644 --- a/reactos/dll/win32/shlwapi/shlwapi.rbuild +++ b/reactos/dll/win32/shlwapi/shlwapi.rbuild @@ -5,7 +5,7 @@ . include/reactos/wine - 0x600 + 0x600 assoc.c clist.c diff --git a/reactos/dll/win32/smdll/smdll.rbuild b/reactos/dll/win32/smdll/smdll.rbuild index b36561fd7f8..b4cb35e03df 100644 --- a/reactos/dll/win32/smdll/smdll.rbuild +++ b/reactos/dll/win32/smdll/smdll.rbuild @@ -2,7 +2,6 @@ . include/reactos/subsys - smlib ntdll dllmain.c diff --git a/reactos/dll/win32/twain_32/twain_32.rbuild b/reactos/dll/win32/twain_32/twain_32.rbuild index 00eea414eaa..78eafaaa31c 100644 --- a/reactos/dll/win32/twain_32/twain_32.rbuild +++ b/reactos/dll/win32/twain_32/twain_32.rbuild @@ -1,7 +1,6 @@ . - wine ntdll kernel32 diff --git a/reactos/dll/win32/uext2/uext2.rbuild b/reactos/dll/win32/uext2/uext2.rbuild index dbf7a0a84bc..0a5dbda5159 100644 --- a/reactos/dll/win32/uext2/uext2.rbuild +++ b/reactos/dll/win32/uext2/uext2.rbuild @@ -1,7 +1,6 @@ . - ext2lib ntdll uext2.c diff --git a/reactos/dll/win32/ufat/ufat.rbuild b/reactos/dll/win32/ufat/ufat.rbuild index 2bc3e5831c5..ed6e98998fa 100644 --- a/reactos/dll/win32/ufat/ufat.rbuild +++ b/reactos/dll/win32/ufat/ufat.rbuild @@ -1,7 +1,6 @@ . - vfatlib ntdll ufat.c diff --git a/reactos/dll/win32/ufatx/ufatx.rbuild b/reactos/dll/win32/ufatx/ufatx.rbuild index b3a721fbcb8..b99f238607c 100644 --- a/reactos/dll/win32/ufatx/ufatx.rbuild +++ b/reactos/dll/win32/ufatx/ufatx.rbuild @@ -1,7 +1,6 @@ . - vfatxlib ntdll ufatx.rc diff --git a/reactos/dll/win32/untfs/untfs.rbuild b/reactos/dll/win32/untfs/untfs.rbuild index 5a57c7a7f55..fa620992ee6 100644 --- a/reactos/dll/win32/untfs/untfs.rbuild +++ b/reactos/dll/win32/untfs/untfs.rbuild @@ -1,7 +1,6 @@ . - ntfslib ntdll untfs.c diff --git a/reactos/dll/win32/urlmon/urlmon.rbuild b/reactos/dll/win32/urlmon/urlmon.rbuild index 0c92317e466..2a6525eeb73 100644 --- a/reactos/dll/win32/urlmon/urlmon.rbuild +++ b/reactos/dll/win32/urlmon/urlmon.rbuild @@ -7,7 +7,7 @@ . include/reactos/wine - 0x600 + 0x600 bindctx.c binding.c bindprot.c diff --git a/reactos/dll/win32/user32/user32.rbuild b/reactos/dll/win32/user32/user32.rbuild index 51dee24b5ec..de0f8d33e10 100644 --- a/reactos/dll/win32/user32/user32.rbuild +++ b/reactos/dll/win32/user32/user32.rbuild @@ -3,7 +3,6 @@ . include include/reactos/subsys - wine gdi32 kernel32 diff --git a/reactos/dll/win32/winspool/winspool.rbuild b/reactos/dll/win32/winspool/winspool.rbuild index 21f17347fb4..09fa7a61d66 100644 --- a/reactos/dll/win32/winspool/winspool.rbuild +++ b/reactos/dll/win32/winspool/winspool.rbuild @@ -2,7 +2,6 @@ . include/reactos/wine - ntdll kernel32 advapi32 diff --git a/reactos/dll/win32/ws2_32/ws2_32.rbuild b/reactos/dll/win32/ws2_32/ws2_32.rbuild index 38197cf3d07..849ed1c88e0 100644 --- a/reactos/dll/win32/ws2_32/ws2_32.rbuild +++ b/reactos/dll/win32/ws2_32/ws2_32.rbuild @@ -2,7 +2,6 @@ include include/reactos/wine - wine ntdll diff --git a/reactos/dll/win32/ws2help/ws2help.rbuild b/reactos/dll/win32/ws2help/ws2help.rbuild index 6f3a0a69dc1..79378b09522 100644 --- a/reactos/dll/win32/ws2help/ws2help.rbuild +++ b/reactos/dll/win32/ws2help/ws2help.rbuild @@ -1,7 +1,6 @@ . - ntdll kernel32 ws2_32 diff --git a/reactos/dll/win32/wshirda/wshirda.rbuild b/reactos/dll/win32/wshirda/wshirda.rbuild index 530cc21fb4d..2e2fe617437 100644 --- a/reactos/dll/win32/wshirda/wshirda.rbuild +++ b/reactos/dll/win32/wshirda/wshirda.rbuild @@ -1,7 +1,6 @@ . - ntdll kernel32 ws2_32 diff --git a/reactos/dll/win32/wuapi/wuapi.rbuild b/reactos/dll/win32/wuapi/wuapi.rbuild index 3b8510623e4..bca3990004d 100644 --- a/reactos/dll/win32/wuapi/wuapi.rbuild +++ b/reactos/dll/win32/wuapi/wuapi.rbuild @@ -4,7 +4,7 @@ . include/reactos/wine - 0x600 + 0x600 downloader.c installer.c main.c diff --git a/reactos/drivers/directx/dxapi/dxapi.rbuild b/reactos/drivers/directx/dxapi/dxapi.rbuild index 9282be29106..b7bd1d029f7 100644 --- a/reactos/drivers/directx/dxapi/dxapi.rbuild +++ b/reactos/drivers/directx/dxapi/dxapi.rbuild @@ -4,7 +4,6 @@ installbase="system32/drivers" installname="dxapi.sys"> . - ntoskrnl hal diff --git a/reactos/drivers/directx/dxgthk/dxgthk.rbuild b/reactos/drivers/directx/dxgthk/dxgthk.rbuild index 4fbb8c1918e..4bf33cbac9a 100644 --- a/reactos/drivers/directx/dxgthk/dxgthk.rbuild +++ b/reactos/drivers/directx/dxgthk/dxgthk.rbuild @@ -4,7 +4,6 @@ installbase="system32/drivers" installname="dxgthk.sys"> . - win32k main.c dxgthk.rc diff --git a/reactos/drivers/storage/ide/uniata/uniata.rbuild b/reactos/drivers/storage/ide/uniata/uniata.rbuild index cecef356fb6..6f9b500a18f 100644 --- a/reactos/drivers/storage/ide/uniata/uniata.rbuild +++ b/reactos/drivers/storage/ide/uniata/uniata.rbuild @@ -4,6 +4,8 @@ . inc + -fno-exceptions + -fno-rtti ntoskrnl hal diff --git a/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild b/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild index 8cc3b71c8bf..6d1cfe8d0c2 100644 --- a/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild +++ b/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild @@ -3,6 +3,8 @@ . .. + -fno-exceptions + -fno-rtti ntoskrnl portcls mpu401.rc diff --git a/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild b/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild index c8ad81a9485..33f6c8f9072 100644 --- a/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild +++ b/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild @@ -4,6 +4,8 @@ . .. ../include + -fno-exceptions + -fno-rtti ntoskrnl diff --git a/reactos/hal/halarm/generic/generic.rbuild b/reactos/hal/halarm/generic/generic.rbuild index a68b11ec9da..5f4ec64f7dc 100644 --- a/reactos/hal/halarm/generic/generic.rbuild +++ b/reactos/hal/halarm/generic/generic.rbuild @@ -3,7 +3,6 @@ ../include include - hal.c ../include/hal.h diff --git a/reactos/hal/halarm/up/halup.rbuild b/reactos/hal/halarm/up/halup.rbuild index 6f4179dd923..00b6da4c290 100644 --- a/reactos/hal/halarm/up/halup.rbuild +++ b/reactos/hal/halarm/up/halup.rbuild @@ -5,7 +5,6 @@ ../include include - halarm_generic ntoskrnl diff --git a/reactos/hal/halppc/generic/generic.rbuild b/reactos/hal/halppc/generic/generic.rbuild index 190ac676db1..e1052317d74 100644 --- a/reactos/hal/halppc/generic/generic.rbuild +++ b/reactos/hal/halppc/generic/generic.rbuild @@ -3,7 +3,6 @@ ../include include - beep.c bus.c diff --git a/reactos/hal/halppc/up/halup.rbuild b/reactos/hal/halppc/up/halup.rbuild index e834b3160f9..fde75835c85 100644 --- a/reactos/hal/halppc/up/halup.rbuild +++ b/reactos/hal/halppc/up/halup.rbuild @@ -5,7 +5,6 @@ ../include include - halppc_generic ntoskrnl diff --git a/reactos/hal/halx86/generic/generic.rbuild b/reactos/hal/halx86/generic/generic.rbuild index a89f6f6be4d..e2fb6838877 100644 --- a/reactos/hal/halx86/generic/generic.rbuild +++ b/reactos/hal/halx86/generic/generic.rbuild @@ -4,7 +4,6 @@ ../include include - beep.c bios.c @@ -27,7 +26,6 @@ ../include include - irq.S processor.c @@ -36,7 +34,6 @@ ../include include - pci.c diff --git a/reactos/hal/halx86/hal_generic.rbuild b/reactos/hal/halx86/hal_generic.rbuild index 0c680aa54f2..ce262427734 100644 --- a/reactos/hal/halx86/hal_generic.rbuild +++ b/reactos/hal/halx86/hal_generic.rbuild @@ -4,7 +4,6 @@ include include - beep.c diff --git a/reactos/hal/halx86/hal_generic_pc.rbuild b/reactos/hal/halx86/hal_generic_pc.rbuild index 3571a42117a..576aa285bb8 100644 --- a/reactos/hal/halx86/hal_generic_pc.rbuild +++ b/reactos/hal/halx86/hal_generic_pc.rbuild @@ -4,7 +4,6 @@ include include - pci.c diff --git a/reactos/hal/halx86/hal_generic_up.rbuild b/reactos/hal/halx86/hal_generic_up.rbuild index abb58c330dd..11fb20e4a18 100644 --- a/reactos/hal/halx86/hal_generic_up.rbuild +++ b/reactos/hal/halx86/hal_generic_up.rbuild @@ -4,7 +4,6 @@ include include - irq.S diff --git a/reactos/hal/halx86/halmp.rbuild b/reactos/hal/halx86/halmp.rbuild index d8064067569..9ba7c68713f 100644 --- a/reactos/hal/halx86/halmp.rbuild +++ b/reactos/hal/halx86/halmp.rbuild @@ -6,7 +6,6 @@ include include - hal_generic diff --git a/reactos/hal/halx86/halup.rbuild b/reactos/hal/halx86/halup.rbuild index 26ed54613a9..319db427e1b 100644 --- a/reactos/hal/halx86/halup.rbuild +++ b/reactos/hal/halx86/halup.rbuild @@ -6,7 +6,6 @@ include include - hal_generic hal_generic_up diff --git a/reactos/hal/halx86/halxbox.rbuild b/reactos/hal/halx86/halxbox.rbuild index 396b1fcca35..c842c318445 100644 --- a/reactos/hal/halx86/halxbox.rbuild +++ b/reactos/hal/halx86/halxbox.rbuild @@ -5,7 +5,6 @@ include include - hal_generic diff --git a/reactos/include/crt/mingw32/intrin.h b/reactos/include/crt/mingw32/intrin.h index c04cd2fdd23..76e4dd2a612 100644 --- a/reactos/include/crt/mingw32/intrin.h +++ b/reactos/include/crt/mingw32/intrin.h @@ -28,6 +28,8 @@ #ifndef KJK_INTRIN_H_ #define KJK_INTRIN_H_ +#ifndef RC_INVOKED + #ifndef __GNUC__ #error Unsupported compiler #endif @@ -93,4 +95,6 @@ #endif +#endif + /* EOF */ diff --git a/reactos/include/reactos/idl/idl.rbuild b/reactos/include/reactos/idl/idl.rbuild index d46450e428e..3746bbebbab 100644 --- a/reactos/include/reactos/idl/idl.rbuild +++ b/reactos/include/reactos/idl/idl.rbuild @@ -2,11 +2,11 @@ - 0x600 + 0x600 pnp.idl - 0x600 + 0x600 pnp.idl diff --git a/reactos/lib/3rdparty/icu4ros/icu4ros.rbuild b/reactos/lib/3rdparty/icu4ros/icu4ros.rbuild index 26340684101..a263af562b1 100644 --- a/reactos/lib/3rdparty/icu4ros/icu4ros.rbuild +++ b/reactos/lib/3rdparty/icu4ros/icu4ros.rbuild @@ -5,8 +5,8 @@ 1 1 - -fno-exceptions - -fno-rtti + -fno-exceptions + -fno-rtti icu/source/common icu/source/i18n stubs.cpp diff --git a/reactos/lib/3rdparty/libwine/libwine.rbuild b/reactos/lib/3rdparty/libwine/libwine.rbuild index f12b5301379..3b139cf79ca 100644 --- a/reactos/lib/3rdparty/libwine/libwine.rbuild +++ b/reactos/lib/3rdparty/libwine/libwine.rbuild @@ -3,7 +3,6 @@ include/reactos/wine - config.c debug_ros.c @@ -12,7 +11,6 @@ include/reactos/wine - loader.c diff --git a/reactos/lib/drivers/oskittcp/oskittcp.rbuild b/reactos/lib/drivers/oskittcp/oskittcp.rbuild index 35bdebd3328..809ccf67baf 100644 --- a/reactos/lib/drivers/oskittcp/oskittcp.rbuild +++ b/reactos/lib/drivers/oskittcp/oskittcp.rbuild @@ -3,7 +3,6 @@ - include/freebsd include/freebsd/sys/include diff --git a/reactos/lib/epsapi/epsapi.rbuild b/reactos/lib/epsapi/epsapi.rbuild index 2ed79fdafd2..787b7161f41 100644 --- a/reactos/lib/epsapi/epsapi.rbuild +++ b/reactos/lib/epsapi/epsapi.rbuild @@ -1,7 +1,6 @@ - drivers.c modules.c diff --git a/reactos/lib/fslib/ext2lib/ext2lib.rbuild b/reactos/lib/fslib/ext2lib/ext2lib.rbuild index affa25ad15a..853d7f248f9 100644 --- a/reactos/lib/fslib/ext2lib/ext2lib.rbuild +++ b/reactos/lib/fslib/ext2lib/ext2lib.rbuild @@ -2,7 +2,6 @@ . - Badblock.c Bitmap.c Disk.c diff --git a/reactos/lib/fslib/ntfslib/ntfslib.rbuild b/reactos/lib/fslib/ntfslib/ntfslib.rbuild index 345246dcc2d..40edefe4d60 100644 --- a/reactos/lib/fslib/ntfslib/ntfslib.rbuild +++ b/reactos/lib/fslib/ntfslib/ntfslib.rbuild @@ -2,6 +2,5 @@ . - ntfslib.c \ No newline at end of file diff --git a/reactos/lib/fslib/vfatlib/vfatlib.rbuild b/reactos/lib/fslib/vfatlib/vfatlib.rbuild index f84c671e5e1..1d40958cdf9 100644 --- a/reactos/lib/fslib/vfatlib/vfatlib.rbuild +++ b/reactos/lib/fslib/vfatlib/vfatlib.rbuild @@ -2,7 +2,6 @@ . - fat12.c fat16.c fat32.c diff --git a/reactos/lib/fslib/vfatxlib/vfatxlib.rbuild b/reactos/lib/fslib/vfatxlib/vfatxlib.rbuild index 5ba66aa5f84..bc7736cd6a7 100644 --- a/reactos/lib/fslib/vfatxlib/vfatxlib.rbuild +++ b/reactos/lib/fslib/vfatxlib/vfatxlib.rbuild @@ -2,7 +2,6 @@ . - fatx.c vfatxlib.c diff --git a/reactos/lib/nls/idna/idna.rbuild b/reactos/lib/nls/idna/idna.rbuild index 3409d528e84..5b32d7071cf 100644 --- a/reactos/lib/nls/idna/idna.rbuild +++ b/reactos/lib/nls/idna/idna.rbuild @@ -3,10 +3,10 @@ icu4ros - 0x600 + 0x600 - -fno-exceptions - -fno-rtti + -fno-exceptions + -fno-rtti icu/source/common idna.cpp nameprep.cpp diff --git a/reactos/lib/nls/normalize/normalize.rbuild b/reactos/lib/nls/normalize/normalize.rbuild index ddee907547a..8e581f36322 100644 --- a/reactos/lib/nls/normalize/normalize.rbuild +++ b/reactos/lib/nls/normalize/normalize.rbuild @@ -2,11 +2,9 @@ icu4ros - - 0x600 - - -fno-exceptions - -fno-rtti + 0x600 + -fno-exceptions + -fno-rtti icu/source/common normalize.cpp diff --git a/reactos/lib/nls/scripts/scripts.rbuild b/reactos/lib/nls/scripts/scripts.rbuild index a169418335f..669e2ed248b 100644 --- a/reactos/lib/nls/scripts/scripts.rbuild +++ b/reactos/lib/nls/scripts/scripts.rbuild @@ -2,11 +2,9 @@ icu4ros - - 0x600 - - -fno-exceptions - -fno-rtti + 0x600 + -fno-exceptions + -fno-rtti icu/source/common scripts.cpp diff --git a/reactos/lib/ntdllsys/ntdllsys.rbuild b/reactos/lib/ntdllsys/ntdllsys.rbuild index 07d6b625699..920dc148e74 100644 --- a/reactos/lib/ntdllsys/ntdllsys.rbuild +++ b/reactos/lib/ntdllsys/ntdllsys.rbuild @@ -1,7 +1,6 @@ - ntdll.S diff --git a/reactos/lib/sdk/crt/crt.rbuild b/reactos/lib/sdk/crt/crt.rbuild index c8c191035cc..cd08f31b3e5 100644 --- a/reactos/lib/sdk/crt/crt.rbuild +++ b/reactos/lib/sdk/crt/crt.rbuild @@ -19,7 +19,6 @@ chkstk . include - extern diff --git a/reactos/lib/sdk/dxguid/dxguid.rbuild b/reactos/lib/sdk/dxguid/dxguid.rbuild index 5e73ad4658d..9a6a6c46c0a 100644 --- a/reactos/lib/sdk/dxguid/dxguid.rbuild +++ b/reactos/lib/sdk/dxguid/dxguid.rbuild @@ -1,6 +1,5 @@ - dxguid-mingw.c diff --git a/reactos/lib/sdk/nt/nt.rbuild b/reactos/lib/sdk/nt/nt.rbuild index 93957d36f4d..5a8ed051f55 100644 --- a/reactos/lib/sdk/nt/nt.rbuild +++ b/reactos/lib/sdk/nt/nt.rbuild @@ -1,6 +1,5 @@ - entry_point.c diff --git a/reactos/lib/sdk/strmiids/strmiids.rbuild b/reactos/lib/sdk/strmiids/strmiids.rbuild index 4fdde36cdd3..046ff2a8d7f 100644 --- a/reactos/lib/sdk/strmiids/strmiids.rbuild +++ b/reactos/lib/sdk/strmiids/strmiids.rbuild @@ -1,6 +1,5 @@ - strmiids.c diff --git a/reactos/lib/sdk/uuid/uuid.rbuild b/reactos/lib/sdk/uuid/uuid.rbuild index 6326513ff69..6c687483973 100644 --- a/reactos/lib/sdk/uuid/uuid.rbuild +++ b/reactos/lib/sdk/uuid/uuid.rbuild @@ -2,6 +2,5 @@ include/reactos/wine - uuid.c diff --git a/reactos/lib/smlib/smlib.rbuild b/reactos/lib/smlib/smlib.rbuild index 4e0eb78550f..733ff2f7dc4 100644 --- a/reactos/lib/smlib/smlib.rbuild +++ b/reactos/lib/smlib/smlib.rbuild @@ -3,7 +3,6 @@ . include/reactos/subsys - connect.c execpgm.c compses.c diff --git a/reactos/lib/win32ksys/win32ksys.rbuild b/reactos/lib/win32ksys/win32ksys.rbuild index 65accf1f1c9..4ada178347b 100644 --- a/reactos/lib/win32ksys/win32ksys.rbuild +++ b/reactos/lib/win32ksys/win32ksys.rbuild @@ -1,7 +1,6 @@ - win32k.S diff --git a/reactos/ntoskrnl/ntoskrnl-generic.rbuild b/reactos/ntoskrnl/ntoskrnl-generic.rbuild index 273e4824ac0..18cefa3a4cf 100644 --- a/reactos/ntoskrnl/ntoskrnl-generic.rbuild +++ b/reactos/ntoskrnl/ntoskrnl-generic.rbuild @@ -3,7 +3,6 @@ - diff --git a/reactos/subsystems/csr/csrsrv/csrsrv.rbuild b/reactos/subsystems/csr/csrsrv/csrsrv.rbuild index 1238af76e20..3a215fda8a8 100644 --- a/reactos/subsystems/csr/csrsrv/csrsrv.rbuild +++ b/reactos/subsystems/csr/csrsrv/csrsrv.rbuild @@ -5,7 +5,6 @@ . . include/reactos/subsys - ntdll pseh api.c diff --git a/reactos/subsystems/ntvdm/ntvdm.rbuild b/reactos/subsystems/ntvdm/ntvdm.rbuild index 31b50e8460a..b291042fe4a 100644 --- a/reactos/subsystems/ntvdm/ntvdm.rbuild +++ b/reactos/subsystems/ntvdm/ntvdm.rbuild @@ -2,7 +2,6 @@ . - ntdll kernel32 user32 diff --git a/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild b/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild index bcccf3983f9..a48226d7921 100644 --- a/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild +++ b/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild @@ -7,7 +7,6 @@ include/reactos/subsys include/reactos/drivers . - ntdll kernel32 user32 diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp index 1f5b438d51a..9a514fed7fa 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.cpp +++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp @@ -256,6 +256,9 @@ MingwBackend::ProcessModules () vector v; size_t i; + for ( std::map::iterator p = ProjectNode.modules.begin (); p != ProjectNode.modules.end (); ++ p ) + fprintf ( fMakefile, "%s_TYPE:=%u\n", p->second->name.c_str(), p->second->type ); + for ( std::map::iterator p = ProjectNode.modules.begin (); p != ProjectNode.modules.end (); ++ p ) { Module& module = *p->second; @@ -385,28 +388,7 @@ MingwBackend::GenerateHeader () const } void -MingwBackend::GenerateProjectCFlagsMacro ( const char* assignmentOperation, - const IfableData& data ) const -{ - set used_defs; - - if ( data.includes.size () > 0 ) - fprintf ( - fMakefile, - "PROJECT_CINCLUDES %s %s\n", - assignmentOperation, - MingwModuleHandler::GenerateGccIncludeParametersFromVector ( data.includes ).c_str ()); - - if ( data.defines.size () > 0 ) - fprintf ( - fMakefile, - "PROJECT_CDEFINES %s %s\n", - assignmentOperation, - MingwModuleHandler::GenerateGccDefineParametersFromVector ( data.defines, used_defs ).c_str ()); -} - -void -MingwBackend::GenerateGlobalCFlagsAndProperties ( +MingwBackend::GenerateGlobalProperties ( const char* assignmentOperation, const IfableData& data ) const { @@ -421,86 +403,6 @@ MingwBackend::GenerateGlobalCFlagsAndProperties ( prop.value.c_str() ); } } - - if ( data.includes.size() || data.defines.size() ) - { - GenerateProjectCFlagsMacro ( assignmentOperation, - data ); - } -} - -void -MingwBackend::GenerateProjectGccOptionsMacro ( const char* assignmentOperation, - IfableData& data ) const -{ - size_t i; - - fprintf ( - fMakefile, - "PROJECT_GCCOPTIONS %s", - assignmentOperation ); - - for ( i = 0; i < data.compilerFlags.size(); i++ ) - { - if ( data.compilerFlags[i]->compiler == CompilerTypeDontCare ) - { - fprintf ( - fMakefile, - " %s", - data.compilerFlags[i]->flag.c_str() ); - } - } - - fputs ( "\n", fMakefile ); - - // TODO: reference these from somewhere - fprintf ( - fMakefile, - "PROJECT_GCC_CFLAGS %s", - assignmentOperation ); - - for ( i = 0; i < data.compilerFlags.size(); i++ ) - { - if ( data.compilerFlags[i]->compiler == CompilerTypeCC ) - { - fprintf ( - fMakefile, - " %s", - data.compilerFlags[i]->flag.c_str() ); - } - } - - fputs ( "\n", fMakefile ); - - fprintf ( - fMakefile, - "PROJECT_GCC_CXXFLAGS %s", - assignmentOperation ); - - for ( i = 0; i < data.compilerFlags.size(); i++ ) - { - if ( data.compilerFlags[i]->compiler == CompilerTypeCPP ) - { - fprintf ( - fMakefile, - " %s", - data.compilerFlags[i]->flag.c_str() ); - } - } - - fputs ( "\n", fMakefile ); -} - -void -MingwBackend::GenerateProjectGccOptions ( - const char* assignmentOperation, - IfableData& data ) const -{ - if ( data.compilerFlags.size() ) - { - GenerateProjectGccOptionsMacro ( assignmentOperation, - data ); - } } string @@ -535,14 +437,45 @@ MingwBackend::GenerateGlobalVariables () const "PREFIX := %s\n", compilerPrefix.c_str () ); fprintf ( fMakefile, - "nasm := %s\n", + "nasm := $(Q)%s\n", nasmCommand.c_str () ); - GenerateGlobalCFlagsAndProperties ( "=", ProjectNode.non_if_data ); - GenerateProjectGccOptions ( "=", ProjectNode.non_if_data ); + GenerateGlobalProperties ( "=", ProjectNode.non_if_data ); + + fprintf ( fMakefile, "PROJECT_CFLAGS += -Wall\n" ); + fprintf ( fMakefile, "PROJECT_CXXFLAGS += -Wall\n" ); + fprintf ( fMakefile, "ifneq ($(OARCH),)\n" ); + fprintf ( fMakefile, "PROJECT_CFLAGS += -march=$(OARCH)\n" ); + fprintf ( fMakefile, "PROJECT_CXXFLAGS += -march=$(OARCH)\n" ); + fprintf ( fMakefile, "endif\n" ); + fprintf ( fMakefile, "ifneq ($(TUNE),)\n" ); + fprintf ( fMakefile, "PROJECT_CFLAGS += -mtune=$(TUNE)\n" ); + fprintf ( fMakefile, "PROJECT_CXXFLAGS += -mtune=$(TUNE)\n" ); + fprintf ( fMakefile, "endif\n" ); - fprintf ( fMakefile, "PROJECT_RCFLAGS := $(PROJECT_CINCLUDES) $(PROJECT_CDEFINES)\n" ); - fprintf ( fMakefile, "PROJECT_WIDLFLAGS := $(PROJECT_CINCLUDES) $(PROJECT_CDEFINES)\n" ); + fprintf ( fMakefile, "PROJECT_CFLAGS += -g%s\n", Environment::GetArch() == "amd64" ? "dwarf-2" : "stabs+" ); + fprintf ( fMakefile, "PROJECT_CXXFLAGS += -g%s\n", Environment::GetArch() == "amd64" ? "dwarf-2" : "stabs+" ); + fprintf ( fMakefile, "PROJECT_ASFLAGS += -g%s\n", Environment::GetArch() == "amd64" ? "dwarf-2" : "stabs+" ); + + MingwModuleHandler::GenerateParameters ( "PROJECT", "+=", ProjectNode.non_if_data ); + MingwModuleHandler::GenerateParameters ( "PROJECT_HOST", "+=", ProjectNode.host_non_if_data ); + + if ( usePipe ) + { + fprintf ( fMakefile, "PROJECT_CFLAGS += -pipe\n" ); + fprintf ( fMakefile, "PROJECT_CXXFLAGS += -pipe\n" ); + fprintf ( fMakefile, "PROJECT_ASFLAGS += -pipe\n" ); + } + + // Because RosBE gcc is built to suck + fputs ( "BUILTIN_HOST_CINCLUDES+= $(HOST_CFLAGS)\n", fMakefile ); + fputs ( "BUILTIN_HOST_CPPINCLUDES+= $(HOST_CFLAGS)\n", fMakefile ); + fputs ( "BUILTIN_HOST_CXXINCLUDES+= $(HOST_CPPFLAGS)\n", fMakefile ); + + // Would be nice to have our own C++ runtime + fputs ( "BUILTIN_CXXINCLUDES+= $(TARGET_CPPFLAGS)\n", fMakefile ); + + // TODO: linker flags 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)' '$(shell ${TARGET_CPP} -print-file-name=libcoldname.a)'\n" ); /* hack to get libgcc_eh.a, should check mingw version or something */ @@ -550,15 +483,38 @@ MingwBackend::GenerateGlobalVariables () const { fprintf ( fMakefile, "PROJECT_LPPFLAGS += '$(shell ${TARGET_CPP} -print-file-name=libgcc_eh.a)'\n" ); } - fprintf ( fMakefile, "PROJECT_GCCOPTIONS += -Wall\n" ); - fprintf ( fMakefile, "ifneq ($(OARCH),)\n" ); - fprintf ( fMakefile, "PROJECT_GCCOPTIONS += -march=$(OARCH)\n" ); - fprintf ( fMakefile, "endif\n" ); - fprintf ( fMakefile, "ifneq ($(TUNE),)\n" ); - fprintf ( fMakefile, "PROJECT_GCCOPTIONS += -mtune=$(TUNE)\n" ); - fprintf ( fMakefile, "endif\n" ); - fprintf ( fMakefile, "PROJECT_CFLAGS = $(PROJECT_GCCOPTIONS) $(PROJECT_GCC_CFLAGS)\n" ); - fprintf ( fMakefile, "PROJECT_CXXFLAGS = $(PROJECT_GCCOPTIONS) $(PROJECT_GCC_CXXFLAGS)\n" ); + + // TODO: use symbolic names for module types + for ( size_t i = 0; i < sizeof(ModuleHandlerInformations) / sizeof(ModuleHandlerInformations[0]); ++ i ) + { + if ( ModuleHandlerInformations[i].cflags && ModuleHandlerInformations[i].cflags[0] ) + { + fprintf ( fMakefile, + "MODULETYPE%d_%sFLAGS:=%s\n", + i, + "C", + ModuleHandlerInformations[i].cflags ); + } + + if ( ModuleHandlerInformations[i].cflags && ModuleHandlerInformations[i].cflags[0] ) + { + fprintf ( fMakefile, + "MODULETYPE%d_%sFLAGS:=%s\n", + i, + "CXX", + ModuleHandlerInformations[i].cflags ); + } + + if ( ModuleHandlerInformations[i].nasmflags && ModuleHandlerInformations[i].nasmflags[0] ) + { + fprintf ( fMakefile, + "MODULETYPE%d_%sFLAGS:=%s\n", + i, + "NASM", + ModuleHandlerInformations[i].nasmflags ); + } + } + fprintf ( fMakefile, "\n" ); } diff --git a/reactos/tools/rbuild/backend/mingw/mingw.h b/reactos/tools/rbuild/backend/mingw/mingw.h index aeb7bb6ff4d..10a9f603ca6 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.h +++ b/reactos/tools/rbuild/backend/mingw/mingw.h @@ -62,14 +62,8 @@ private: void CreateMakefile (); void CloseMakefile () const; void GenerateHeader () const; - void GenerateProjectCFlagsMacro ( const char* assignmentOperation, - const IfableData& data ) const; - void GenerateGlobalCFlagsAndProperties ( const char* op, - const IfableData& data ) const; - void GenerateProjectGccOptionsMacro ( const char* assignmentOperation, - IfableData& data ) const; - void GenerateProjectGccOptions ( const char* assignmentOperation, - IfableData& data ) const; + void GenerateGlobalProperties ( const char* assignmentOperation, + const IfableData& data ) const; std::string GenerateProjectLFLAGS () const; void GenerateDirectories (); void GenerateGlobalVariables () const; diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp index ba471d34b4e..da32c18c772 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp @@ -543,6 +543,69 @@ MingwModuleHandler::GenerateDependsTarget () const module.name.c_str () ); } +static +const char * const CompilerPrefixTable [ CompilerTypesCount ] = +{ + "C", + "CXX", + "CPP", + "AS", + "MIDL", + "RC", + "NASM", +}; + +/* static */ void +MingwModuleHandler::GenerateParameters ( + const char* prefix, + const char* assignmentOperation, + const IfableData& data ) +{ + for ( unsigned type = CompilerTypeCC; type < CompilerTypesCount; ++ type ) + { + CompilerType compiler = static_cast < CompilerType > ( type ); + + // Includes + std::string includes = GenerateIncludeParametersFromVector ( data.includes, compiler ); + + if ( includes.size() ) + { + fprintf ( fMakefile, + "%s_%sINCLUDES%s%s\n", + prefix, + CompilerPrefixTable [ compiler ], + assignmentOperation, + includes.c_str () ); + } + + // Defines + std::string defines = GenerateDefineParametersFromVector ( data.defines, compiler ); + + if ( defines.size() ) + { + fprintf ( fMakefile, + "%s_%sDEFINES%s%s\n", + prefix, + CompilerPrefixTable [ compiler ], + assignmentOperation, + defines.c_str () ); + } + + // Flags + std::string flags = GenerateCompilerParametersFromVector ( data.compilerFlags, compiler ); + + if ( flags.size() ) + { + fprintf ( fMakefile, + "%s_%sFLAGS%s%s\n", + prefix, + CompilerPrefixTable [ compiler ], + assignmentOperation, + flags.c_str () ); + } + } +} + /* static */ string MingwModuleHandler::GenerateGccDefineParametersFromVector ( const vector& defines, @@ -555,24 +618,69 @@ MingwModuleHandler::GenerateGccDefineParametersFromVector ( Define& define = *defines[i]; if (used_defs.find(define.name) != used_defs.end()) continue; + if (define.redefine) + { + if (parameters.length () > 0) + parameters += " "; + parameters += "-U"; + parameters += define.name; + } if (parameters.length () > 0) parameters += " "; - if (define.name.find('(') != string::npos) + if (define.arguments.length ()) parameters += "$(QT)"; parameters += "-D"; parameters += define.name; + parameters += define.arguments; if (define.value.length () > 0) { parameters += "="; parameters += define.value; } - if (define.name.find('(') != string::npos) + if (define.arguments.length ()) parameters += "$(QT)"; used_defs.insert(used_defs.begin(),define.name); } return parameters; } +/* static */ string +MingwModuleHandler::GenerateDefineParametersFromVector ( + const std::vector& defines, + CompilerType compiler ) +{ + string parameters; + + for ( size_t i = 0; i < defines.size (); i++ ) + { + Define& define = *defines[i]; + if (!define.IsCompilerSet (compiler)) + continue; + if (define.redefine) + { + if (parameters.length () > 0) + parameters += " "; + parameters += "-U"; + parameters += define.name; + } + if (parameters.length () > 0) + parameters += " "; + if (define.arguments.length ()) + parameters += "$(QT)"; + parameters += "-D"; + parameters += define.name; + parameters += define.arguments; + if (define.value.length () > 0) + { + parameters += "="; + parameters += define.value; + } + if (define.arguments.length ()) + parameters += "$(QT)"; + } + return parameters; +} + string MingwModuleHandler::ConcatenatePaths ( const string& path1, @@ -587,27 +695,26 @@ MingwModuleHandler::ConcatenatePaths ( } /* static */ string -MingwModuleHandler::GenerateGccIncludeParametersFromVector ( const vector& includes ) +MingwModuleHandler::GenerateIncludeParametersFromVector ( const vector& includes, const CompilerType type ) { string parameters, path_prefix; for ( size_t i = 0; i < includes.size (); i++ ) { Include& include = *includes[i]; - if ( parameters.length () > 0 ) - parameters += " "; - parameters += "-I" + backend->GetFullPath ( *include.directory ); + if ( include.IsCompilerSet( type ) ) + parameters += " -I" + backend->GetFullPath ( *include.directory ); } return parameters; } -string -MingwModuleHandler::GenerateCompilerParametersFromVector ( const vector& compilerFlags, const CompilerType type ) const +/* static */ string +MingwModuleHandler::GenerateCompilerParametersFromVector ( const vector& compilerFlags, const CompilerType type ) { string parameters; for ( size_t i = 0; i < compilerFlags.size (); i++ ) { CompilerFlag& compilerFlag = *compilerFlags[i]; - if ( compilerFlag.compiler == type ) + if ( compilerFlag.IsCompilerSet( type ) ) parameters += " " + compilerFlag.flag; } return parameters; @@ -650,104 +757,6 @@ MingwModuleHandler::GenerateLinkerParameters () const return GenerateLinkerParametersFromVector ( module.linkerFlags ); } -void -MingwModuleHandler::GenerateMacro ( - const char* assignmentOperation, - const string& macro, - const IfableData& data, - set *used_defs, - bool generatingCompilerMacro ) -{ - size_t i; - bool generateAssignment; - - generateAssignment = (use_pch && module.pch != NULL ) || data.includes.size () > 0 || data.defines.size () > 0; - if ( generatingCompilerMacro ) - generateAssignment |= data.compilerFlags.size () > 0; - if ( generateAssignment ) - { - fprintf ( fMakefile, - "%s %s", - macro.c_str(), - assignmentOperation ); - } - - const FileLocation *pchFilename = GetPrecompiledHeaderFilename (); - if ( pchFilename ) - { - fprintf ( fMakefile, - " -I%s", - backend->GetFullPath ( *pchFilename ).c_str () ); - delete pchFilename; - } - - if ( generatingCompilerMacro ) - { - string compilerParameters = GenerateCompilerParametersFromVector ( data.compilerFlags, CompilerTypeDontCare ); - if ( compilerParameters.size () > 0 ) - { - fprintf ( - fMakefile, - "%s", - compilerParameters.c_str () ); - } - } - for ( i = 0; i < data.includes.size(); i++ ) - { - const Include& include = *data.includes[i]; - const FileLocation* includeDirectory = include.directory; - fprintf ( - fMakefile, - " -I%s", - backend->GetFullPath ( *includeDirectory ).c_str() ); - } - for ( i = 0; i < data.defines.size(); i++ ) - { - const Define& define = *data.defines[i]; - if ( used_defs ) - { - set::const_iterator last_define; - for (last_define = used_defs->begin (); - last_define != used_defs->end (); - last_define++) - { - if ( (*last_define)->name != define.name ) - continue; - if ( !define.overridable ) - { - throw InvalidOperationException ( (*last_define)->node->location.c_str (), - 0, - "Invalid override of define '%s', already defined at %s", - define.name.c_str (), - define.node->location.c_str () ); - } - if ( backend->configuration.Verbose ) - printf("%s: Overriding '%s' already defined at %s\n", - (*last_define)->node->location.c_str (), define.name.c_str (), - define.node->location.c_str () ); - break; - } - if ( last_define != used_defs->end () ) - continue; - } - fprintf ( - fMakefile, - " -D%s", - define.name.c_str() ); - if (define.value.length () > 0) - fprintf ( - fMakefile, - "=%s", - define.value.c_str() ); - if ( used_defs ) - used_defs->insert( used_defs->begin (), &define ); - } - if ( generateAssignment ) - { - fprintf ( fMakefile, "\n" ); - } -} - void MingwModuleHandler::GenerateMacros ( const char* assignmentOperation, @@ -755,18 +764,6 @@ MingwModuleHandler::GenerateMacros ( const vector* linkerFlags, set& used_defs ) { - fprintf ( fMakefile, "# MACROS\n" ); - GenerateMacro ( assignmentOperation, - commonflagsMacro, - data, - &used_defs, - true ); - GenerateMacro ( assignmentOperation, - windresflagsMacro, - data, - NULL, - false ); - if ( linkerFlags != NULL ) { string linkerParameters = GenerateLinkerParametersFromVector ( *linkerFlags ); @@ -830,7 +827,6 @@ MingwModuleHandler::GenerateSourceMacros ( { size_t i; - fprintf ( fMakefile, "# SOURCE MACROS\n" ); const vector& compilationUnits = data.compilationUnits; vector headers; if ( compilationUnits.size () > 0 ) @@ -877,7 +873,6 @@ MingwModuleHandler::GenerateObjectMacros ( vector headers; vector mcheaders; vector mcresources; - fprintf ( fMakefile, "# OBJECT MACROS\n" ); if ( compilationUnits.size () > 0 ) { for ( i = 0; i < compilationUnits.size (); i++ ) @@ -1043,7 +1038,16 @@ MingwModuleHandler::GetDlldataFilename() const return new FileLocation( IntermediateDirectory, dlldata_path, module.name + ".dlldata.c" ); } -/* caller needs to delete the returned object */ +const FileLocation* +MingwModuleHandler::GetPrecompiledHeaderPath () const +{ + if ( !module.pch || !use_pch ) + return NULL; + return new FileLocation ( IntermediateDirectory, + module.pch->file->relative_path, + ".gch_" + module.name ); +} + const FileLocation* MingwModuleHandler::GetPrecompiledHeaderFilename () const { @@ -1054,234 +1058,97 @@ MingwModuleHandler::GetPrecompiledHeaderFilename () const module.pch->file->name + ".gch" ); } -Rule arRule1 ( "$(intermediate_path_noext).a: $($(module_name)_OBJS) $(dependencies) | $(intermediate_dir)\n", - "$(intermediate_path_noext).a", - "$(intermediate_dir)$(SEP)", NULL ); -Rule arRule2 ( "\t$(ECHO_AR)\n" - "\t${ar} -rc $@ $($(module_name)_OBJS) \n", - NULL ); -Rule arHostRule2 ( "\t$(ECHO_HOSTAR)\n" - "\t${host_ar} -rc $@ $($(module_name)_OBJS)\n", - NULL ); -Rule gasRule ( "$(source): ${$(module_name)_precondition}\n" - "ifeq ($(ROS_BUILDDEPS),full)\n" - "$(intermediate_path_unique).o.d: $(source) | $(intermediate_dir)\n" - "\t$(ECHO_DEPENDS)\n" - "\t${gcc} -x assembler-with-cpp -MF $@ -D__ASM__ $($(module_name)_CFLAGS) -M -MP -MT $@ $<\n" - "-include $(intermediate_path_unique).o.d\n" - "endif\n" - "$(intermediate_path_unique).o: $(source)$(if $(subst _full,,_$(ROS_BUILDDEPS)),, $(intermediate_path_unique).o.d) $(dependencies) | $(intermediate_dir)\n" - "\t$(ECHO_GAS)\n" - "\t${gcc} -x assembler-with-cpp -o $@ -D__ASM__ $($(module_name)_CFLAGS) -c $<\n", - "$(intermediate_path_unique).o", - "$(intermediate_path_unique).o.d", - "$(intermediate_dir)$(SEP)", NULL ); -Rule bootRule ( "$(source): ${$(module_name)_precondition}\n" - "$(module_output): $(source) $(dependencies) | $(OUTPUT)$(SEP)$(source_dir)\n" - "\t$(ECHO_NASM)\n" - "\t$(Q)${nasm} -f win32 $< -o $@ $($(module_name)_NASMFLAGS)\n", - "$(OUTPUT)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule nasmRule ( "$(source): ${$(module_name)_precondition}\n" - "$(intermediate_path_unique).o: $(source) $(dependencies) | $(intermediate_dir)\n" - "\t$(ECHO_NASM)\n" - "\t$(Q)${nasm} -f win32 $< -o $@ $($(module_name)_NASMFLAGS)\n", - "$(intermediate_path_unique).o", - "$(intermediate_dir)$(SEP)", NULL ); -Rule windresRule ( "$(source): ${$(module_name)_precondition}\n" - "ifeq ($(ROS_BUILDDEPS),full)\n" - "$(intermediate_path_unique).coff.d: $(source) | $(intermediate_dir) $(TEMPORARY)\n" - "\t$(ECHO_DEPENDS)\n" - "\t${gcc} -xc -M -MP -MT $@ -DRC_INVOKED ${$(module_name)_RCFLAGS} $(source) -MF $@\n" - "-include $(intermediate_path_unique).coff.d\n" - "endif\n" - "$(intermediate_path_unique).coff: $(source)$(if $(subst _full,,_$(ROS_BUILDDEPS)),, $(intermediate_path_unique).coff.d) $(dependencies) $(WRC_TARGET) | $(intermediate_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$(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-@${rm} $(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).res.tmp 2>$(NUL)\n", +Rule windresRule ( "$(eval $(call RBUILD_WRC_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", "$(intermediate_path_unique).coff", - "$(intermediate_path_unique).coff.d", + "$(intermediate_path_unique).res", + "$(intermediate_path_unique).res.d", "$(intermediate_dir)$(SEP)", NULL ); -Rule wmcRule ( "$(intermediate_path_noext).rc $(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h: $(WMC_TARGET) $(source) | $(intermediate_dir)\n" - "\t$(ECHO_WMC)\n" - "\t$(Q)$(WMC_TARGET) -i -H $(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h -o $(intermediate_path_noext).rc $(source)\n", - "$(intermediate_path_noext).rc", - "$(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h", - "$(intermediate_dir)$(SEP)", NULL ); -Rule winebuildPDefRule ( "ifeq ($(ROS_BUILDDEPS),full)\n" - "$(intermediate_path_unique).spec.d: $(source) | $(intermediate_dir)\n" - "\t$(ECHO_DEPENDS)\n" - "\t${gcc} -xc -M -MP -MT $@ ${$(module_name)_RCFLAGS} $(source) -MF $@\n\n" - "-include $(intermediate_path_unique).spec.d\n" - "endif\n" - "$(intermediate_path_unique).spec: $(source)$(if $(subst _full,,_$(ROS_BUILDDEPS)),, $(intermediate_path_unique).spec.d) $(dependencies) | $(intermediate_dir)\n" - "\t$(ECHO_CPP)\n" - "\t${gcc} -xc -E ${$(module_name)_RCFLAGS} $(source) > $(intermediate_path_unique).spec\n\n" - "$(intermediate_path_unique).auto.def: $(intermediate_path_unique).spec $(WINEBUILD_TARGET) | $(intermediate_dir)\n" - "\t$(ECHO_WINEBLD)\n" - "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $(intermediate_path_unique).auto.def --def -E $(intermediate_path_unique).spec --filename $(module_dllname)\n\n", - "$(intermediate_path_unique).spec", - "$(intermediate_path_unique).spec.d", - "$(intermediate_path_unique).auto.def", - "$(intermediate_dir)$(SEP)", NULL ); -Rule winebuildPRule ( "$(intermediate_path_unique).stubs.c: $(intermediate_path_unique).spec $(WINEBUILD_TARGET) | $(intermediate_dir)\n" - "\t$(ECHO_WINEBLD)\n" - "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $@ --pedll $(intermediate_path_unique).spec --filename $(module_dllname)\n\n" - "ifeq ($(ROS_BUILDDEPS),full)\n" - "$(intermediate_path_unique).stubs.o.d: $(intermediate_path_unique).stubs.c | $(intermediate_dir)\n" - "\t$(ECHO_DEPENDS)\n" - "\t${gcc} -MF $@ $($(module_name)_CFLAGS)$(compiler_flags) -M -MP -MT $@ $<\n" - "-include $(intermediate_path_unique).stubs.o.d\n" - "endif\n" - "$(intermediate_path_unique).stubs.o: $(intermediate_path_unique).stubs.c$(if $(subst _full,,_$(ROS_BUILDDEPS)),, $(intermediate_path_unique).stubs.o.d) | $(intermediate_dir)\n" - "\t$(ECHO_CC)\n" - "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c $<\n", +Rule winebuildPRule ( "$(eval $(call RBUILD_WINEBUILD_WITH_CPP_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags),$(module_dllname)))\n", "$(intermediate_path_unique).spec", + "$(intermediate_path_unique).spec.d", + "$(intermediate_path_unique).auto.def", "$(intermediate_path_unique).stubs.c", "$(intermediate_path_unique).stubs.o", "$(intermediate_path_unique).stubs.o.d", "$(intermediate_dir)$(SEP)", NULL ); -Rule winebuildDefRule ( "$(intermediate_path_unique).auto.def: $(source) $(dependencies) $(WINEBUILD_TARGET) | $(intermediate_dir)\n" - "\t$(ECHO_WINEBLD)\n" - "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $(intermediate_path_unique).auto.def --def -E $(source) --filename $(module_dllname)\n\n", - "$(intermediate_path_noext).spec", - "$(intermediate_path_unique).auto.def", - "$(intermediate_dir)$(SEP)", NULL ); -Rule winebuildRule ( "$(intermediate_path_unique).stubs.c: $(source) $(WINEBUILD_TARGET)\n" - "\t$(ECHO_WINEBLD)\n" - "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $@ --pedll $(source) --filename $(module_dllname)\n" - "ifeq ($(ROS_BUILDDEPS),full)\n" - "$(intermediate_path_unique).stubs.o.d: $(intermediate_path_unique).stubs.c | $(intermediate_dir)\n" - "\t$(ECHO_DEPENDS)\n" - "\t${gcc} -MF $@ $($(module_name)_CFLAGS)$(compiler_flags) -M -MP -MT $@ $<\n" - "-include $(intermediate_path_unique).stubs.o.d\n" - "endif\n" - "$(intermediate_path_unique).stubs.o: $(intermediate_path_unique).stubs.c$(if $(subst _full,,_$(ROS_BUILDDEPS)),, $(intermediate_path_unique).stubs.o.d) $(dependencies) | $(intermediate_dir)\n" - "\t$(ECHO_CC)\n" - "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c $<\n", +Rule winebuildRule ( "$(eval $(call RBUILD_WINEBUILD_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags),$(module_dllname)))\n", + "$(intermediate_path_unique).auto.def", "$(intermediate_path_unique).stubs.c", "$(intermediate_path_unique).stubs.o", "$(intermediate_path_unique).stubs.o.d", "$(intermediate_dir)$(SEP)", NULL ); -Rule widlHeaderRule ( "$(source): ${$(module_name)_precondition}\n" - "$(intermediate_path_noext).h: $(source) $(dependencies) $(WIDL_TARGET) | $(intermediate_dir)\n" - "\t$(ECHO_WIDL)\n" - "\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h -H $(intermediate_path_noext).h $(source)\n", +Rule gasRule ( "$(eval $(call RBUILD_GAS_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", + "$(intermediate_path_unique).o", + "$(intermediate_path_unique).o.d", NULL ); +Rule gccRule ( "$(eval $(call RBUILD_GCC_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", + "$(intermediate_path_unique).o", + "$(intermediate_path_unique).o.d", NULL ); +Rule gccHostRule ( "$(eval $(call RBUILD_HOST_GCC_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", + "$(intermediate_path_unique).o", NULL ); +Rule gppRule ( "$(eval $(call RBUILD_GPP_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", + "$(intermediate_path_unique).o", + "$(intermediate_path_unique).o.d", NULL ); +Rule gppHostRule ( "$(eval $(call RBUILD_HOST_GPP_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", + "$(intermediate_path_unique).o", NULL ); +Rule widlHeaderRule ( "$(eval $(call RBUILD_WIDL_HEADER_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", "$(intermediate_path_noext).h", "$(intermediate_dir)$(SEP)", NULL ); -Rule widlInterfaceRule ( "$(source): ${$(module_name)_precondition}\n" - "$(intermediate_path_noext)_i.c: $(source) $(dependencies) $(WIDL_TARGET) | $(intermediate_dir)\n" - "\t$(ECHO_WIDL)\n" - "\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -u -U $(intermediate_path_noext)_i.c $(source)\n" - "$(intermediate_path_noext)_i.o: $(intermediate_path_noext)_i.c $(dependencies) | $(intermediate_dir)\n" - "\t$(ECHO_CC)\n" - "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -fno-unit-at-a-time -c $<\n", - "$(intermediate_path_noext)_i.c", - "$(intermediate_path_noext)_i.o", - "$(intermediate_dir)$(SEP)", NULL ); -Rule widlServerRule ( "$(source): ${$(module_name)_precondition}\n" - "$(intermediate_path_noext)_s.c $(intermediate_path_noext)_s.h: $(source) $(dependencies) $(WIDL_TARGET) | $(intermediate_dir)\n" - "\t$(ECHO_WIDL)\n" - "\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h -H $(intermediate_path_noext)_s.h -s -S $(intermediate_path_noext)_s.c $(source)\n" - "ifeq ($(ROS_BUILDDEPS),full)\n" - "$(intermediate_path_noext)_s.o.d: $(intermediate_path_noext)_s.c | $(intermediate_dir)\n" - "\t$(ECHO_DEPENDS)\n" - "\t${gcc} -MF $@ $($(module_name)_CFLAGS)$(compiler_flags) -fno-unit-at-a-time -M -MP -MT $@ $<\n" - "-include $(intermediate_path_noext)_s.o.d\n" - "endif\n" - "$(intermediate_path_noext)_s.o: $(intermediate_path_noext)_s.c $(intermediate_path_noext)_s.h$(if $(subst _full,,_$(ROS_BUILDDEPS)),, $(intermediate_path_noext)_s.o.d) $(dependencies) | $(intermediate_dir)\n" - "\t$(ECHO_CC)\n" - "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -fno-unit-at-a-time -c $<\n", +Rule widlServerRule ( "$(eval $(call RBUILD_WIDL_SERVER_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", "$(intermediate_path_noext)_s.h", "$(intermediate_path_noext)_s.c", "$(intermediate_path_noext)_s.o", - "$(intermediate_path_noext)_s.o.d", "$(intermediate_dir)$(SEP)", NULL ); -Rule widlClientRule ( "$(source): ${$(module_name)_precondition}\n" - "$(intermediate_path_noext)_c.c $(intermediate_path_noext)_c.h: $(source) $(dependencies) $(WIDL_TARGET) | $(intermediate_dir)\n" - "\t$(ECHO_WIDL)\n" - "\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h -H $(intermediate_path_noext)_c.h -c -C $(intermediate_path_noext)_c.c $(source)\n" - "ifeq ($(ROS_BUILDDEPS),full)\n" - "$(intermediate_path_noext)_c.o.d: $(intermediate_path_noext)_c.c | $(intermediate_dir)\n" - "\t$(ECHO_DEPENDS)\n" - "\t${gcc} -MF $@ $($(module_name)_CFLAGS)$(compiler_flags) -fno-unit-at-a-time -M -MP -MT $@ $<\n" - "-include $(intermediate_path_noext)_c.o.d\n" - "endif\n" - "$(intermediate_path_noext)_c.o: $(intermediate_path_noext)_c.c $(intermediate_path_noext)_c.h$(if $(subst _full,,_$(ROS_BUILDDEPS)),, $(intermediate_path_noext)_c.o.d) $(dependencies) | $(intermediate_dir)\n" - "\t$(ECHO_CC)\n" - "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -fno-unit-at-a-time -c $<\n", +Rule widlClientRule ( "$(eval $(call RBUILD_WIDL_CLIENT_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", "$(intermediate_path_noext)_c.h", "$(intermediate_path_noext)_c.c", "$(intermediate_path_noext)_c.o", - "$(intermediate_path_noext)_c.o.d", "$(intermediate_dir)$(SEP)", NULL ); -Rule widlProxyRule ( "$(source): ${$(module_name)_precondition}\n" - "$(intermediate_path_noext)_p.c $(intermediate_path_noext)_p.h: $(source) $(dependencies) $(WIDL_TARGET) | $(intermediate_dir)\n" - "\t$(ECHO_WIDL)\n" - "\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h -H $(intermediate_path_noext)_p.h -p -P $(intermediate_path_noext)_p.c $(source)\n" - "ifeq ($(ROS_BUILDDEPS),full)\n" - "$(intermediate_path_noext)_p.o.d: $(intermediate_path_noext)_p.c | $(intermediate_dir)\n" - "\t$(ECHO_DEPENDS)\n" - "\t${gcc} -MF $@ $($(module_name)_CFLAGS)$(compiler_flags) -fno-unit-at-a-time -M -MP -MT $@ $<\n" - "-include $(intermediate_path_noext)_p.o.d\n" - "endif\n" - "$(intermediate_path_noext)_p.o: $(intermediate_path_noext)_p.c $(intermediate_path_noext)_p.h$(if $(subst _full,,_$(ROS_BUILDDEPS)),, $(intermediate_path_noext)_p.o.d) $(dependencies) | $(intermediate_dir)\n" - "\t$(ECHO_CC)\n" - "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -fno-unit-at-a-time -c $<\n", +Rule widlProxyRule ( "$(eval $(call RBUILD_WIDL_PROXY_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", "$(intermediate_path_noext)_p.h", "$(intermediate_path_noext)_p.c", "$(intermediate_path_noext)_p.o", - "$(intermediate_path_noext)_p.o.d", "$(intermediate_dir)$(SEP)", NULL ); -Rule widlDlldataRule ( "$(source): $(dependencies) ${$(module_name)_precondition} $(WIDL_TARGET) | $(intermediate_dir)\n" - "\t$(ECHO_WIDL)\n" - "\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) --dlldata-only --dlldata=$(source) $(bare_dependencies)\n" - "ifeq ($(ROS_BUILDDEPS),full)\n" - "$(intermediate_path_noext).o.d: $(source) | $(intermediate_dir)\n" - "\t$(ECHO_DEPENDS)\n" - "\t${gcc} -MF $@ $($(module_name)_CFLAGS)$(compiler_flags) -M -MP -MT $@ $<\n" - "-include $(intermediate_path_noext).o.d\n" - "endif\n" - "$(intermediate_path_noext).o: $(source)$(if $(subst _full,,_$(ROS_BUILDDEPS)),, $(intermediate_path_noext).o.d) $(dependencies) | $(intermediate_dir)\n" - "\t$(ECHO_CC)\n" - "\t${gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c $<\n", - "$(intermediate_path_noext).o", - "$(intermediate_path_noext).o.d", NULL ); -Rule widlTlbRule ( "$(source): ${$(module_name)_precondition}\n" - "$(intermediate_dir)$(SEP)$(module_name).tlb: $(source) $(dependencies) $(WIDL_TARGET) | $(intermediate_dir)\n" - "\t$(ECHO_WIDL)\n" - "\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -t -T $(intermediate_path_noext).tlb $(source)\n", +Rule widlInterfaceRule ( "$(eval $(call RBUILD_WIDL_INTERFACE_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", + "$(intermediate_path_noext)_i.c", + "$(intermediate_path_noext)_i.o", + "$(intermediate_dir)$(SEP)", NULL ); +Rule widlDlldataRule ( "$(eval $(call RBUILD_WIDL_DLLDATA_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags),$(bare_dependencies)))\n", + "$(intermediate_path_noext).o", NULL ); +Rule widlTlbRule ( "$(eval $(call RBUILD_WIDL_TLB_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", "$(intermediate_dir)$(SEP)", NULL ); -Rule gccRule ( "$(eval $(call RBUILD_GCC_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_unique).o", - "$(intermediate_path_unique).o.d", NULL ); -Rule gccHostRule ( "$(source): ${$(module_name)_precondition}\n" - "$(intermediate_path_unique).o: $(source) $(dependencies) | $(intermediate_dir)\n" - "\t$(ECHO_HOSTCC)\n" - "\t${host_gcc} -o $@ $($(module_name)_CFLAGS)$(compiler_flags) -c $<\n", - "$(intermediate_path_unique).o", NULL ); -Rule gppRule ( "$(eval $(call RBUILD_GPP_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", - "$(intermediate_path_unique).o", - "$(intermediate_path_unique).o.d", NULL ); -Rule gppHostRule ( "$(source): ${$(module_name)_precondition}\n" - "$(intermediate_path_unique).o: $(source) $(dependencies) | $(intermediate_dir)\n" - "\t$(ECHO_HOSTCC)\n" - "\t${host_gpp} -o $@ $($(module_name)_CXXFLAGS)$(compiler_flags) -c $<\n", - "$(intermediate_path_unique).o", NULL ); -Rule pchRule ( "$(source): ${$(module_name)_precondition}\n" - "ifeq ($(ROS_BUILDDEPS),full)\n" - "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d: $(source) | $(intermediate_dir)\n" - "\t$(ECHO_DEPENDS)\n" - "\t$(pch_cc) -MF $@ $(pch_ccflags)$(compiler_flags) -x $(pch_language) -M -MP -MT $@ $<\n" - "-include $(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d\n" - "endif\n" - "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch: $(source)$(if $(subst _full,,_$(ROS_BUILDDEPS)),, $(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d) $(dependencies) | $(intermediate_dir)$(SEP).gch_$(module_name)\n" - "\t$(ECHO_PCH)\n" - "\t$(pch_cc) -o $@ $(pch_ccflags)$(compiler_flags) -x $(pch_language) -c $<\n", +Rule pchRule ( "$(eval $(call RBUILD_GCC_PCH_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch", - "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d", NULL ); + "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d", + "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)", NULL ); +Rule pchCxxRule ( "$(eval $(call RBUILD_GPP_PCH_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n", + "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch", + "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d", + "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)", NULL ); +Rule bootRule ( "$(eval $(call RBUILD_NASM,$(module_name),$(source),$(dependencies),,$(module_output)))\n", + "$(module_output)", + "$(OUTPUT)$(SEP)$(source_dir)$(SEP)", NULL ); +Rule nasmRule ( "$(eval $(call RBUILD_NASM,$(module_name),$(source),$(dependencies),,$(intermediate_path_unique).o))\n", + "$(intermediate_path_unique).o", + "$(intermediate_dir)$(SEP)", NULL ); + +/* TODO: move these to rules.mak */ +Rule wmcRule ( "$(intermediate_path_noext).rc $(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h: $(WMC_TARGET) $(source) | $(intermediate_dir)\n" + "\t$(ECHO_WMC)\n" + "\t$(Q)$(WMC_TARGET) -i -H $(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h -o $(intermediate_path_noext).rc $(source)\n", + "$(intermediate_path_noext).rc", + "$(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h", + "$(intermediate_dir)$(SEP)", NULL ); +/* TODO: if possible, move these to rules.mak */ +Rule arRule1 ( "$(intermediate_path_noext).a: $($(module_name)_OBJS) $(dependencies) | $(intermediate_dir)\n", + "$(intermediate_path_noext).a", + "$(intermediate_dir)$(SEP)", NULL ); +Rule arRule2 ( "\t$(ECHO_AR)\n" + "\t${ar} -rc $@ $($(module_name)_OBJS)\n", + NULL ); +Rule arHostRule2 ( "\t$(ECHO_HOSTAR)\n" + "\t${host_ar} -rc $@ $($(module_name)_OBJS)\n", + NULL ); + Rule emptyRule ( "", NULL ); void @@ -1293,13 +1160,6 @@ MingwModuleHandler::GenerateGccCommand ( const FileLocation *pchFilename = GetPrecompiledHeaderFilename (); string dependencies = extraDependencies; - string flags; - string extension = GetExtension ( *sourceFile ); - if ( extension == ".cc" || extension == ".cpp" || extension == ".cxx" ) - flags = GenerateCompilerParametersFromVector ( module.non_if_data.compilerFlags, CompilerTypeCPP ); - else - flags = GenerateCompilerParametersFromVector ( module.non_if_data.compilerFlags, CompilerTypeCC ); - if ( pchFilename ) { dependencies += " " + backend->GetFullName ( *pchFilename ); @@ -1312,7 +1172,7 @@ MingwModuleHandler::GenerateGccCommand ( if ( rpcDependencies.size () > 0 ) dependencies += " " + v2s ( backend, rpcDependencies, 5 ); - rule->Execute ( fMakefile, backend, module, sourceFile, clean_files, dependencies, flags ); + rule->Execute ( fMakefile, backend, module, sourceFile, clean_files, dependencies ); } string @@ -1406,8 +1266,6 @@ MingwModuleHandler::GenerateCommands ( size_t i; Rule *customRule = NULL; - fprintf ( fMakefile, "# COMMANDS\n" ); - for ( i = 0; i < sizeof ( rules ) / sizeof ( rules[0] ); i++ ) { if ( rules[i].host != HostDontCare && rules[i].host != ModuleHandlerInformations[module.type].DefaultHost ) @@ -1735,8 +1593,6 @@ MingwModuleHandler::GenerateObjectFileTargets ( const IfableData& data ) { GenerateCommands ( *compilationUnits[i], moduleDependencies ); - fprintf ( fMakefile, - "\n" ); } vector sourceCompilationUnits; @@ -1748,20 +1604,6 @@ MingwModuleHandler::GenerateObjectFileTargets ( const IfableData& data ) } CleanupCompilationUnitVector ( sourceCompilationUnits ); - SpecFileType spec = IsSpecDefinitionFile (); - - if ( spec ) - { - Rule * defRule; - - if (spec == PSpec) - defRule = &winebuildPRule; - else - defRule = &winebuildRule; - - defRule->Execute ( fMakefile, backend, module, module.importLibrary->source, clean_files ); - } - if ( module.type == RpcProxy ) { widlDlldataRule.Execute ( fMakefile, @@ -1783,22 +1625,6 @@ MingwModuleHandler::GenerateObjectFileTargets () std::map vars; - if ( ModuleHandlerInformations[module.type].DefaultHost == HostTrue ) - vars["pch_cc"] = "${host_gcc}"; - else - vars["pch_cc"] = "${gcc}"; - - if ( module.cplusplus ) - { - vars["pch_language"] = "c++-header"; - vars["pch_ccflags"] = cxxflagsMacro.c_str(); - } - else - { - vars["pch_language"] = "c-header"; - vars["pch_ccflags"] = cflagsMacro.c_str(); - } - /* WIDL generated headers may be used */ string dependencies; vector rpcDependencies; @@ -1806,14 +1632,11 @@ MingwModuleHandler::GenerateObjectFileTargets () if ( rpcDependencies.size () > 0 ) dependencies = " " + v2s ( backend, rpcDependencies, 5 ); - pchRule.Execute ( fMakefile, - backend, - module, - module.pch->file, - clean_files, - dependencies, - GenerateCompilerParametersFromVector ( module.non_if_data.compilerFlags, module.cplusplus ? CompilerTypeCPP : CompilerTypeCC ).c_str(), - vars ); + if ( module.cplusplus ) + pchCxxRule.Execute ( fMakefile, backend, module, module.pch->file, clean_files, dependencies ); + else + pchRule.Execute ( fMakefile, backend, module, module.pch->file, clean_files, dependencies ); + fprintf ( fMakefile, "\n" ); } @@ -1871,12 +1694,6 @@ MingwModuleHandler::GetObjectsMacro ( const Module& module ) module.name.c_str () ); } -string -MingwModuleHandler::GetLinkingDependenciesMacro () const -{ - return ssprintf ( "$(%s_LINKDEPS)", module.name.c_str () ); -} - string MingwModuleHandler::GetLibsMacro () const { @@ -1891,7 +1708,7 @@ MingwModuleHandler::GetLinkerMacro () const } string -MingwModuleHandler::GetDebugFormat () const +MingwModuleHandler::GetDebugFormat () { if (Environment::GetArch() == "amd64") { @@ -1919,7 +1736,8 @@ MingwModuleHandler::GenerateSourceMacro () { sourcesMacro = ssprintf ( "%s_SOURCES", module.name.c_str ()); - GenerateSourceMacros ( module.non_if_data ); + if ( module.type == RpcProxy || module.type == Cabinet ) + GenerateSourceMacros ( module.non_if_data ); // future references to the macro will be to get its values sourcesMacro = ssprintf ("$(%s)", sourcesMacro.c_str ()); @@ -1939,7 +1757,6 @@ MingwModuleHandler::GenerateObjectMacro () void MingwModuleHandler::GenerateTargetMacro () { - fprintf ( fMakefile, "# TARGET MACRO\n" ); fprintf ( fMakefile, "%s := %s\n", GetTargetMacro ( module, false ).c_str (), @@ -2001,166 +1818,60 @@ MingwModuleHandler::GenerateOtherMacros () { set used_defs; - fprintf ( fMakefile, "# OTHER MACROS\n" ); - - commonflagsMacro = ssprintf ("%s_COMMONFLAGS", module.name.c_str ()); - cflagsMacro = ssprintf ("%s_CFLAGS", module.name.c_str ()); - cxxflagsMacro = ssprintf ("%s_CXXFLAGS", module.name.c_str ()); - nasmflagsMacro = ssprintf ("%s_NASMFLAGS", module.name.c_str ()); - windresflagsMacro = ssprintf ("%s_RCFLAGS", module.name.c_str ()); - widlflagsMacro = ssprintf ("%s_WIDLFLAGS", module.name.c_str ()); linkerflagsMacro = ssprintf ("%s_LFLAGS", module.name.c_str ()); libsMacro = ssprintf("%s_LIBS", module.name.c_str ()); - linkDepsMacro = ssprintf ("%s_LINKDEPS", module.name.c_str ()); - GenerateMacros ( - "=", - module.non_if_data, - &module.linkerFlags, - used_defs ); + const FileLocation * pchPath = GetPrecompiledHeaderPath (); - if ( ModuleHandlerInformations[module.type].DefaultHost == HostTrue ) + if ( pchPath ) { - GenerateMacros("+=", module.project.host_non_if_data, NULL, used_defs); - } - else - { - GenerateMacros ( - "+=", - module.project.non_if_data, - NULL, - used_defs ); - } + string pchPathStr = backend->GetFullName ( *pchPath ); + delete pchPath; - if ( IsSpecDefinitionFile() ) - { - vector s; - GetSpecImplibDependencies ( s, module.importLibrary->source ); - - fprintf ( - fMakefile, - "%s +=", - linkDepsMacro.c_str() ); - for ( size_t i = 0; i < s.size(); i++ ) - fprintf ( fMakefile, - " %s", - backend->GetFullName ( s[i] ).c_str () ); - fprintf ( fMakefile, "\n" ); - } + fprintf ( fMakefile, + "%s_%sINCLUDES+= -I%s\n", + module.name.c_str(), + CompilerPrefixTable[CompilerTypeCC], + pchPathStr.c_str() ); - string globalCflags = " "; - globalCflags += ssprintf ("$(%s)", commonflagsMacro.c_str ()); - if ( ModuleHandlerInformations[module.type].DefaultHost == HostFalse ) - { - if ( module.dynamicCRT ) - globalCflags += " -D_DLL -D__USE_CRTIMP"; - } - else - globalCflags += " -Wall -Wpointer-arith"; - globalCflags += " -g" + MingwModuleHandler::GetDebugFormat (); - if ( backend->usePipe ) - globalCflags += " -pipe"; - if ( !module.allowWarnings ) - globalCflags += " -Werror"; - if ( ModuleHandlerInformations[module.type].DefaultHost == HostTrue ) - { - if ( module.cplusplus ) - globalCflags += " $(HOST_CPPFLAGS)"; - else - globalCflags += " -Wno-strict-aliasing $(HOST_CFLAGS)"; - } - else - { - if ( module.cplusplus ) - { - globalCflags += " $(TARGET_CPPFLAGS)"; - } - else - globalCflags += " -nostdinc"; + fprintf ( fMakefile, + "%s_%sINCLUDES+= -I%s\n", + module.name.c_str(), + CompilerPrefixTable[CompilerTypeCXX], + pchPathStr.c_str() ); } - // 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"; + const char * toolPrefix = ""; - if ( ModuleHandlerInformations[module.type].DefaultHost == HostFalse ) - { - fprintf ( - fMakefile, - "%s +=%s\n", - cflagsMacro.c_str (), - (" $(PROJECT_CFLAGS)" + globalCflags).c_str () ); - - fprintf ( - fMakefile, - "%s +=%s\n", - cxxflagsMacro.c_str (), - (" $(PROJECT_CXXFLAGS)" + globalCflags).c_str () ); - - fprintf ( - fMakefile, - "%s += $(PROJECT_RCFLAGS)\n", - windresflagsMacro.c_str () ); - - fprintf ( - fMakefile, - "%s += $(PROJECT_WIDLFLAGS) -I%s\n", - widlflagsMacro.c_str (), - module.output->relative_path.c_str () ); + if ( ModuleHandlerInformations[module.type].DefaultHost == HostTrue ) + toolPrefix = "HOST_"; - fprintf ( - fMakefile, - "%s_LFLAGS := $(PROJECT_LFLAGS) $(%s_LFLAGS)\n", - module.name.c_str (), - module.name.c_str () ); - } - else + // FIXME: this is very ugly and generates lots of useless entries + for ( unsigned type = CompilerTypeCC; type < CompilerTypesCount; ++ type ) { - fprintf ( - fMakefile, - "%s +=%s\n", - cflagsMacro.c_str (), - globalCflags.c_str () ); + string flags; - fprintf ( - fMakefile, - "%s +=%s\n", - cxxflagsMacro.c_str (), - globalCflags.c_str () ); + if ( module.dynamicCRT ) + flags += ssprintf ( " $(%s%sFLAG_CRTDLL)", toolPrefix, CompilerPrefixTable[type] ); - fprintf ( - fMakefile, - "%s_LFLAGS += $(HOST_LFLAGS)\n", - module.name.c_str () ); - } + // FIXME: this duplicates the flag for CPP and C/CXX + if ( !module.allowWarnings ) + flags += ssprintf ( " $(%s%sFLAG_WERROR)", toolPrefix, CompilerPrefixTable[type] ); - fprintf ( - fMakefile, - "%s += $(%s)\n", - linkDepsMacro.c_str (), - libsMacro.c_str () ); + if ( module.isUnicode ) + flags += ssprintf ( " $(%s%sFLAG_UNICODE)", toolPrefix, CompilerPrefixTable[type] ); - const char *cflags = ModuleHandlerInformations[module.type].cflags; - if ( strlen( cflags ) > 0 ) - { - fprintf ( fMakefile, - "%s += %s\n\n", - cflagsMacro.c_str (), - cflags ); - fprintf ( fMakefile, - "%s += %s\n\n", - cxxflagsMacro.c_str (), - cflags ); + if ( flags.size() ) + { + fprintf ( fMakefile, + "%s_%sFLAGS+=%s\n", + module.name.c_str(), + CompilerPrefixTable[type], + flags.c_str() ); + } } - const char* nasmflags = ModuleHandlerInformations[module.type].nasmflags; - if ( strlen( nasmflags ) > 0 ) - { - fprintf ( fMakefile, - "%s += %s\n\n", - nasmflagsMacro.c_str (), - nasmflags ); - } + GenerateParameters ( module.name.c_str(), "+=", module.non_if_data ); const char *linkerflags = ModuleHandlerInformations[module.type].linkerflags; if ( strlen( linkerflags ) > 0 ) @@ -2171,14 +1882,26 @@ MingwModuleHandler::GenerateOtherMacros () linkerflags ); } - fprintf ( fMakefile, "\n\n" ); + // FIXME: make rules for linker, move standard flags there + if ( ModuleHandlerInformations[module.type].DefaultHost == HostFalse ) + { + if ( module.cplusplus ) + fprintf ( fMakefile, + "%s+= $(PROJECT_LPPFLAGS)\n\n", + linkerflagsMacro.c_str () ); + else + fprintf ( fMakefile, + "%s+= $(PROJECT_LFLAGS)\n\n", + linkerflagsMacro.c_str () ); + } - // future references to the macros will be to get their values - commonflagsMacro = ssprintf ("$(%s)", commonflagsMacro.c_str ()); - cflagsMacro = ssprintf ("$(%s)", cflagsMacro.c_str ()); - cxxflagsMacro = ssprintf ("$(%s)", cxxflagsMacro.c_str ()); - nasmflagsMacro = ssprintf ("$(%s)", nasmflagsMacro.c_str ()); - widlflagsMacro = ssprintf ("$(%s)", widlflagsMacro.c_str ()); + GenerateMacros ( + "+=", + module.non_if_data, + &module.linkerFlags, + used_defs ); + + fprintf ( fMakefile, "\n\n" ); } void @@ -2221,9 +1944,9 @@ MingwModuleHandler::GenerateRules () Rule * defRule; if (spec == PSpec) - defRule = &winebuildPDefRule; + defRule = &winebuildPRule; else - defRule = &winebuildDefRule; + defRule = &winebuildRule; defRule->Execute ( fMakefile, backend, module, module.importLibrary->source, clean_files ); } @@ -2461,16 +2184,6 @@ MingwModuleHandler::GetSpecObjectDependencies ( GetBasename ( file->name ) + "_" + module.name + ".stubs.c" ) ); } -void -MingwModuleHandler::GetSpecImplibDependencies ( - vector& dependencies, - const FileLocation *file ) const -{ - dependencies.push_back ( FileLocation ( IntermediateDirectory, - file->relative_path, - GetBasename ( file->name ) + "_" + module.name + ".auto.def" ) ); -} - void MingwModuleHandler::GetMcObjectDependencies ( vector& dependencies, @@ -2604,7 +2317,6 @@ MingwBuildToolModuleHandler::GenerateBuildToolModuleTarget () { string targetMacro ( GetTargetMacro (module) ); string objectsMacro = GetObjectsMacro ( module ); - string linkDepsMacro = GetLinkingDependenciesMacro (); string libsMacro = GetLibsMacro (); GenerateRules (); @@ -2621,7 +2333,7 @@ MingwBuildToolModuleHandler::GenerateBuildToolModuleTarget () fprintf ( fMakefile, "%s: %s %s | %s\n", targetMacro.c_str (), objectsMacro.c_str (), - linkDepsMacro.c_str (), + libsMacro.c_str (), backend->GetFullPath ( *target_file ).c_str () ); fprintf ( fMakefile, "\t$(ECHO_HOSTLD)\n" ); fprintf ( fMakefile, @@ -2653,7 +2365,7 @@ MingwKernelModuleHandler::GenerateKernelModuleTarget () { string targetMacro ( GetTargetMacro ( module ) ); string workingDirectory = GetWorkingDirectory ( ); - string linkDepsMacro = GetLinkingDependenciesMacro (); + string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2661,7 +2373,7 @@ MingwKernelModuleHandler::GenerateKernelModuleTarget () { GenerateRules (); - string dependencies = linkDepsMacro + " " + objectsMacro; + string dependencies = libsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=native -entry=%s -image-base=%s", module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), @@ -2704,7 +2416,7 @@ MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget () { string targetMacro ( GetTargetMacro ( module ) ); string workingDirectory = GetWorkingDirectory (); - string linkDepsMacro = GetLinkingDependenciesMacro (); + string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2712,7 +2424,7 @@ MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget () { GenerateRules (); - string dependencies = linkDepsMacro + " " + objectsMacro; + string dependencies = libsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=native -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000 -shared", module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), @@ -2753,7 +2465,7 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget () { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string linkDepsMacro = GetLinkingDependenciesMacro (); + string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2761,7 +2473,7 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget () { GenerateRules (); - string dependencies = linkDepsMacro + " " + objectsMacro; + string dependencies = libsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=native -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000 -shared", module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), @@ -2802,7 +2514,7 @@ MingwNativeCUIModuleHandler::GenerateNativeCUIModuleTarget () { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string linkDepsMacro = GetLinkingDependenciesMacro (); + string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2810,7 +2522,7 @@ MingwNativeCUIModuleHandler::GenerateNativeCUIModuleTarget () { GenerateRules (); - string dependencies = linkDepsMacro + " " + objectsMacro; + string dependencies = libsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=native -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000", module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), @@ -2892,7 +2604,7 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget () { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string linkDepsMacro = GetLinkingDependenciesMacro (); + string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2900,7 +2612,7 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget () { GenerateRules (); - string dependencies = linkDepsMacro + " " + objectsMacro; + string dependencies = libsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=console -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000 -shared", module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), @@ -2933,7 +2645,7 @@ MingwWin32OCXModuleHandler::GenerateWin32OCXModuleTarget () { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string linkDepsMacro = GetLinkingDependenciesMacro (); + string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2941,7 +2653,7 @@ MingwWin32OCXModuleHandler::GenerateWin32OCXModuleTarget () { GenerateRules (); - string dependencies = linkDepsMacro + " " + objectsMacro; + string dependencies = libsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=console -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000 -shared", module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), @@ -2981,7 +2693,7 @@ MingwWin32CUIModuleHandler::GenerateWin32CUIModuleTarget () { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string linkDepsMacro = GetLinkingDependenciesMacro (); + string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2989,7 +2701,7 @@ MingwWin32CUIModuleHandler::GenerateWin32CUIModuleTarget () { GenerateRules (); - string dependencies = linkDepsMacro + " " + objectsMacro; + string dependencies = libsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=console -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000", module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), @@ -3029,7 +2741,7 @@ MingwWin32GUIModuleHandler::GenerateWin32GUIModuleTarget () { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string linkDepsMacro = GetLinkingDependenciesMacro (); + string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -3037,7 +2749,7 @@ MingwWin32GUIModuleHandler::GenerateWin32GUIModuleTarget () { GenerateRules (); - string dependencies = linkDepsMacro + " " + objectsMacro; + string dependencies = libsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=windows -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000", module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), @@ -3069,6 +2781,7 @@ MingwBootLoaderModuleHandler::Process () void MingwBootLoaderModuleHandler::GenerateBootLoaderModuleTarget () { + fprintf ( fMakefile, "# BOOT LOADER MODULE TARGET\n" ); string targetName ( module.output->name ); string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory (); @@ -3077,17 +2790,15 @@ MingwBootLoaderModuleHandler::GenerateBootLoaderModuleTarget () module.name + ".junk.tmp" ); CLEAN_FILE ( junk_tmp ); string objectsMacro = GetObjectsMacro ( module ); - string linkDepsMacro = GetLinkingDependenciesMacro (); + string libsMacro = GetLibsMacro (); GenerateRules (); - fprintf ( fMakefile, "# BOOT LOADER MODULE TARGET\n" ); - const FileLocation *target_file = GetTargetFilename ( module, NULL ); fprintf ( fMakefile, "%s: %s %s | %s\n", targetMacro.c_str (), objectsMacro.c_str (), - linkDepsMacro.c_str (), + libsMacro.c_str (), backend->GetFullPath ( *target_file ).c_str () ); fprintf ( fMakefile, "\t$(ECHO_LD)\n" ); @@ -3098,7 +2809,7 @@ MingwBootLoaderModuleHandler::GenerateBootLoaderModuleTarget () "\t${gcc} -Wl,--subsystem,native -Wl,--section-start,startup=0x8000 -o %s %s %s %s\n", backend->GetFullName ( junk_tmp ).c_str (), objectsMacro.c_str (), - linkDepsMacro.c_str (), + libsMacro.c_str (), GetLinkerMacro ().c_str ()); } else @@ -3107,7 +2818,7 @@ MingwBootLoaderModuleHandler::GenerateBootLoaderModuleTarget () "\t${gcc} -Wl,--subsystem,native -Wl,-Ttext,0x8000 -o %s %s %s %s\n", backend->GetFullName ( junk_tmp ).c_str (), objectsMacro.c_str (), - linkDepsMacro.c_str (), + libsMacro.c_str (), GetLinkerMacro ().c_str ()); } fprintf ( fMakefile, @@ -3137,6 +2848,8 @@ MingwBootProgramModuleHandler::Process () void MingwBootProgramModuleHandler::GenerateBootProgramModuleTarget () { + fprintf ( fMakefile, "# BOOT PROGRAM MODULE TARGET\n" ); + string targetName ( module.output->name ); string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory (); @@ -3153,18 +2866,16 @@ MingwBootProgramModuleHandler::GenerateBootProgramModuleTarget () CLEAN_FILE ( junk_elf ); CLEAN_FILE ( junk_cpy ); string objectsMacro = GetObjectsMacro ( module ); - string linkDepsMacro = GetLinkingDependenciesMacro (); + string libsMacro = GetLibsMacro (); const Module *payload = module.project.LocateModule ( module.payload ); GenerateRules (); - fprintf ( fMakefile, "# BOOT PROGRAM MODULE TARGET\n" ); - const FileLocation *target_file = GetTargetFilename ( module, NULL ); fprintf ( fMakefile, "%s: %s %s %s | %s\n", targetMacro.c_str (), objectsMacro.c_str (), - linkDepsMacro.c_str (), + libsMacro.c_str (), payload->name.c_str (), backend->GetFullPath ( *target_file ).c_str () ); @@ -3182,7 +2893,7 @@ MingwBootProgramModuleHandler::GenerateBootProgramModuleTarget () fprintf ( fMakefile, "\t${ld} $(%s_LINKFORMAT) %s %s -o %s\n", module.buildtype.c_str (), - linkDepsMacro.c_str (), + libsMacro.c_str (), backend->GetFullName ( junk_tmp ).c_str (), backend->GetFullName ( junk_elf ).c_str () ); @@ -3627,7 +3338,7 @@ MingwTestModuleHandler::GenerateTestModuleTarget () { string targetMacro ( GetTargetMacro ( module ) ); string workingDirectory = GetWorkingDirectory ( ); - string linkDepsMacro = GetLinkingDependenciesMacro (); + string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -3635,7 +3346,7 @@ MingwTestModuleHandler::GenerateTestModuleTarget () { GenerateRules (); - string dependencies = linkDepsMacro + " " + objectsMacro; + string dependencies = libsMacro + " " + objectsMacro; string linkerParameters = ssprintf ( "-subsystem=console -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000", module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), @@ -3674,11 +3385,11 @@ MingwCabinetModuleHandler::MingwCabinetModuleHandler ( void MingwCabinetModuleHandler::Process () { + fprintf ( fMakefile, "# CABINET MODULE TARGET\n" ); string targetMacro ( GetTargetMacro (module) ); GenerateRules (); - fprintf ( fMakefile, "# CABINET MODULE TARGET\n" ); const FileLocation *target_file = GetTargetFilename ( module, NULL ); fprintf ( fMakefile, "%s: $(CABMAN_TARGET) | %s\n", targetMacro.c_str (), @@ -3705,18 +3416,17 @@ MingwElfExecutableModuleHandler::Process () string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory (); string objectsMacro = GetObjectsMacro ( module ); - string linkDepsMacro = GetLinkingDependenciesMacro (); string libsMacro = GetLibsMacro (); string debugFormat = GetDebugFormat (); + fprintf ( fMakefile, "# ELF EXECUTABLE TARGET\n" ); GenerateRules (); - fprintf ( fMakefile, "# ELF EXECUTABLE TARGET\n" ); const FileLocation *target_file = GetTargetFilename ( module, NULL ); fprintf ( fMakefile, "%s: %s %s | %s\n", targetMacro.c_str (), objectsMacro.c_str (), - linkDepsMacro.c_str (), + libsMacro.c_str (), backend->GetFullPath ( *target_file ).c_str () ); fprintf ( fMakefile, "\t$(ECHO_BOOTPROG)\n" ); @@ -3729,4 +3439,5 @@ MingwElfExecutableModuleHandler::Process () targetMacro.c_str () ); delete target_file; + fprintf ( fMakefile, "#/ELF EXECUTABLE TARGET\n" ); } diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.h b/reactos/tools/rbuild/backend/mingw/modulehandler.h index d6a529d016c..5b02cb9975a 100644 --- a/reactos/tools/rbuild/backend/mingw/modulehandler.h +++ b/reactos/tools/rbuild/backend/mingw/modulehandler.h @@ -60,7 +60,13 @@ public: string_list* pclean_files ); static std::string GenerateGccDefineParametersFromVector ( const std::vector& defines, std::set &used_defs ); - static std::string GenerateGccIncludeParametersFromVector ( const std::vector& includes ); + static std::string GenerateDefineParametersFromVector ( const std::vector& defines, CompilerType compiler ); + static std::string GenerateCompilerParametersFromVector ( const std::vector& compilerFlags, const CompilerType type ); + static std::string GenerateIncludeParametersFromVector ( const std::vector& includes, CompilerType compiler ); + + static void GenerateParameters ( const char* prefix, + const char* assignmentOperation, + const IfableData& data ); std::string GetModuleTargets ( const Module& module ); void GetObjectsVector ( const IfableData& data, @@ -102,7 +108,7 @@ protected: std::string GetLinkingDependenciesMacro () const; std::string GetLibsMacro () const; std::string GetLinkerMacro () const; - std::string GetDebugFormat () const; + static std::string GetDebugFormat (); void GenerateCleanObjectsAsYouGoCode () const; void GenerateRunRsymCode () const; void GenerateRunStripCode () const; @@ -121,15 +127,9 @@ protected: private: std::string ConcatenatePaths ( const std::string& path1, const std::string& path2 ) const; - std::string GenerateCompilerParametersFromVector ( const std::vector& compilerFlags, const CompilerType type ) const; std::string GenerateLinkerParametersFromVector ( const std::vector& linkerFlags ) const; std::string GenerateImportLibraryDependenciesFromVector ( const std::vector& libraries ); std::string GenerateLinkerParameters () const; - void GenerateMacro ( const char* assignmentOperation, - const std::string& macro, - const IfableData& data, - std::set* used_defs, - bool generatingCompilerMacro ); void GenerateMacros ( const char* op, const IfableData& data, const std::vector* linkerFlags, @@ -137,6 +137,7 @@ private: void GenerateSourceMacros ( const IfableData& data ); void GenerateObjectMacros ( const IfableData& data ); const FileLocation* GetPrecompiledHeaderFilename () const; + const FileLocation* GetPrecompiledHeaderPath () const; const FileLocation* GetDlldataFilename () const; void GenerateGccCommand ( const FileLocation* sourceFile, const Rule *rule, diff --git a/reactos/tools/rbuild/backend/mingw/rules.mak b/reactos/tools/rbuild/backend/mingw/rules.mak index 7b403abbc92..42fdd85db9e 100644 --- a/reactos/tools/rbuild/backend/mingw/rules.mak +++ b/reactos/tools/rbuild/backend/mingw/rules.mak @@ -6,39 +6,201 @@ RBUILD_compress_prefixes=${call RBUILD_compress_prefix,${call RBUILD_compress_pr RBUILD_strip_prefix=${subst >>>,,${subst >>>$($(2)),,>>>$(1)}} RBUILD_strip_prefixes=${subst >>>,,${subst >>>$(SEP),,>>>${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,${call RBUILD_strip_prefix,$(1),INTERMEDIATE},OUTPUT},CDOUTPUT},TEMPORARY},INSTALL}}} +#(source) +RBUILD_intermediate_path_noext=${call RBUILD_intermediate_dir,$(1)}$(SEP)$(basename $(notdir $(1))) + #(module, source) -RBUILD_intermediate_path_unique=${call RBUILD_intermediate_dir,$(2)}$(SEP)$(basename $(notdir $(2)))_$(1) +RBUILD_intermediate_path_unique=${call RBUILD_intermediate_path_noext,$(2)}_$(1) #(source) RBUILD_intermediate_dir=${call RBUILD_fullpath,$(value INTERMEDIATE)$(SEP)$(dir ${call RBUILD_strip_prefixes,$(1)})} -#(module, source, dependencies, cflags) -define RBUILD_GCC_RULE +#(source) +RBUILD_source_name=$(basename $(notdir $(1))) + +#(source) +RBUILD_dir=${call RBUILD_fullpath,$(dir ${call RBUILD_compress_prefixes,$(1)})} + +# FIXME: when RosBE stops hijacking HOST_CFLAGS etc., add CFLAGS etc. + +#(module, flags, includes, compiler, prefix) +RBUILD_compiler_flags=\ +$$(BUILTIN_$(5)$(4)FLAGS) \ +$$(PROJECT_$(5)$(4)FLAGS) \ +$$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \ +$$($(1)_$(4)FLAGS) \ +$(2) + +#(module, flags, includes, compiler, prefix) +RBUILD_compiler_flags_with_cpp=\ +$(3) \ +$$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \ +$$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) $$(MODULETYPE$($(1)_TYPE)_CPPINCLUDES) \ +$$(PROJECT_$(5)$(4)INCLUDES) $$(PROJECT_$(5)CPPINCLUDES) \ +$$(BUILTIN_$(5)$(4)INCLUDES) $$(BUILTIN_$(5)CPPINCLUDES) \ +$$(BUILTIN_$(5)CPPDEFINES) $$(BUILTIN_$(5)CPPFLAGS) $$(BUILTIN_$(5)$(4)DEFINES) $$(BUILTIN_$(5)$(4)FLAGS) \ +$$(PROJECT_$(5)CPPDEFINES) $$(PROJECT_$(5)CPPFLAGS) $$(PROJECT_$(5)$(4)DEFINES) $$(PROJECT_$(5)$(4)FLAGS) \ +$$(MODULETYPE$($(1)_TYPE)_CPPDEFINES) $$(MODULETYPE$($(1)_TYPE)_CPPFLAGS) $$(MODULETYPE$($(1)_TYPE)_$(4)DEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \ +$$($(1)_CPPDEFINES) $$($(1)_CPPFLAGS) $$($(1)_$(4)DEFINES) $$($(1)_$(4)FLAGS) \ +$(2) + +#(module, flags, includes, compiler, prefix) +RBUILD_compiler_flags_builtin_cpp=\ +$(3) \ +$$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \ +$$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) $$(MODULETYPE$($(1)_TYPE)_CPPINCLUDES) \ +$$(PROJECT_$(5)$(4)INCLUDES) $$(PROJECT_$(5)CPPINCLUDES) \ +$$(BUILTIN_$(5)$(4)INCLUDES) $$(BUILTIN_$(5)CPPINCLUDES) \ +$$(BUILTIN_$(5)CPPDEFINES) $$(BUILTIN_$(5)$(4)DEFINES) $$(BUILTIN_$(5)$(4)FLAGS) \ +$$(PROJECT_$(5)CPPDEFINES) $$(PROJECT_$(5)$(4)DEFINES) $$(PROJECT_$(5)$(4)FLAGS) \ +$$(MODULETYPE$($(1)_TYPE)_CPPDEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)DEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \ +$$($(1)_CPPDEFINES) $$($(1)_$(4)DEFINES) $$($(1)_$(4)FLAGS) \ +$(2) + +#(module, flags, includes, compiler, prefix) +RBUILD_compiler_flags_with_includes=\ +$(3) \ +$$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \ +$$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) \ +$$(PROJECT_$(5)$(4)INCLUDES) \ +$$(BUILTIN_$(5)$(4)INCLUDES) \ +$$(BUILTIN_$(5)$(4)FLAGS) \ +$$(PROJECT_$(5)$(4)FLAGS) \ +$$(MODULETYPE$($(1)_TYPE)_$(4)FLAGS) \ +$$($(1)_$(4)FLAGS) \ +$(2) + +#(module, flags, includes, compiler, prefix) +RBUILD_compiler_flags_cpp=\ +$(3) \ +$$($(1)_$(4)INCLUDES) $$($(1)_CPPINCLUDES) \ +$$(MODULETYPE$($(1)_TYPE)_$(4)INCLUDES) $$(MODULETYPE$($(1)_TYPE)_CPPINCLUDES) \ +$$(PROJECT_$(5)$(4)INCLUDES) $$(PROJECT_$(5)CPPINCLUDES) \ +$$(BUILTIN_$(5)$(4)INCLUDES) $$(BUILTIN_$(5)CPPINCLUDES) \ +$$(BUILTIN_$(5)CPPFLAGS) $$(BUILTIN_$(5)CPPDEFINES) $$(BUILTIN_$(5)$(4)DEFINES) \ +$$(PROJECT_$(5)CPPFLAGS) $$(PROJECT_$(5)CPPDEFINES) $$(PROJECT_$(5)$(4)DEFINES) \ +$$(MODULETYPE$($(1)_TYPE)_CPPFLAGS) $$(MODULETYPE$($(1)_TYPE)_CPPDEFINES) $$(MODULETYPE$($(1)_TYPE)_$(4)DEFINES) \ +$$($(1)_CPPFLAGS) $$($(1)_CPPDEFINES) $$($(1)_$(4)DEFINES) \ +$(2) + +#(module, flags, includes) +RBUILD_cflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),C} +RBUILD_cxxflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),CXX} +RBUILD_asflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),AS} +RBUILD_nasmflags=${call RBUILD_compiler_flags_builtin_cpp,$(1),$(2),$(3),NASM} +RBUILD_rc_pp_flags=${call RBUILD_compiler_flags_cpp,$(1),-DRC_INVOKED=1 -D__WIN32__=1 -D__FLAT__=1,$(3) -I.,RC} +RBUILD_rc_flags=${call RBUILD_compiler_flags_with_includes,$(1),$(2),$(3),RC} +RBUILD_spec_pp_flags=${call RBUILD_compiler_flags_cpp,$(1),,$(3),SPEC} +RBUILD_spec_flags=${call RBUILD_compiler_flags,$(1),$(2),,SPEC} +RBUILD_midlflags=${call RBUILD_compiler_flags_builtin_cpp,$(1),$(2),$(3),MIDL} +RBUILD_host_cflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),C,HOST_} +RBUILD_host_cxxflags=${call RBUILD_compiler_flags_with_cpp,$(1),$(2),$(3),CXX,HOST_} + +CFLAG_WERROR:=-Werror +CFLAG_CRTDLL:=-D_DLL -D__USE_CRTIMP + +CXXFLAG_WERROR:=-Werror +CXXFLAG_CRTDLL:=-D_DLL -D__USE_CRTIMP + +CPPFLAG_WERROR:=-Werror +CPPFLAG_UNICODE:=-DUNICODE -D_UNICODE + +RCFLAG_UNICODE:=-DUNICODE -D_UNICODE + +BUILTIN_ASDEFINES+= -D__ASM__ +BUILTIN_CPPFLAGS+= -nostdinc +BUILTIN_CFLAGS+= -fno-optimize-sibling-calls +BUILTIN_CXXFLAGS+= -fno-optimize-sibling-calls +BUILTIN_RCFLAGS+= --nostdinc +BUILTIN_RCDEFINES+= -DRC_INVOKED +BUILTIN_NASMFLAGS+= -f win32 + +#(module, source, dependencies, cflags, output) +define RBUILD_GCC $(2): $${$(1)_precondition} ifeq ($(ROS_BUILDDEPS),full) -${call RBUILD_intermediate_path_unique,$(1),$(2)}.o.d: $(2) | ${call RBUILD_intermediate_dir,$(2)} +$(5).d: $(2) | ${call RBUILD_dir,$(5)} $$(ECHO_DEPENDS) - $${gcc} -MF $$@ $$($(1)_CFLAGS) $(4) -M -MP -MT $$@ $$< + $${gcc} -MF $$@ ${call RBUILD_cflags,$(1),$(4)} -M -MP -MT $$@ $$< --include ${call RBUILD_intermediate_path_unique,$(1),$(2)}.o.d +-include $(5).d -${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) ${call RBUILD_intermediate_path_unique,$(1),$(2)}.o.d $(3) | ${call RBUILD_intermediate_dir,$(2)} +$(5): $(2) $(5).d $(3) | ${call RBUILD_dir,$(5)} $$(ECHO_CC) - $${gcc} -o $$@ $$($(1)_CFLAGS) $(4) -c $$< + $${gcc} -o $$@ ${call RBUILD_cflags,$(1),$(4)} -c $$< else -${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)} +$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} $$(ECHO_CC) - $${gcc} -o $$@ $$($(1)_CFLAGS) $(4) -c $$< + $${gcc} -o $$@ ${call RBUILD_cflags,$(1),$(4)} -c $$< + +endif + +endef + +#(module, source, dependencies, cflags, output) +define RBUILD_GAS + +$(2): $${$(1)_precondition} + +ifeq ($(ROS_BUILDDEPS),full) + +$(5).d: $(2) | ${call RBUILD_dir,$(5)} + $$(ECHO_DEPENDS) + $${gas} -MF $$@ ${call RBUILD_asflags,$(1),$(4)} -M -MP -MT $$@ $$< + +-include $(5).d + +$(5): $(2) $(5).d $(3) | ${call RBUILD_dir,$(5)} + $$(ECHO_AS) + $${gas} -o $$@ ${call RBUILD_asflags,$(1),$(4)} -c $$< + +else + +$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} + $$(ECHO_AS) + $${gas} -o $$@ ${call RBUILD_asflags,$(1),$(4)} -c $$< + +endif + +endef + +#(module, source, dependencies, cflags, output) +define RBUILD_GPP + +$(2): $${$(1)_precondition} + +ifeq ($(ROS_BUILDDEPS),full) + +$(5).d: $(2) | ${call RBUILD_dir,$(5)} + $$(ECHO_DEPENDS) + $${gpp} -MF $$@ ${call RBUILD_cxxflags,$(1),$(4)} -M -MP -MT $$@ $$< + +-include $(5).d + +$(5): $(2) $(5).d $(3) | ${call RBUILD_dir,$(5)} + $$(ECHO_CC) + $${gpp} -o $$@ ${call RBUILD_cxxflags,$(1),$(4)} -c $$< + +else + +$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} + $$(ECHO_CC) + $${gpp} -o $$@ ${call RBUILD_cxxflags,$(1),$(4)} -c $$< endif endef +#(module, source, dependencies, cflags) +RBUILD_GCC_RULE=${call RBUILD_GCC,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique,$(1),$(2)}.o} +RBUILD_GPP_RULE=${call RBUILD_GPP,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique,$(1),$(2)}.o} +RBUILD_GAS_RULE=${call RBUILD_GAS,$(1),$(2),$(3),$(4),${call RBUILD_intermediate_path_unique,$(1),$(2)}.o} + #(module, source, dependencies, cflags) define RBUILD_GPP_RULE @@ -48,22 +210,288 @@ ifeq ($(ROS_BUILDDEPS),full) ${call RBUILD_intermediate_path_unique,$(1),$(2)}.o.d: $(2) | ${call RBUILD_intermediate_dir,$(2)} $$(ECHO_DEPENDS) - $${gpp} -MF $$@ $$($(1)_CXXFLAGS) $(4) -M -MP -MT $$@ $$< + $${gpp} -MF ${call RBUILD_cxxflags,$(1),$(4)} -M -MP -MT $$@ $$< -include ${call RBUILD_intermediate_path_unique,$(1),$(2)}.o.d ${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) ${call RBUILD_intermediate_path_unique,$(1),$(2)}.o.d $(3) | ${call RBUILD_intermediate_dir,$(2)} $$(ECHO_CC) - $${gpp} -o $$@ $$($(1)_CXXFLAGS) $(4) -c $$< + $${gpp} -o $$@ ${call RBUILD_cxxflags,$(1),$(4)} -c $$< else ${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)} $$(ECHO_CC) - $${gpp} -o $$@ $$($(1)_CXXFLAGS) $(4) -c $$< + $${gpp} -o $$@ ${call RBUILD_cxxflags,$(1),$(4)} -c $$< + +endif + +endef + +#(module, source, dependencies, cflags) +define RBUILD_GCC_PCH_RULE + +$(2): $${$(1)_precondition} + +ifeq ($$(ROS_BUILDDEPS),full) + +${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d: $(2) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_DEPENDS) + $${gcc} -MF $$@ ${call RBUILD_cflags,$(1),$(4)} -x c-header -M -MP -MT $$@ $$< + +-include $$(intermediate_dir)$$(SEP).gch_$$(module_name)$$(SEP)$(notdir $(2)).gch.d + +${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch: $(2) ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d $(3) | ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1) + $$(ECHO_PCH) + $${gcc} -MF $$@ ${call RBUILD_cflags,$(1),$(4)} -x c-header -M -MP -MT $$@ $$< + +else + +${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1) + $$(ECHO_PCH) + $${gcc} -MF $$@ ${call RBUILD_cflags,$(1),$(4)} -x c-header -M -MP -MT $$@ $$< + +endif + +endef + +#(module, source, dependencies, cflags) +define RBUILD_GPP_PCH_RULE + +$(2): $${$(1)_precondition} + +ifeq ($$(ROS_BUILDDEPS),full) + +${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d: $(2) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_DEPENDS) + $${gpp} -MF $$@ ${call RBUILD_cxxflags,$(1),$(4)} -x c++-header -M -MP -MT $$@ $$< + +-include $$(intermediate_dir)$$(SEP).gch_$$(module_name)$$(SEP)$(notdir $(2)).gch.d + +${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch: $(2) ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch.d $(3) | ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1) + $$(ECHO_PCH) + $${gpp} -MF $$@ ${call RBUILD_cxxflags,$(1),$(4)} -x c++-header -M -MP -MT $$@ $$< + +else + +${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1)$$(SEP)$(notdir $(2)).gch: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)}$$(SEP).gch_$(1) + $$(ECHO_PCH) + $${gpp} -MF $$@ ${call RBUILD_cxxflags,$(1),$(4)} -x c++-header -M -MP -MT $$@ $$< + +endif + +endef + +#(module, source, dependencies, cflags, output) +define RBUILD_NASM + +$(2): $${$(1)_precondition} + +$(5): $(2) $(3) | ${call RBUILD_dir,$(5)} + $$(ECHO_NASM) + $${nasm} -o $$@ ${call RBUILD_nasmflags,$(1),$(4)} $$< + +endef + +# TODO: module_dllname -> ${call RBUILD_module_dllname,$(1)} + +#(module, source, dependencies, cflags, module_dllname, output) +define RBUILD_WINEBUILD_DEF + +$(6): $(2) $$(WINEBUILD_TARGET) | ${call RBUILD_intermediate_dir,$(6)} + $$(ECHO_WINEBLD) + $$(Q)$$(WINEBUILD_TARGET) -o $$@ --def -E $$< --filename $(5) ${call RBUILD_spec_flags,$(1),$(4)} + +endef + +#(module, source, dependencies, cflags, module_dllname, output) +define RBUILD_WINEBUILD_STUBS + +$(6): $(2) $$(WINEBUILD_TARGET) | ${call RBUILD_intermediate_dir,$(6)} + $$(ECHO_WINEBLD) + $$(Q)$$(WINEBUILD_TARGET) -o $$@ --pedll $$< --filename $(5) ${call RBUILD_spec_flags,$(1),$(4)} + +endef + +#(module, source, dependencies, cflags, module_dllname) +define RBUILD_WINEBUILD_WITH_CPP_RULE + +ifeq ($$(ROS_BUILDDEPS),full) + +${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec.d: $(2) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_DEPENDS) + $${gcc} -xc -MF $$@ ${call RBUILD_spec_pp_flags,$(1),$(4)} -M -MP -MT $$@ $$< + +-include ${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec.d + +${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec: $(2) ${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec.d $(3) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_CPP) + $${gcc} -xc -E ${call RBUILD_spec_pp_flags,$(1),$(4)} $$< > $$@ + +else + +${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_CPP) + $${gcc} -xc -E ${call RBUILD_spec_pp_flags,$(1),$(4)} $$< > $$@ endif +${call RBUILD_WINEBUILD_DEF,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec,,$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.auto.def} +${call RBUILD_WINEBUILD_STUBS,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.spec,,$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c} +${call RBUILD_GCC,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c,,,${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.o} + +endef + +#(module, source, dependencies, cflags, module_dllname) +define RBUILD_WINEBUILD_RULE + +${call RBUILD_WINEBUILD_DEF,$(1),$(2),$(3),$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.auto.def} +${call RBUILD_WINEBUILD_STUBS,$(1),$(2),$(3),$(4),$(5),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c} +${call RBUILD_GCC,$(1),${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.c,,,${call RBUILD_intermediate_path_unique,$(1),$(2)}.stubs.o} + +endef + +# FIXME: wrc butchers localized strings and doesn't implement -M, so we have to use an external preprocessor +#(module, source, dependencies, cflags) +define RBUILD_WRC_RULE + +$(2): $${$(1)_precondition} + +ifeq ($$(ROS_BUILDDEPS),full) + +${call RBUILD_intermediate_path_unique,$(1),$(2)}.res.d: $(2) | ${call RBUILD_intermediate_dir,$(2)} $$(TEMPORARY) + $$(ECHO_DEPENDS) + $${gcc} -xc -MF $$@ ${call RBUILD_rc_pp_flags,$(1),$(4)} -M -MP -MT $$@ $$< + +-include ${call RBUILD_intermediate_path_unique,$(1),$(2)}.coff.d + +${call RBUILD_intermediate_path_unique,$(1),$(2)}.res: $(2) ${call RBUILD_intermediate_path_unique,$(1),$(2)}.res.d $(3) $$(WRC_TARGET) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_RC) + $${gcc} -xc ${call RBUILD_rc_pp_flags,$(1),$(4)} -E $$< | $$(WRC_TARGET) -o $$@ ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}} + +else + +${call RBUILD_intermediate_path_unique,$(1),$(2)}.res: $(2) $(3) $$(WRC_TARGET) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_RC) + $${gcc} -xc ${call RBUILD_rc_pp_flags,$(1),$(4)} -E $$< | $$(WRC_TARGET) -o $$@ ${call RBUILD_rc_flags,$(1),$(4),-I${call RBUILD_dir,$(2)}} + +endif + +${call RBUILD_intermediate_path_unique,$(1),$(2)}.coff: ${call RBUILD_intermediate_path_unique,$(1),$(2)}.res | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_CVTRES) + $${windres} -i $$< -o $$@ -J res -O coff + +endef + +define RBUILD_WIDL + +endef + +define RBUILD_WIDL_HEADER_RULE + +$(2): $${$(1)_precondition} + +${call RBUILD_intermediate_path_noext,$(2)}.h: $(2) $(3) $$(WIDL_TARGET) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_WIDL) + $$(Q)$$(WIDL_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H $$@ $$< + +endef + +#(module, source, dependencies, cflags) +define RBUILD_WIDL_CLIENT_RULE + +$(2): $${$(1)_precondition} + +${call RBUILD_intermediate_path_noext,$(2)}_c.c ${call RBUILD_intermediate_path_noext,$(2)}_c.h: $(2) $(3) $$(WIDL_TARGET) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_WIDL) + $$(Q)$$(WIDL_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_c.h -c -C ${call RBUILD_intermediate_path_noext,$(2)}_c.c $(2) + +${call RBUILD_GCC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_c.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_c.o} + +endef + +#(module, source, dependencies, cflags) +define RBUILD_WIDL_SERVER_RULE + +$(2): $${$(1)_precondition} + +${call RBUILD_intermediate_path_noext,$(2)}_s.c ${call RBUILD_intermediate_path_noext,$(2)}_s.h: $(2) $(3) $$(WIDL_TARGET) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_WIDL) + $$(Q)$$(WIDL_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_s.h -s -S ${call RBUILD_intermediate_path_noext,$(2)}_s.c $(2) + +${call RBUILD_GCC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_s.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_s.o} + +endef + +#(module, source, dependencies, cflags) +define RBUILD_WIDL_PROXY_RULE + +$(2): $${$(1)_precondition} + +${call RBUILD_intermediate_path_noext,$(2)}_p.c ${call RBUILD_intermediate_path_noext,$(2)}_p.h: $(2) $(3) $$(WIDL_TARGET) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_WIDL) + $$(Q)$$(WIDL_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_p.h -p -P ${call RBUILD_intermediate_path_noext,$(2)}_p.c $(2) + +${call RBUILD_GCC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_p.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_p.o} + +endef + +#(module, source, dependencies, cflags) +define RBUILD_WIDL_INTERFACE_RULE + +$(2): $${$(1)_precondition} + +${call RBUILD_intermediate_path_noext,$(2)}_i.c: $(2) $(3) $$(WIDL_TARGET) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_WIDL) + $$(Q)$$(WIDL_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -u -U $$@ $$< + +${call RBUILD_GCC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_i.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_i.o} + +endef + +# FIXME: this rule sucks +#(module, source, dependencies, cflags, bare_dependencies) +define RBUILD_WIDL_DLLDATA_RULE + +$(2): $(3) ${$(1)_precondition} $$(WIDL_TARGET) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_WIDL) + $$(Q)$$(WIDL_TARGET) ${call RBUILD_midlflags,$(1),$(4)} --dlldata-only --dlldata=$(2) $(5) + +${call RBUILD_GCC,$(1),$(2),,,${call RBUILD_intermediate_path_noext,$(2)}.o} + +endef + +#(module, source, dependencies, cflags) +define RBUILD_WIDL_TLB_RULE + +$(2): $${$(1)_precondition} + +${call RBUILD_intermediate_dir,$(2)}$$(SEP)$(1).tlb: $(2) $(3) $$(WIDL_TARGET) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_WIDL) + $$(Q)$$(WIDL_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -t -T $$@ $$< + +endef + +#(module, source, dependencies, cflags) +define RBUILD_HOST_GCC_RULE + +$(2): $${$(1)_precondition} + +${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_HOSTCC) + $${host_gcc} -o $$@ ${call RBUILD_host_cflags,$(1),$(4)} -c $$< + +endef + +#(module, source, dependencies, cflags) +define RBUILD_HOST_GPP_RULE + +$(2): $${$(1)_precondition} + +${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)} + $$(ECHO_HOSTCC) + $${host_gpp} -o $$@ ${call RBUILD_host_cxxflags,$(1),$(4)} -c $$< + endef # EOF diff --git a/reactos/tools/rbuild/compilerdirective.cpp b/reactos/tools/rbuild/compilerdirective.cpp new file mode 100644 index 00000000000..859e7a859a4 --- /dev/null +++ b/reactos/tools/rbuild/compilerdirective.cpp @@ -0,0 +1,145 @@ +/* + * Copyright (C) 2009 KJK::Hyperion + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include "pch.h" +#include + +#include "rbuild.h" + +#include + +void +CompilerDirective::SetCompiler ( CompilerType compiler ) +{ + assert ( compiler < CompilerTypesCount ); + compilersSet.set ( compiler ); +} + +void +CompilerDirective::UnsetCompiler ( CompilerType compiler ) +{ + assert ( compiler < CompilerTypesCount ); + compilersSet.reset ( compiler ); +} + +void +CompilerDirective::SetAllCompilers () +{ + compilersSet.set (); +} + +void +CompilerDirective::UnsetAllCompilers () +{ + compilersSet.reset (); +} + +bool +CompilerDirective::IsCompilerSet ( CompilerType compiler ) const +{ + assert ( compiler < CompilerTypesCount ); + return compilersSet.test ( compiler ); +} + +template < std::size_t N > +static +bool +CompareStringElement ( const std::string::const_iterator& begin, const std::string::const_iterator& end, const char (& compareTo)[(N)] ) +{ + return !std::use_facet < std::collate < char > > ( std::locale::classic () ) + .compare ( &(*begin), + &(*(end - 1)), + &compareTo[0], + &compareTo[(N) - 2] ); +} + +void +CompilerDirective::ParseCompilers ( const XMLElement& node, const std::string& defaultValue ) +{ + const XMLAttribute* att = node.GetAttribute ( "compiler", false ); + const std::string& value = att ? att->value : defaultValue; + + if ( value == "*" ) + SetAllCompilers (); + else + { + UnsetAllCompilers (); + + std::string::const_iterator beginString; + + beginString = value.begin(); + + do + { + for ( ; beginString != value.end(); ++ beginString ) + { + if ( *beginString != ',' ) + break; + } + + if ( beginString == value.end() ) + break; + + std::string::const_iterator endString = beginString; + + for ( ; endString != value.end(); ++ endString ) + { + if ( *endString == ',' ) + break; + } + + assert ( endString != beginString ); + + CompilerType compiler; + + if ( CompareStringElement ( beginString, endString, "cc" ) ) + compiler = CompilerTypeCC; + else if ( CompareStringElement ( beginString, endString, "cxx" ) ) + compiler = CompilerTypeCXX; + else if ( CompareStringElement ( beginString, endString, "cpp" ) ) + compiler = CompilerTypeCPP; + else if ( CompareStringElement ( beginString, endString, "as" ) ) + compiler = CompilerTypeAS; + else if ( CompareStringElement ( beginString, endString, "midl" ) ) + compiler = CompilerTypeMIDL; + else if ( CompareStringElement ( beginString, endString, "rc" ) ) + compiler = CompilerTypeRC; + else if ( CompareStringElement ( beginString, endString, "nasm" ) ) + compiler = CompilerTypeNASM; + else + { + throw InvalidAttributeValueException ( + node.location, + "compiler", + value ); + } + + SetCompiler ( compiler ); + + beginString = endString; + } + while ( beginString != value.end() ); + + if ( !compilersSet.any() ) + { + throw InvalidAttributeValueException ( + node.location, + "compiler", + value ); + } + } +} diff --git a/reactos/tools/rbuild/compilerflag.cpp b/reactos/tools/rbuild/compilerflag.cpp index 00c5562b831..c76ac85d9d2 100644 --- a/reactos/tools/rbuild/compilerflag.cpp +++ b/reactos/tools/rbuild/compilerflag.cpp @@ -57,23 +57,8 @@ CompilerFlag::Initialize () } flag = node.value; - compiler = CompilerTypeDontCare; - const XMLAttribute* att = node.GetAttribute ( "compiler", false ); - if ( att != NULL) - { - if ( att->value == "cpp" ) - compiler = CompilerTypeCPP; - else if ( att->value == "cc" ) - compiler = CompilerTypeCC; - else - { - throw InvalidAttributeValueException ( - node.location, - "compiler", - att->value ); - } - } + ParseCompilers ( node, "cc,cxx" ); } void diff --git a/reactos/tools/rbuild/define.cpp b/reactos/tools/rbuild/define.cpp index d972d672b0c..d4d394d1231 100644 --- a/reactos/tools/rbuild/define.cpp +++ b/reactos/tools/rbuild/define.cpp @@ -45,7 +45,8 @@ Define::Define ( const Project& project, Define::Define ( const Project& project, const Module* module, const std::string& name_, - const std::string& backend_) + const std::string& backend_, + bool redefine_) : project(project), module(module), node(NULL) @@ -53,6 +54,7 @@ Define::Define ( const Project& project, name = name_; value = ""; backend = backend_; + redefine = redefine_; } Define::~Define () @@ -66,22 +68,27 @@ Define::~Define () void Define::Initialize() { + redefine = node->name == "redefine"; + const XMLAttribute* att = node->GetAttribute ( "name", true ); att = node->GetAttribute ( "name", true ); assert(att); - name = att->value; + + size_t name_len = att->value.find ( '(' ); + + name = att->value.substr ( 0, name_len ); + + if ( name_len != std::string::npos ) + arguments = att->value.substr ( att->value.find ( '(' ) ); + value = node->value; att = node->GetAttribute ( "backend", false ); if ( att ) backend = att->value; - att = node->GetAttribute ( "overridable", false ); - if ( att ) - overridable = ( att->value == "true" || att->value == "yes" ); - else - overridable = false; + ParseCompilers ( *node, "cpp" ); } void diff --git a/reactos/tools/rbuild/include.cpp b/reactos/tools/rbuild/include.cpp index 863ebf87436..9a5aaff23d7 100644 --- a/reactos/tools/rbuild/include.cpp +++ b/reactos/tools/rbuild/include.cpp @@ -30,6 +30,7 @@ Include::Include ( const Project& project, node ( includeNode ), module ( NULL ) { + Initialize (); } Include::Include ( const Project& project, @@ -40,6 +41,7 @@ Include::Include ( const Project& project, node ( includeNode ), module ( module ) { + Initialize (); } Include::Include ( const Project& project, @@ -127,3 +129,9 @@ Include::GetDefaultDirectoryTree ( const Module* module ) const else return SourceDirectory; } + +void +Include::Initialize () +{ + ParseCompilers ( *node, "cpp" ); +} diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp index e87a21091a3..54cebaf14ed 100644 --- a/reactos/tools/rbuild/module.cpp +++ b/reactos/tools/rbuild/module.cpp @@ -704,7 +704,7 @@ Module::ProcessXMLSubElement ( const XMLElement& e, non_if_data.includes.push_back ( include ); subs_invalid = true; } - else if ( e.name == "define" ) + else if ( e.name == "define" || e.name == "redefine" ) { Define* pDefine = new Define ( project, this, e ); non_if_data.defines.push_back ( pDefine ); diff --git a/reactos/tools/rbuild/pch.h b/reactos/tools/rbuild/pch.h index 42b44d0ab02..05dafc1a732 100644 --- a/reactos/tools/rbuild/pch.h +++ b/reactos/tools/rbuild/pch.h @@ -28,6 +28,7 @@ #include #include #include +#include #ifdef WIN32 #include diff --git a/reactos/tools/rbuild/project.cpp b/reactos/tools/rbuild/project.cpp index f8ab63d4681..c68e3fbf088 100644 --- a/reactos/tools/rbuild/project.cpp +++ b/reactos/tools/rbuild/project.cpp @@ -375,7 +375,7 @@ Project::ProcessXMLSubElement ( const XMLElement& e, subs_invalid = true; } - else if ( e.name == "define" ) + else if ( e.name == "define" || e.name == "redefine" ) { const XMLAttribute* host = e.GetAttribute("host", false); Define* define = new Define ( *this, e ); diff --git a/reactos/tools/rbuild/rbuild.dsp b/reactos/tools/rbuild/rbuild.dsp index 95faedf9b13..f9700359f38 100644 --- a/reactos/tools/rbuild/rbuild.dsp +++ b/reactos/tools/rbuild/rbuild.dsp @@ -7,19 +7,19 @@ CFG=rbuild - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "rbuild.mak". -!MESSAGE +!MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "rbuild.mak" CFG="rbuild - Win32 Debug" -!MESSAGE +!MESSAGE !MESSAGE Possible choices for configuration are: -!MESSAGE +!MESSAGE !MESSAGE "rbuild - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "rbuild - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE +!MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 @@ -74,7 +74,7 @@ LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -!ENDIF +!ENDIF # Begin Target @@ -189,6 +189,10 @@ SOURCE=.\compilationunitsupportcode.cpp # End Source File # Begin Source File +SOURCE=.\compilerdirective.cpp +# End Source File +# Begin Source File + SOURCE=.\compilerflag.cpp # End Source File # Begin Source File diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h index 6ce938ad2db..a6f0e7cce16 100644 --- a/reactos/tools/rbuild/rbuild.h +++ b/reactos/tools/rbuild/rbuild.h @@ -321,9 +321,15 @@ enum HostType enum CompilerType { - CompilerTypeDontCare, CompilerTypeCC, + CompilerTypeCXX, CompilerTypeCPP, + CompilerTypeAS, + CompilerTypeMIDL, + CompilerTypeRC, + CompilerTypeNASM, + + CompilerTypesCount }; class FileLocation @@ -423,8 +429,23 @@ private: bool default_value = false ); }; +class CompilerDirective +{ +private: + std::bitset compilersSet; + +public: + void SetCompiler ( CompilerType compiler ); + void UnsetCompiler ( CompilerType compiler ); + void SetAllCompilers (); + void UnsetAllCompilers (); -class Include + void ParseCompilers ( const XMLElement& node, const std::string& defaultValue ); + + bool IsCompilerSet ( CompilerType compiler ) const; +}; + +class Include: public CompilerDirective { public: FileLocation *directory; @@ -444,19 +465,21 @@ private: const XMLElement* node; const Module* module; DirectoryLocation GetDefaultDirectoryTree ( const Module* module ) const; + void Initialize (); }; -class Define +class Define: public CompilerDirective { public: const Project& project; const Module* module; const XMLElement* node; std::string name; + std::string arguments; std::string value; std::string backend; - bool overridable; + bool redefine; Define ( const Project& project, const XMLElement& defineNode ); @@ -466,7 +489,8 @@ public: Define ( const Project& project, const Module* module, const std::string& name_, - const std::string& backend_ = "" ); + const std::string& backend_ = "", + bool redefine_ = false ); ~Define(); void ProcessXML(); private: @@ -609,14 +633,13 @@ public: }; -class CompilerFlag +class CompilerFlag: public CompilerDirective { public: const Project& project; const Module* module; const XMLElement& node; std::string flag; - CompilerType compiler; CompilerFlag ( const Project& project, const XMLElement& compilerFlagNode ); diff --git a/reactos/tools/rbuild/rbuild.mak b/reactos/tools/rbuild/rbuild.mak index bd2d87e4734..8d0e8a38733 100644 --- a/reactos/tools/rbuild/rbuild.mak +++ b/reactos/tools/rbuild/rbuild.mak @@ -250,6 +250,7 @@ RBUILD_SOURCES = \ cdfile.cpp \ compilationunit.cpp \ compilationunitsupportcode.cpp \ + compilerdirective.cpp \ compilerflag.cpp \ configuration.cpp \ define.cpp \ @@ -384,6 +385,10 @@ $(RBUILD_INT_)compilationunitsupportcode.o: $(RBUILD_BASE_)compilationunitsuppor $(ECHO_HOSTCC) ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ +$(RBUILD_INT_)compilerdirective.o: $(RBUILD_BASE_)compilerdirective.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) + $(ECHO_HOSTCC) + ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ + $(RBUILD_INT_)compilerflag.o: $(RBUILD_BASE_)compilerflag.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) $(ECHO_HOSTCC) ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ diff --git a/reactos/tools/rbuild/rbuild.vcproj b/reactos/tools/rbuild/rbuild.vcproj index f6f69e2d375..26694baf745 100644 --- a/reactos/tools/rbuild/rbuild.vcproj +++ b/reactos/tools/rbuild/rbuild.vcproj @@ -644,6 +644,30 @@ /> + + + + + + + + -- 2.17.1