diff --git a/reactos/Makefile b/reactos/Makefile
index 7370bfa3735..1ac53b3def2 100644
--- a/reactos/Makefile
+++ b/reactos/Makefile
@@ -220,14 +220,12 @@ ifeq ($(HALFVERBOSEECHO),yes)
ECHO_CC =@echo $(QUOTE)[CC] $<$(QUOTE)
ECHO_HOSTCC =@echo $(QUOTE)[HOST-CC] $<$(QUOTE)
ECHO_CL =@echo $(QUOTE)[CL] $<$(QUOTE)
- ECHO_AS =@echo $(QUOTE)[AS] $<$(QUOTE)
+ ECHO_GAS =@echo $(QUOTE)[GAS] $<$(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)
@@ -258,14 +256,12 @@ else
ECHO_CPP =
ECHO_CC =
ECHO_HOSTCC =
- ECHO_AS =
+ ECHO_GAS =
ECHO_NASM =
ECHO_AR =
ECHO_HOSTAR =
ECHO_WINEBLD =
ECHO_WRC =
- ECHO_RC =
- ECHO_CVTRES =
ECHO_WIDL =
ECHO_BIN2RES =
ECHO_DLLTOOL =
@@ -319,7 +315,6 @@ 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 38310d6149e..f4915c95289 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 36d2d747d01..6b474c1c14a 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 7dc44c1a921..a4174698af2 100644
--- a/reactos/base/setup/usetup/usetup.rbuild
+++ b/reactos/base/setup/usetup/usetup.rbuild
@@ -6,6 +6,7 @@
.
.
include/reactos/drivers
+
zlib
inflib
diff --git a/reactos/base/system/autochk/autochk.rbuild b/reactos/base/system/autochk/autochk.rbuild
index f2464aefbd7..8f287f651d0 100644
--- a/reactos/base/system/autochk/autochk.rbuild
+++ b/reactos/base/system/autochk/autochk.rbuild
@@ -2,6 +2,7 @@
.
+
nt
ntdll
autochk.c
diff --git a/reactos/base/system/smss/smss.rbuild b/reactos/base/system/smss/smss.rbuild
index e305e15f12d..015b5913da4 100644
--- a/reactos/base/system/smss/smss.rbuild
+++ b/reactos/base/system/smss/smss.rbuild
@@ -3,6 +3,7 @@
.
include/reactos/subsys
+
nt
smlib
ntdll
diff --git a/reactos/dll/3rdparty/dxtn/dxtn.rbuild b/reactos/dll/3rdparty/dxtn/dxtn.rbuild
index 325a5599002..dd49edcfafe 100644
--- a/reactos/dll/3rdparty/dxtn/dxtn.rbuild
+++ b/reactos/dll/3rdparty/dxtn/dxtn.rbuild
@@ -1,6 +1,7 @@
.
+
fxt1.c
dxtn.c
wrapper.c
diff --git a/reactos/dll/cpl/ncpa/ncpa.rbuild b/reactos/dll/cpl/ncpa/ncpa.rbuild
index 75ff5ac4c16..7f3ff1437fc 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 f836a521d22..3411607fbb3 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 ceef78f9dc1..127853bc2b4 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 64a9d2e4aa6..687473cfb79 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 5d28c9140ac..4d08625d79f 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 18d70e5084f..381bf1d2d1a 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 1a09e11c6b2..9f9b1c98f0a 100644
--- a/reactos/dll/directx/wine/ddraw/ddraw.rbuild
+++ b/reactos/dll/directx/wine/ddraw/ddraw.rbuild
@@ -40,7 +40,4 @@
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 9d0f7896853..d16f0c1ecd3 100644
--- a/reactos/dll/directx/wine/wined3d/wined3d.rbuild
+++ b/reactos/dll/directx/wine/wined3d/wined3d.rbuild
@@ -2,6 +2,7 @@
+ -Wno-format
.
include/reactos/wine
diff --git a/reactos/dll/keyboard/kbda1/kbda1.rbuild b/reactos/dll/keyboard/kbda1/kbda1.rbuild
index 31d033df20d..d21878bfcdc 100644
--- a/reactos/dll/keyboard/kbda1/kbda1.rbuild
+++ b/reactos/dll/keyboard/kbda1/kbda1.rbuild
@@ -3,6 +3,7 @@
include
+
kbda1.c
kbda1.rc
diff --git a/reactos/dll/keyboard/kbda2/kbda2.rbuild b/reactos/dll/keyboard/kbda2/kbda2.rbuild
index 4cf31ccc2fa..b3a1cf5edf7 100644
--- a/reactos/dll/keyboard/kbda2/kbda2.rbuild
+++ b/reactos/dll/keyboard/kbda2/kbda2.rbuild
@@ -3,6 +3,7 @@
include
+
kbda2.c
kbda2.rc
diff --git a/reactos/dll/keyboard/kbda3/kbda3.rbuild b/reactos/dll/keyboard/kbda3/kbda3.rbuild
index 9d7c0d09a22..706f49ef293 100644
--- a/reactos/dll/keyboard/kbda3/kbda3.rbuild
+++ b/reactos/dll/keyboard/kbda3/kbda3.rbuild
@@ -3,6 +3,7 @@
include
+
kbda3.c
kbda3.rc
diff --git a/reactos/dll/keyboard/kbdal/kbdal.rbuild b/reactos/dll/keyboard/kbdal/kbdal.rbuild
index 073cb694d3b..d07739919a9 100644
--- a/reactos/dll/keyboard/kbdal/kbdal.rbuild
+++ b/reactos/dll/keyboard/kbdal/kbdal.rbuild
@@ -3,6 +3,7 @@
include
+
kbdal.c
kbdal.rc
diff --git a/reactos/dll/keyboard/kbdarme/kbdarme.rbuild b/reactos/dll/keyboard/kbdarme/kbdarme.rbuild
index 5b057472893..4c3cecec6f7 100644
--- a/reactos/dll/keyboard/kbdarme/kbdarme.rbuild
+++ b/reactos/dll/keyboard/kbdarme/kbdarme.rbuild
@@ -3,6 +3,7 @@
include
+
kbdarme.c
kbdarme.rc
diff --git a/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild b/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild
index 2564cceba8f..d4537a8838a 100644
--- a/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild
+++ b/reactos/dll/keyboard/kbdarmw/kbdarmw.rbuild
@@ -3,6 +3,7 @@
include
+
kbdarmw.c
kbdarmw.rc
diff --git a/reactos/dll/keyboard/kbdaze/kbdaze.rbuild b/reactos/dll/keyboard/kbdaze/kbdaze.rbuild
index dc9396f2a7b..4e68b5fda32 100644
--- a/reactos/dll/keyboard/kbdaze/kbdaze.rbuild
+++ b/reactos/dll/keyboard/kbdaze/kbdaze.rbuild
@@ -3,6 +3,7 @@
include
+
kbdaze.c
kbdaze.rc
diff --git a/reactos/dll/keyboard/kbdazel/kbdazel.rbuild b/reactos/dll/keyboard/kbdazel/kbdazel.rbuild
index bce7694060b..9237dc3574b 100644
--- a/reactos/dll/keyboard/kbdazel/kbdazel.rbuild
+++ b/reactos/dll/keyboard/kbdazel/kbdazel.rbuild
@@ -3,6 +3,7 @@
include
+
kbdazel.c
kbdazel.rc
diff --git a/reactos/dll/keyboard/kbdbe/kbdbe.rbuild b/reactos/dll/keyboard/kbdbe/kbdbe.rbuild
index 7e5eb929eef..e6970dc79ac 100644
--- a/reactos/dll/keyboard/kbdbe/kbdbe.rbuild
+++ b/reactos/dll/keyboard/kbdbe/kbdbe.rbuild
@@ -3,6 +3,7 @@
include
+
kbdbe.c
kbdbe.rc
diff --git a/reactos/dll/keyboard/kbdbga/kbdbga.rbuild b/reactos/dll/keyboard/kbdbga/kbdbga.rbuild
index 544bb45d3c1..1c0ec909d1b 100644
--- a/reactos/dll/keyboard/kbdbga/kbdbga.rbuild
+++ b/reactos/dll/keyboard/kbdbga/kbdbga.rbuild
@@ -3,6 +3,7 @@
include
+
kbdbga.c
kbdbga.rc
diff --git a/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild b/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild
index 8b55a01f338..a7ff22d6d47 100644
--- a/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild
+++ b/reactos/dll/keyboard/kbdbgm/kbdbgm.rbuild
@@ -3,6 +3,7 @@
include
+
kbdbgm.c
kbdbgm.rc
diff --git a/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild b/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild
index 63592e5071f..1be0f36aef3 100644
--- a/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild
+++ b/reactos/dll/keyboard/kbdbgt/kbdbgt.rbuild
@@ -3,6 +3,7 @@
include
+
kbdbgt.c
kbdbgt.rc
diff --git a/reactos/dll/keyboard/kbdblr/kbdblr.rbuild b/reactos/dll/keyboard/kbdblr/kbdblr.rbuild
index 21815ed16d8..4124f943ad4 100644
--- a/reactos/dll/keyboard/kbdblr/kbdblr.rbuild
+++ b/reactos/dll/keyboard/kbdblr/kbdblr.rbuild
@@ -3,6 +3,7 @@
include
+
kbdblr.c
kbdblr.rc
diff --git a/reactos/dll/keyboard/kbdbr/kbdbr.rbuild b/reactos/dll/keyboard/kbdbr/kbdbr.rbuild
index 72ff9aba4bf..245bc53c28f 100644
--- a/reactos/dll/keyboard/kbdbr/kbdbr.rbuild
+++ b/reactos/dll/keyboard/kbdbr/kbdbr.rbuild
@@ -3,6 +3,7 @@
include
+
kbdbr.c
kbdbr.rc
diff --git a/reactos/dll/keyboard/kbdbur/kbdbur.rbuild b/reactos/dll/keyboard/kbdbur/kbdbur.rbuild
index a452a072baf..b273739a0a2 100644
--- a/reactos/dll/keyboard/kbdbur/kbdbur.rbuild
+++ b/reactos/dll/keyboard/kbdbur/kbdbur.rbuild
@@ -3,6 +3,7 @@
include
+
kbdbur.c
kbdbur.rc
diff --git a/reactos/dll/keyboard/kbdcan/kbdcan.rbuild b/reactos/dll/keyboard/kbdcan/kbdcan.rbuild
index 31a1183dbd1..a599c0c1b4c 100644
--- a/reactos/dll/keyboard/kbdcan/kbdcan.rbuild
+++ b/reactos/dll/keyboard/kbdcan/kbdcan.rbuild
@@ -3,6 +3,7 @@
include
+
kbdcan.c
kbdcan.rc
diff --git a/reactos/dll/keyboard/kbdcr/kbdcr.rbuild b/reactos/dll/keyboard/kbdcr/kbdcr.rbuild
index 32784f9fcc7..04d8b7fb587 100644
--- a/reactos/dll/keyboard/kbdcr/kbdcr.rbuild
+++ b/reactos/dll/keyboard/kbdcr/kbdcr.rbuild
@@ -3,6 +3,7 @@
include
+
kbdcr.c
kbdcr.rc
diff --git a/reactos/dll/keyboard/kbdcz/kbdcz.rbuild b/reactos/dll/keyboard/kbdcz/kbdcz.rbuild
index 639fbc85650..a1da5823b65 100644
--- a/reactos/dll/keyboard/kbdcz/kbdcz.rbuild
+++ b/reactos/dll/keyboard/kbdcz/kbdcz.rbuild
@@ -3,6 +3,7 @@
include
+
kbdcz.c
kbdcz.rc
diff --git a/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild b/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild
index 01a3ed1c5e4..004eae0b170 100644
--- a/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild
+++ b/reactos/dll/keyboard/kbdcz1/kbdcz1.rbuild
@@ -3,6 +3,7 @@
include
+
kbdcz1.c
kbdcz1.rc
diff --git a/reactos/dll/keyboard/kbdda/kbdda.rbuild b/reactos/dll/keyboard/kbdda/kbdda.rbuild
index 4c6337a199a..655cfa86217 100644
--- a/reactos/dll/keyboard/kbdda/kbdda.rbuild
+++ b/reactos/dll/keyboard/kbdda/kbdda.rbuild
@@ -3,6 +3,7 @@
include
+
kbdda.c
kbdda.rc
diff --git a/reactos/dll/keyboard/kbddv/kbddv.rbuild b/reactos/dll/keyboard/kbddv/kbddv.rbuild
index 5acfd24e375..c67a0a6a26c 100644
--- a/reactos/dll/keyboard/kbddv/kbddv.rbuild
+++ b/reactos/dll/keyboard/kbddv/kbddv.rbuild
@@ -3,6 +3,7 @@
include
+
kbddv.c
kbddv.rc
diff --git a/reactos/dll/keyboard/kbdes/kbdes.rbuild b/reactos/dll/keyboard/kbdes/kbdes.rbuild
index b580af90812..fa3363c9fa8 100644
--- a/reactos/dll/keyboard/kbdes/kbdes.rbuild
+++ b/reactos/dll/keyboard/kbdes/kbdes.rbuild
@@ -3,6 +3,7 @@
include
+
kbdes.c
kbdes.rc
diff --git a/reactos/dll/keyboard/kbdest/kbdest.rbuild b/reactos/dll/keyboard/kbdest/kbdest.rbuild
index b979a0c1683..f898f9b8375 100644
--- a/reactos/dll/keyboard/kbdest/kbdest.rbuild
+++ b/reactos/dll/keyboard/kbdest/kbdest.rbuild
@@ -3,6 +3,7 @@
include
+
kbdest.c
kbdest.rc
diff --git a/reactos/dll/keyboard/kbdfc/kbdfc.rbuild b/reactos/dll/keyboard/kbdfc/kbdfc.rbuild
index 9459811080e..bd8a500e439 100644
--- a/reactos/dll/keyboard/kbdfc/kbdfc.rbuild
+++ b/reactos/dll/keyboard/kbdfc/kbdfc.rbuild
@@ -3,6 +3,7 @@
include
+
kbdfc.c
kbdfc.rc
diff --git a/reactos/dll/keyboard/kbdfi/kbdfi.rbuild b/reactos/dll/keyboard/kbdfi/kbdfi.rbuild
index 1089de6ec74..4f6321f54dc 100644
--- a/reactos/dll/keyboard/kbdfi/kbdfi.rbuild
+++ b/reactos/dll/keyboard/kbdfi/kbdfi.rbuild
@@ -3,6 +3,7 @@
include
+
kbdfi.c
kbdfi.rc
diff --git a/reactos/dll/keyboard/kbdfr/kbdfr.rbuild b/reactos/dll/keyboard/kbdfr/kbdfr.rbuild
index f6319af96de..048e1215d5b 100644
--- a/reactos/dll/keyboard/kbdfr/kbdfr.rbuild
+++ b/reactos/dll/keyboard/kbdfr/kbdfr.rbuild
@@ -3,6 +3,7 @@
include
+
kbdfr.c
kbdfr.rc
diff --git a/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild b/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild
index 853dbb48fd6..f69c36fe323 100644
--- a/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild
+++ b/reactos/dll/keyboard/kbdgeo/kbdgeo.rbuild
@@ -3,6 +3,7 @@
include
+
kbdgeo.c
kbdgeo.rc
diff --git a/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild b/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild
index 684cdcee39f..2f6474028f0 100644
--- a/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild
+++ b/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild
@@ -3,6 +3,7 @@
include
+
kbdgerg.c
kbdgerg.rc
diff --git a/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild b/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild
index 4b43e916f32..9c5c381aff6 100644
--- a/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild
+++ b/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild
@@ -3,6 +3,7 @@
include
+
kbdgneo.c
kbdgneo.rc
diff --git a/reactos/dll/keyboard/kbdgr/kbdgr.rbuild b/reactos/dll/keyboard/kbdgr/kbdgr.rbuild
index 246cfb386df..dce5253b974 100644
--- a/reactos/dll/keyboard/kbdgr/kbdgr.rbuild
+++ b/reactos/dll/keyboard/kbdgr/kbdgr.rbuild
@@ -3,6 +3,7 @@
include
+
kbdgr.c
kbdgr.rc
diff --git a/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild b/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild
index e8978cf7a2f..6b67df677bb 100644
--- a/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild
+++ b/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild
@@ -3,6 +3,7 @@
include
+
kbdgrist.c
kbdgrist.rc
diff --git a/reactos/dll/keyboard/kbdhe/kbdhe.rbuild b/reactos/dll/keyboard/kbdhe/kbdhe.rbuild
index 32f2b711484..1666ba76623 100644
--- a/reactos/dll/keyboard/kbdhe/kbdhe.rbuild
+++ b/reactos/dll/keyboard/kbdhe/kbdhe.rbuild
@@ -3,6 +3,7 @@
include
+
kbdhe.c
kbdhe.rc
diff --git a/reactos/dll/keyboard/kbdheb/kbdheb.rbuild b/reactos/dll/keyboard/kbdheb/kbdheb.rbuild
index 8320aa495ab..3a202ea3bbf 100644
--- a/reactos/dll/keyboard/kbdheb/kbdheb.rbuild
+++ b/reactos/dll/keyboard/kbdheb/kbdheb.rbuild
@@ -3,6 +3,7 @@
include
+
kbdheb.c
kbdheb.rc
diff --git a/reactos/dll/keyboard/kbdhu/kbdhu.rbuild b/reactos/dll/keyboard/kbdhu/kbdhu.rbuild
index dd1a3b69a65..e99544b39a6 100644
--- a/reactos/dll/keyboard/kbdhu/kbdhu.rbuild
+++ b/reactos/dll/keyboard/kbdhu/kbdhu.rbuild
@@ -3,6 +3,7 @@
include
+
kbdhu.c
kbdhu.rc
diff --git a/reactos/dll/keyboard/kbdic/kbdic.rbuild b/reactos/dll/keyboard/kbdic/kbdic.rbuild
index c784c17dace..060fda62231 100644
--- a/reactos/dll/keyboard/kbdic/kbdic.rbuild
+++ b/reactos/dll/keyboard/kbdic/kbdic.rbuild
@@ -3,6 +3,7 @@
include
+
kbdic.c
kbdic.rc
diff --git a/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild b/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild
index bf312f1a57c..108c8afd155 100644
--- a/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild
+++ b/reactos/dll/keyboard/kbdinasa/kbdinasa.rbuild
@@ -3,6 +3,7 @@
include
+
kbdinasa.c
kbdinasa.rc
diff --git a/reactos/dll/keyboard/kbdinben/kbdinben.rbuild b/reactos/dll/keyboard/kbdinben/kbdinben.rbuild
index 72bd07de614..ab3ece5a624 100644
--- a/reactos/dll/keyboard/kbdinben/kbdinben.rbuild
+++ b/reactos/dll/keyboard/kbdinben/kbdinben.rbuild
@@ -3,6 +3,7 @@
include
+
kbdinben.c
kbdinben.rc
diff --git a/reactos/dll/keyboard/kbdindev/kbdindev.rbuild b/reactos/dll/keyboard/kbdindev/kbdindev.rbuild
index 67b110409bc..4fcd9ddf97a 100644
--- a/reactos/dll/keyboard/kbdindev/kbdindev.rbuild
+++ b/reactos/dll/keyboard/kbdindev/kbdindev.rbuild
@@ -3,6 +3,7 @@
include
+
kbdindev.c
kbdindev.rc
diff --git a/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild b/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild
index c584273dfc2..949c0c316d8 100644
--- a/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild
+++ b/reactos/dll/keyboard/kbdinguj/kbdinguj.rbuild
@@ -3,6 +3,7 @@
include
+
kbdinguj.c
kbdinguj.rc
diff --git a/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild b/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild
index 48304136ee0..e654261f9ad 100644
--- a/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild
+++ b/reactos/dll/keyboard/kbdinmal/kbdinmal.rbuild
@@ -3,6 +3,7 @@
include
+
kbdinmal.c
kbdinmal.rc
diff --git a/reactos/dll/keyboard/kbdir/kbdir.rbuild b/reactos/dll/keyboard/kbdir/kbdir.rbuild
index 787f7d58e6f..01d5f2d7339 100644
--- a/reactos/dll/keyboard/kbdir/kbdir.rbuild
+++ b/reactos/dll/keyboard/kbdir/kbdir.rbuild
@@ -3,6 +3,7 @@
include
+
kbdir.c
kbdir.rc
diff --git a/reactos/dll/keyboard/kbdit/kbdit.rbuild b/reactos/dll/keyboard/kbdit/kbdit.rbuild
index 136233af040..de85dfe61b5 100644
--- a/reactos/dll/keyboard/kbdit/kbdit.rbuild
+++ b/reactos/dll/keyboard/kbdit/kbdit.rbuild
@@ -3,6 +3,7 @@
include
+
kbdit.c
kbdit.rc
diff --git a/reactos/dll/keyboard/kbdja/kbdja.rbuild b/reactos/dll/keyboard/kbdja/kbdja.rbuild
index 40e6b663adc..96b5478f30e 100644
--- a/reactos/dll/keyboard/kbdja/kbdja.rbuild
+++ b/reactos/dll/keyboard/kbdja/kbdja.rbuild
@@ -3,6 +3,7 @@
include
+
kbdja.c
kbdja.rc
diff --git a/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild b/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild
index 3aba85c86c5..4ea0dedef4a 100644
--- a/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild
+++ b/reactos/dll/keyboard/kbdkaz/kbdkaz.rbuild
@@ -3,6 +3,7 @@
include
+
kbdkaz.c
kbdkaz.rc
diff --git a/reactos/dll/keyboard/kbdko/kbdko.rbuild b/reactos/dll/keyboard/kbdko/kbdko.rbuild
index a448d4fb8a5..19bcb0fa014 100644
--- a/reactos/dll/keyboard/kbdko/kbdko.rbuild
+++ b/reactos/dll/keyboard/kbdko/kbdko.rbuild
@@ -3,6 +3,7 @@
include
+
kbdko.c
kbdko.rc
diff --git a/reactos/dll/keyboard/kbdla/kbdla.rbuild b/reactos/dll/keyboard/kbdla/kbdla.rbuild
index 543e4c23669..c6dc9ff7b84 100644
--- a/reactos/dll/keyboard/kbdla/kbdla.rbuild
+++ b/reactos/dll/keyboard/kbdla/kbdla.rbuild
@@ -3,6 +3,7 @@
include
+
kbdla.c
kbdla.rc
diff --git a/reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild b/reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild
index e65ce45c29e..20f79ffbc35 100644
--- a/reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild
+++ b/reactos/dll/keyboard/kbdlt1/kbdlt1.rbuild
@@ -3,6 +3,7 @@
include
+
kbdlt1.c
kbdlt1.rc
diff --git a/reactos/dll/keyboard/kbdlv/kbdlv.rbuild b/reactos/dll/keyboard/kbdlv/kbdlv.rbuild
index 20e5c90abf8..d832f6b5a3d 100644
--- a/reactos/dll/keyboard/kbdlv/kbdlv.rbuild
+++ b/reactos/dll/keyboard/kbdlv/kbdlv.rbuild
@@ -3,6 +3,7 @@
include
+
kbdlv.c
kbdlv.rc
diff --git a/reactos/dll/keyboard/kbdmac/kbdmac.rbuild b/reactos/dll/keyboard/kbdmac/kbdmac.rbuild
index f6d2ed58ead..dd11d036d8a 100644
--- a/reactos/dll/keyboard/kbdmac/kbdmac.rbuild
+++ b/reactos/dll/keyboard/kbdmac/kbdmac.rbuild
@@ -3,6 +3,7 @@
include
+
kbdmac.c
kbdmac.rc
diff --git a/reactos/dll/keyboard/kbdne/kbdne.rbuild b/reactos/dll/keyboard/kbdne/kbdne.rbuild
index 6eab2d336d2..6ae67a41598 100644
--- a/reactos/dll/keyboard/kbdne/kbdne.rbuild
+++ b/reactos/dll/keyboard/kbdne/kbdne.rbuild
@@ -3,6 +3,7 @@
include
+
kbdne.c
kbdne.rc
diff --git a/reactos/dll/keyboard/kbdno/kbdno.rbuild b/reactos/dll/keyboard/kbdno/kbdno.rbuild
index 49e0b73be9a..144cbac3f3f 100644
--- a/reactos/dll/keyboard/kbdno/kbdno.rbuild
+++ b/reactos/dll/keyboard/kbdno/kbdno.rbuild
@@ -3,6 +3,7 @@
include
+
kbdno.c
kbdno.rc
diff --git a/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild b/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild
index 36b4b2e4bbd..1f8afcb5696 100644
--- a/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild
+++ b/reactos/dll/keyboard/kbdpl1/kbdpl1.rbuild
@@ -3,6 +3,7 @@
include
+
kbdpl1.c
kbdpl1.rc
diff --git a/reactos/dll/keyboard/kbdpo/kbdpo.rbuild b/reactos/dll/keyboard/kbdpo/kbdpo.rbuild
index c8c4002c694..1630eeac082 100644
--- a/reactos/dll/keyboard/kbdpo/kbdpo.rbuild
+++ b/reactos/dll/keyboard/kbdpo/kbdpo.rbuild
@@ -3,6 +3,7 @@
include
+
kbdpo.c
kbdpo.rc
diff --git a/reactos/dll/keyboard/kbdro/kbdro.rbuild b/reactos/dll/keyboard/kbdro/kbdro.rbuild
index f8e7af61dab..7ea37f79f21 100644
--- a/reactos/dll/keyboard/kbdro/kbdro.rbuild
+++ b/reactos/dll/keyboard/kbdro/kbdro.rbuild
@@ -3,6 +3,7 @@
include
+
kbdro.c
kbdro.rc
diff --git a/reactos/dll/keyboard/kbdru/kbdru.rbuild b/reactos/dll/keyboard/kbdru/kbdru.rbuild
index 95a66419919..d49aebb6c3c 100644
--- a/reactos/dll/keyboard/kbdru/kbdru.rbuild
+++ b/reactos/dll/keyboard/kbdru/kbdru.rbuild
@@ -3,6 +3,7 @@
include
+
kbdru.c
kbdru.rc
diff --git a/reactos/dll/keyboard/kbdru1/kbdru1.rbuild b/reactos/dll/keyboard/kbdru1/kbdru1.rbuild
index 150ebaf717c..a71d3e87e70 100644
--- a/reactos/dll/keyboard/kbdru1/kbdru1.rbuild
+++ b/reactos/dll/keyboard/kbdru1/kbdru1.rbuild
@@ -3,6 +3,7 @@
include
+
kbdru1.c
kbdru1.rc
diff --git a/reactos/dll/keyboard/kbdsg/kbdsg.rbuild b/reactos/dll/keyboard/kbdsg/kbdsg.rbuild
index 4c5ac0c6f44..56cde304e04 100644
--- a/reactos/dll/keyboard/kbdsg/kbdsg.rbuild
+++ b/reactos/dll/keyboard/kbdsg/kbdsg.rbuild
@@ -3,6 +3,7 @@
include
+
kbdsg.c
kbdsg.rc
diff --git a/reactos/dll/keyboard/kbdsk/kbdsk.rbuild b/reactos/dll/keyboard/kbdsk/kbdsk.rbuild
index fb0a45c982b..37929936f57 100644
--- a/reactos/dll/keyboard/kbdsk/kbdsk.rbuild
+++ b/reactos/dll/keyboard/kbdsk/kbdsk.rbuild
@@ -3,6 +3,7 @@
include
+
kbdsk.c
kbdsk.rc
diff --git a/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild b/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild
index 8ff34acbfe5..35ada294241 100644
--- a/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild
+++ b/reactos/dll/keyboard/kbdsk1/kbdsk1.rbuild
@@ -3,6 +3,7 @@
include
+
kbdsk1.c
kbdsk1.rc
diff --git a/reactos/dll/keyboard/kbdsw/kbdsw.rbuild b/reactos/dll/keyboard/kbdsw/kbdsw.rbuild
index 137fff9a3b9..164576462d5 100644
--- a/reactos/dll/keyboard/kbdsw/kbdsw.rbuild
+++ b/reactos/dll/keyboard/kbdsw/kbdsw.rbuild
@@ -3,6 +3,7 @@
include
+
kbdsw.c
kbdsw.rc
diff --git a/reactos/dll/keyboard/kbdtat/kbdtat.rbuild b/reactos/dll/keyboard/kbdtat/kbdtat.rbuild
index e6f23cdd4bb..52e17cf0618 100644
--- a/reactos/dll/keyboard/kbdtat/kbdtat.rbuild
+++ b/reactos/dll/keyboard/kbdtat/kbdtat.rbuild
@@ -3,6 +3,7 @@
include
+
kbdtat.c
kbdtat.rc
diff --git a/reactos/dll/keyboard/kbdth0/kbdth0.rbuild b/reactos/dll/keyboard/kbdth0/kbdth0.rbuild
index af6bbfe3a4f..19c88fab78c 100644
--- a/reactos/dll/keyboard/kbdth0/kbdth0.rbuild
+++ b/reactos/dll/keyboard/kbdth0/kbdth0.rbuild
@@ -3,6 +3,7 @@
include
+
kbdth0.c
kbdth0.rc
diff --git a/reactos/dll/keyboard/kbdth1/kbdth1.rbuild b/reactos/dll/keyboard/kbdth1/kbdth1.rbuild
index 50a76792692..cba8a7cfda0 100644
--- a/reactos/dll/keyboard/kbdth1/kbdth1.rbuild
+++ b/reactos/dll/keyboard/kbdth1/kbdth1.rbuild
@@ -3,6 +3,7 @@
include
+
kbdth1.c
kbdth1.rc
diff --git a/reactos/dll/keyboard/kbdth2/kbdth2.rbuild b/reactos/dll/keyboard/kbdth2/kbdth2.rbuild
index b86aa31e287..bc12af6f78a 100644
--- a/reactos/dll/keyboard/kbdth2/kbdth2.rbuild
+++ b/reactos/dll/keyboard/kbdth2/kbdth2.rbuild
@@ -3,6 +3,7 @@
include
+
kbdth2.c
kbdth2.rc
diff --git a/reactos/dll/keyboard/kbdth3/kbdth3.rbuild b/reactos/dll/keyboard/kbdth3/kbdth3.rbuild
index e166f086a7b..1488a51a595 100644
--- a/reactos/dll/keyboard/kbdth3/kbdth3.rbuild
+++ b/reactos/dll/keyboard/kbdth3/kbdth3.rbuild
@@ -3,6 +3,7 @@
include
+
kbdth3.c
kbdth3.rc
diff --git a/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild b/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild
index 56efedbfa26..0e51c022443 100644
--- a/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild
+++ b/reactos/dll/keyboard/kbdtuf/kbdtuf.rbuild
@@ -3,6 +3,7 @@
include
+
kbdtuf.c
kbdtuf.rc
diff --git a/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild b/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild
index 58281d92cb2..65de4c0b95a 100644
--- a/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild
+++ b/reactos/dll/keyboard/kbdtuq/kbdtuq.rbuild
@@ -3,6 +3,7 @@
include
+
kbdtuq.c
kbdtuq.rc
diff --git a/reactos/dll/keyboard/kbduk/kbduk.rbuild b/reactos/dll/keyboard/kbduk/kbduk.rbuild
index ac8308b98b5..0e627d42288 100644
--- a/reactos/dll/keyboard/kbduk/kbduk.rbuild
+++ b/reactos/dll/keyboard/kbduk/kbduk.rbuild
@@ -3,6 +3,7 @@
include
+
kbduk.c
kbduk.rc
diff --git a/reactos/dll/keyboard/kbdur/kbdur.rbuild b/reactos/dll/keyboard/kbdur/kbdur.rbuild
index 3de98772b7a..d12c96610c6 100644
--- a/reactos/dll/keyboard/kbdur/kbdur.rbuild
+++ b/reactos/dll/keyboard/kbdur/kbdur.rbuild
@@ -3,6 +3,7 @@
include
+
kbdur.c
kbdur.rc
diff --git a/reactos/dll/keyboard/kbdurs/kbdurs.rbuild b/reactos/dll/keyboard/kbdurs/kbdurs.rbuild
index e92e36929dd..32487048465 100644
--- a/reactos/dll/keyboard/kbdurs/kbdurs.rbuild
+++ b/reactos/dll/keyboard/kbdurs/kbdurs.rbuild
@@ -3,6 +3,7 @@
include
+
kbdurs.c
kbdurs.rc
diff --git a/reactos/dll/keyboard/kbdus/kbdus.rbuild b/reactos/dll/keyboard/kbdus/kbdus.rbuild
index 88b0f3cc717..087d453d8fe 100644
--- a/reactos/dll/keyboard/kbdus/kbdus.rbuild
+++ b/reactos/dll/keyboard/kbdus/kbdus.rbuild
@@ -3,6 +3,7 @@
include
+
kbdus.c
kbdus.rc
diff --git a/reactos/dll/keyboard/kbdusa/kbdusa.rbuild b/reactos/dll/keyboard/kbdusa/kbdusa.rbuild
index 74af4683131..d38ccd1a67c 100644
--- a/reactos/dll/keyboard/kbdusa/kbdusa.rbuild
+++ b/reactos/dll/keyboard/kbdusa/kbdusa.rbuild
@@ -3,6 +3,7 @@
include
+
kbdusa.c
kbdusa.rc
diff --git a/reactos/dll/keyboard/kbdusl/kbdusl.rbuild b/reactos/dll/keyboard/kbdusl/kbdusl.rbuild
index 5cab9fa3c69..792c77911ad 100644
--- a/reactos/dll/keyboard/kbdusl/kbdusl.rbuild
+++ b/reactos/dll/keyboard/kbdusl/kbdusl.rbuild
@@ -3,6 +3,7 @@
include
+
kbdusl.c
kbdusl.rc
diff --git a/reactos/dll/keyboard/kbdusr/kbdusr.rbuild b/reactos/dll/keyboard/kbdusr/kbdusr.rbuild
index 5be90099a4f..6ab80b150f9 100644
--- a/reactos/dll/keyboard/kbdusr/kbdusr.rbuild
+++ b/reactos/dll/keyboard/kbdusr/kbdusr.rbuild
@@ -3,6 +3,7 @@
include
+
kbdusr.c
kbdusr.rc
diff --git a/reactos/dll/keyboard/kbdusx/kbdusx.rbuild b/reactos/dll/keyboard/kbdusx/kbdusx.rbuild
index 1cc3aa2ae50..e23ca9260ee 100644
--- a/reactos/dll/keyboard/kbdusx/kbdusx.rbuild
+++ b/reactos/dll/keyboard/kbdusx/kbdusx.rbuild
@@ -3,6 +3,7 @@
include
+
kbdusx.c
kbdusx.rc
diff --git a/reactos/dll/keyboard/kbduzb/kbduzb.rbuild b/reactos/dll/keyboard/kbduzb/kbduzb.rbuild
index 90a11665813..ba6fd5e061a 100644
--- a/reactos/dll/keyboard/kbduzb/kbduzb.rbuild
+++ b/reactos/dll/keyboard/kbduzb/kbduzb.rbuild
@@ -3,6 +3,7 @@
include
+
kbduzb.c
kbduzb.rc
diff --git a/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild b/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild
index 65566f9c2a9..66c82a51272 100644
--- a/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild
+++ b/reactos/dll/keyboard/kbdvntc/kbdvntc.rbuild
@@ -3,6 +3,7 @@
include
+
kbdvntc.c
kbdvntc.rc
diff --git a/reactos/dll/keyboard/kbdycc/kbdycc.rbuild b/reactos/dll/keyboard/kbdycc/kbdycc.rbuild
index 36fe9bf4a80..2be63d9db69 100644
--- a/reactos/dll/keyboard/kbdycc/kbdycc.rbuild
+++ b/reactos/dll/keyboard/kbdycc/kbdycc.rbuild
@@ -3,6 +3,7 @@
include
+
kbdycc.c
kbdycc.rc
diff --git a/reactos/dll/keyboard/kbdycl/kbdycl.rbuild b/reactos/dll/keyboard/kbdycl/kbdycl.rbuild
index f188c314195..f79c1e7ec6c 100644
--- a/reactos/dll/keyboard/kbdycl/kbdycl.rbuild
+++ b/reactos/dll/keyboard/kbdycl/kbdycl.rbuild
@@ -3,6 +3,7 @@
include
+
kbdycl.c
kbdycl.rc
diff --git a/reactos/dll/nls/idndl/idndl.rbuild b/reactos/dll/nls/idndl/idndl.rbuild
index 562fb5e0dcb..9da63547a4c 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 1fb4dbfcab6..b5826dcf817 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 7f37225aa4c..2876cc0602a 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 0ed2710a86f..124e2e4c84b 100644
--- a/reactos/dll/ntdll/ntdll.rbuild
+++ b/reactos/dll/ntdll/ntdll.rbuild
@@ -11,6 +11,7 @@
include/reactos/subsys
+
rtl
diff --git a/reactos/dll/win32/advapi32/advapi32.rbuild b/reactos/dll/win32/advapi32/advapi32.rbuild
index 50e4872178c..bf1e94b67f9 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 6bb3a5c9cf2..e98915e4d72 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 864b1332c92..49e524cf776 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 8a3a2890a08..881c743135c 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 8355869930c..1d936cb2e95 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 47d0fdeaada..dbc55549801 100644
--- a/reactos/dll/win32/crtdll/crtdll.rbuild
+++ b/reactos/dll/win32/crtdll/crtdll.rbuild
@@ -2,6 +2,7 @@
.
include
+
diff --git a/reactos/dll/win32/crypt32/crypt32.rbuild b/reactos/dll/win32/crypt32/crypt32.rbuild
index 3c276b9ad8e..bb613bf4d37 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 3f850f22f27..d664f66aea5 100644
--- a/reactos/dll/win32/dhcpcsvc/dhcpcsvc.rbuild
+++ b/reactos/dll/win32/dhcpcsvc/dhcpcsvc.rbuild
@@ -1,6 +1,7 @@
include
+
ntdll
kernel32
ws2_32
diff --git a/reactos/dll/win32/dnsapi/dnsapi.rbuild b/reactos/dll/win32/dnsapi/dnsapi.rbuild
index 08acd54a22a..9b65fc570be 100644
--- a/reactos/dll/win32/dnsapi/dnsapi.rbuild
+++ b/reactos/dll/win32/dnsapi/dnsapi.rbuild
@@ -3,6 +3,7 @@
include
src
adns_win32
+
adns
ntdll
diff --git a/reactos/dll/win32/fmifs/fmifs.rbuild b/reactos/dll/win32/fmifs/fmifs.rbuild
index c5a16d413a6..39170c32b82 100644
--- a/reactos/dll/win32/fmifs/fmifs.rbuild
+++ b/reactos/dll/win32/fmifs/fmifs.rbuild
@@ -1,6 +1,7 @@
.
+
ntdll
kernel32
chkdsk.c
diff --git a/reactos/dll/win32/gdi32/gdi32.rbuild b/reactos/dll/win32/gdi32/gdi32.rbuild
index ba5b650ceaa..e407d5a28a8 100644
--- a/reactos/dll/win32/gdi32/gdi32.rbuild
+++ b/reactos/dll/win32/gdi32/gdi32.rbuild
@@ -1,6 +1,7 @@
include
+
user32
kernel32
diff --git a/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild b/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild
index abfce65e6d8..13c9f76ebe1 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 2a15eb09246..c0cd3c67471 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 a82aea1bcde..e47321ffaa9 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 a41d0c80c39..cfcef820d94 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 80c3d6cbc43..4f18caa7599 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 be474c6cb74..40fc2b3cbe4 100644
--- a/reactos/dll/win32/kernel32/kernel32.rbuild
+++ b/reactos/dll/win32/kernel32/kernel32.rbuild
@@ -6,7 +6,8 @@
include
include/reactos/subsys
- 0x0600
+
+ 0x0600
0x05020100
errcodes
@@ -129,8 +130,8 @@
- -fno-exceptions
- -fno-rtti
+ -fno-exceptions
+ -fno-rtti
icustubs.cpp
@@ -142,6 +143,7 @@
.
.
include
+
kernel32_base
wine
pseh
diff --git a/reactos/dll/win32/localspl/localspl.rbuild b/reactos/dll/win32/localspl/localspl.rbuild
index 0ae57f3b349..6c9ebeda826 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 317e5221974..44d703b1040 100644
--- a/reactos/dll/win32/lpk/lpk.rbuild
+++ b/reactos/dll/win32/lpk/lpk.rbuild
@@ -1,6 +1,7 @@
include
+
ntdll
kernel32
diff --git a/reactos/dll/win32/mlang/mlang.rbuild b/reactos/dll/win32/mlang/mlang.rbuild
index 20baacb6976..b53438c5ab9 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 32a5d02b32b..aad46f2eba5 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 ead2dcb4deb..06d8ac031d5 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 a92bc40681e..663ae896c5b 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 503eaf389a2..1e5e6ec1c99 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 38e0c586a01..1e058111831 100644
--- a/reactos/dll/win32/msvcrt/msvcrt.rbuild
+++ b/reactos/dll/win32/msvcrt/msvcrt.rbuild
@@ -2,6 +2,7 @@
.
include
+
diff --git a/reactos/dll/win32/msxml3/msxml3.rbuild b/reactos/dll/win32/msxml3/msxml3.rbuild
index 09bc90783bb..13d93da488a 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 8a80e3118d1..e04fa190cea 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 ab90ff9662c..4298f36481a 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 a341cb203a7..66221ec1525 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 5d5c1846f70..fe4acf15e42 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 96d645379d0..6836100f080 100644
--- a/reactos/dll/win32/opengl32/opengl32.rbuild
+++ b/reactos/dll/win32/opengl32/opengl32.rbuild
@@ -1,5 +1,6 @@
+
ntdll
kernel32
gdi32
diff --git a/reactos/dll/win32/pdh/pdh.rbuild b/reactos/dll/win32/pdh/pdh.rbuild
index 8b325822abd..e79416c36c6 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 dc878155644..2532d8e741f 100644
--- a/reactos/dll/win32/psapi/psapi.rbuild
+++ b/reactos/dll/win32/psapi/psapi.rbuild
@@ -2,6 +2,7 @@
.
include
+
epsapi
pseh
ntdll
diff --git a/reactos/dll/win32/rasdlg/rasdlg.rbuild b/reactos/dll/win32/rasdlg/rasdlg.rbuild
index 4a12179090b..a903c55401f 100644
--- a/reactos/dll/win32/rasdlg/rasdlg.rbuild
+++ b/reactos/dll/win32/rasdlg/rasdlg.rbuild
@@ -1,6 +1,7 @@
.
+
wine
kernel32
ntdll
diff --git a/reactos/dll/win32/rasman/rasman.rbuild b/reactos/dll/win32/rasman/rasman.rbuild
index c177d0ea4ee..c2e6da74923 100644
--- a/reactos/dll/win32/rasman/rasman.rbuild
+++ b/reactos/dll/win32/rasman/rasman.rbuild
@@ -1,6 +1,7 @@
.
+
wine
kernel32
ntdll
diff --git a/reactos/dll/win32/riched20/riched20.rbuild b/reactos/dll/win32/riched20/riched20.rbuild
index b96c5170121..ed098add847 100644
--- a/reactos/dll/win32/riched20/riched20.rbuild
+++ b/reactos/dll/win32/riched20/riched20.rbuild
@@ -3,6 +3,7 @@
+ -Wno-format
.
include/reactos/wine
diff --git a/reactos/dll/win32/rpcrt4/rpcrt4.rbuild b/reactos/dll/win32/rpcrt4/rpcrt4.rbuild
index bdddd425503..a50ef3f71b0 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 32c5727607f..e5e0ba318ae 100644
--- a/reactos/dll/win32/samlib/samlib.rbuild
+++ b/reactos/dll/win32/samlib/samlib.rbuild
@@ -1,6 +1,7 @@
.
+
ntdll
kernel32
advapi32
diff --git a/reactos/dll/win32/shell32/shell32.rbuild b/reactos/dll/win32/shell32/shell32.rbuild
index 0c3c558bb59..76ab0c8efce 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 719baf651f5..8d42f9acdff 100644
--- a/reactos/dll/win32/shimgvw/shimgvw.rbuild
+++ b/reactos/dll/win32/shimgvw/shimgvw.rbuild
@@ -1,6 +1,7 @@
.
+
kernel32
advapi32
comctl32
diff --git a/reactos/dll/win32/shlwapi/shlwapi.rbuild b/reactos/dll/win32/shlwapi/shlwapi.rbuild
index dc89c3e9dd6..fe272418e8e 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 b4cb35e03df..b36561fd7f8 100644
--- a/reactos/dll/win32/smdll/smdll.rbuild
+++ b/reactos/dll/win32/smdll/smdll.rbuild
@@ -2,6 +2,7 @@
.
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 78eafaaa31c..00eea414eaa 100644
--- a/reactos/dll/win32/twain_32/twain_32.rbuild
+++ b/reactos/dll/win32/twain_32/twain_32.rbuild
@@ -1,6 +1,7 @@
.
+
wine
ntdll
kernel32
diff --git a/reactos/dll/win32/uext2/uext2.rbuild b/reactos/dll/win32/uext2/uext2.rbuild
index 0a5dbda5159..dbf7a0a84bc 100644
--- a/reactos/dll/win32/uext2/uext2.rbuild
+++ b/reactos/dll/win32/uext2/uext2.rbuild
@@ -1,6 +1,7 @@
.
+
ext2lib
ntdll
uext2.c
diff --git a/reactos/dll/win32/ufat/ufat.rbuild b/reactos/dll/win32/ufat/ufat.rbuild
index ed6e98998fa..2bc3e5831c5 100644
--- a/reactos/dll/win32/ufat/ufat.rbuild
+++ b/reactos/dll/win32/ufat/ufat.rbuild
@@ -1,6 +1,7 @@
.
+
vfatlib
ntdll
ufat.c
diff --git a/reactos/dll/win32/ufatx/ufatx.rbuild b/reactos/dll/win32/ufatx/ufatx.rbuild
index b99f238607c..b3a721fbcb8 100644
--- a/reactos/dll/win32/ufatx/ufatx.rbuild
+++ b/reactos/dll/win32/ufatx/ufatx.rbuild
@@ -1,6 +1,7 @@
.
+
vfatxlib
ntdll
ufatx.rc
diff --git a/reactos/dll/win32/untfs/untfs.rbuild b/reactos/dll/win32/untfs/untfs.rbuild
index fa620992ee6..5a57c7a7f55 100644
--- a/reactos/dll/win32/untfs/untfs.rbuild
+++ b/reactos/dll/win32/untfs/untfs.rbuild
@@ -1,6 +1,7 @@
.
+
ntfslib
ntdll
untfs.c
diff --git a/reactos/dll/win32/urlmon/urlmon.rbuild b/reactos/dll/win32/urlmon/urlmon.rbuild
index 2a6525eeb73..0c92317e466 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 de0f8d33e10..51dee24b5ec 100644
--- a/reactos/dll/win32/user32/user32.rbuild
+++ b/reactos/dll/win32/user32/user32.rbuild
@@ -3,6 +3,7 @@
.
include
include/reactos/subsys
+
wine
gdi32
kernel32
diff --git a/reactos/dll/win32/winspool/winspool.rbuild b/reactos/dll/win32/winspool/winspool.rbuild
index 09fa7a61d66..21f17347fb4 100644
--- a/reactos/dll/win32/winspool/winspool.rbuild
+++ b/reactos/dll/win32/winspool/winspool.rbuild
@@ -2,6 +2,7 @@
.
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 849ed1c88e0..38197cf3d07 100644
--- a/reactos/dll/win32/ws2_32/ws2_32.rbuild
+++ b/reactos/dll/win32/ws2_32/ws2_32.rbuild
@@ -2,6 +2,7 @@
include
include/reactos/wine
+
wine
ntdll
diff --git a/reactos/dll/win32/ws2help/ws2help.rbuild b/reactos/dll/win32/ws2help/ws2help.rbuild
index 79378b09522..6f3a0a69dc1 100644
--- a/reactos/dll/win32/ws2help/ws2help.rbuild
+++ b/reactos/dll/win32/ws2help/ws2help.rbuild
@@ -1,6 +1,7 @@
.
+
ntdll
kernel32
ws2_32
diff --git a/reactos/dll/win32/wshirda/wshirda.rbuild b/reactos/dll/win32/wshirda/wshirda.rbuild
index 2e2fe617437..530cc21fb4d 100644
--- a/reactos/dll/win32/wshirda/wshirda.rbuild
+++ b/reactos/dll/win32/wshirda/wshirda.rbuild
@@ -1,6 +1,7 @@
.
+
ntdll
kernel32
ws2_32
diff --git a/reactos/dll/win32/wuapi/wuapi.rbuild b/reactos/dll/win32/wuapi/wuapi.rbuild
index bca3990004d..3b8510623e4 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 b7bd1d029f7..9282be29106 100644
--- a/reactos/drivers/directx/dxapi/dxapi.rbuild
+++ b/reactos/drivers/directx/dxapi/dxapi.rbuild
@@ -4,6 +4,7 @@
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 4bf33cbac9a..4fbb8c1918e 100644
--- a/reactos/drivers/directx/dxgthk/dxgthk.rbuild
+++ b/reactos/drivers/directx/dxgthk/dxgthk.rbuild
@@ -4,6 +4,7 @@
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 6f9b500a18f..cecef356fb6 100644
--- a/reactos/drivers/storage/ide/uniata/uniata.rbuild
+++ b/reactos/drivers/storage/ide/uniata/uniata.rbuild
@@ -4,8 +4,6 @@
.
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 6d1cfe8d0c2..8cc3b71c8bf 100644
--- a/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild
+++ b/reactos/drivers/wdm/audio/drivers/mpu401/mpu401.rbuild
@@ -3,8 +3,6 @@
.
..
- -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 33f6c8f9072..c8ad81a9485 100644
--- a/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild
+++ b/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild
@@ -4,8 +4,6 @@
.
..
../include
- -fno-exceptions
- -fno-rtti
ntoskrnl
diff --git a/reactos/hal/halarm/generic/generic.rbuild b/reactos/hal/halarm/generic/generic.rbuild
index 5f4ec64f7dc..a68b11ec9da 100644
--- a/reactos/hal/halarm/generic/generic.rbuild
+++ b/reactos/hal/halarm/generic/generic.rbuild
@@ -3,6 +3,7 @@
../include
include
+
hal.c
../include/hal.h
diff --git a/reactos/hal/halarm/up/halup.rbuild b/reactos/hal/halarm/up/halup.rbuild
index 00b6da4c290..6f4179dd923 100644
--- a/reactos/hal/halarm/up/halup.rbuild
+++ b/reactos/hal/halarm/up/halup.rbuild
@@ -5,6 +5,7 @@
../include
include
+
halarm_generic
ntoskrnl
diff --git a/reactos/hal/halppc/generic/generic.rbuild b/reactos/hal/halppc/generic/generic.rbuild
index e1052317d74..190ac676db1 100644
--- a/reactos/hal/halppc/generic/generic.rbuild
+++ b/reactos/hal/halppc/generic/generic.rbuild
@@ -3,6 +3,7 @@
../include
include
+
beep.c
bus.c
diff --git a/reactos/hal/halppc/up/halup.rbuild b/reactos/hal/halppc/up/halup.rbuild
index fde75835c85..e834b3160f9 100644
--- a/reactos/hal/halppc/up/halup.rbuild
+++ b/reactos/hal/halppc/up/halup.rbuild
@@ -5,6 +5,7 @@
../include
include
+
halppc_generic
ntoskrnl
diff --git a/reactos/hal/halx86/generic/generic.rbuild b/reactos/hal/halx86/generic/generic.rbuild
index e2fb6838877..a89f6f6be4d 100644
--- a/reactos/hal/halx86/generic/generic.rbuild
+++ b/reactos/hal/halx86/generic/generic.rbuild
@@ -4,6 +4,7 @@
../include
include
+
beep.c
bios.c
@@ -26,6 +27,7 @@
../include
include
+
irq.S
processor.c
@@ -34,6 +36,7 @@
../include
include
+
pci.c
diff --git a/reactos/hal/halx86/hal_generic.rbuild b/reactos/hal/halx86/hal_generic.rbuild
index ce262427734..0c680aa54f2 100644
--- a/reactos/hal/halx86/hal_generic.rbuild
+++ b/reactos/hal/halx86/hal_generic.rbuild
@@ -4,6 +4,7 @@
include
include
+
beep.c
diff --git a/reactos/hal/halx86/hal_generic_pc.rbuild b/reactos/hal/halx86/hal_generic_pc.rbuild
index 576aa285bb8..3571a42117a 100644
--- a/reactos/hal/halx86/hal_generic_pc.rbuild
+++ b/reactos/hal/halx86/hal_generic_pc.rbuild
@@ -4,6 +4,7 @@
include
include
+
pci.c
diff --git a/reactos/hal/halx86/hal_generic_up.rbuild b/reactos/hal/halx86/hal_generic_up.rbuild
index 11fb20e4a18..abb58c330dd 100644
--- a/reactos/hal/halx86/hal_generic_up.rbuild
+++ b/reactos/hal/halx86/hal_generic_up.rbuild
@@ -4,6 +4,7 @@
include
include
+
irq.S
diff --git a/reactos/hal/halx86/halmp.rbuild b/reactos/hal/halx86/halmp.rbuild
index 9ba7c68713f..d8064067569 100644
--- a/reactos/hal/halx86/halmp.rbuild
+++ b/reactos/hal/halx86/halmp.rbuild
@@ -6,6 +6,7 @@
include
include
+
hal_generic
diff --git a/reactos/hal/halx86/halup.rbuild b/reactos/hal/halx86/halup.rbuild
index 319db427e1b..26ed54613a9 100644
--- a/reactos/hal/halx86/halup.rbuild
+++ b/reactos/hal/halx86/halup.rbuild
@@ -6,6 +6,7 @@
include
include
+
hal_generic
hal_generic_up
diff --git a/reactos/hal/halx86/halxbox.rbuild b/reactos/hal/halx86/halxbox.rbuild
index c842c318445..396b1fcca35 100644
--- a/reactos/hal/halx86/halxbox.rbuild
+++ b/reactos/hal/halx86/halxbox.rbuild
@@ -5,6 +5,7 @@
include
include
+
hal_generic
diff --git a/reactos/include/crt/mingw32/intrin.h b/reactos/include/crt/mingw32/intrin.h
index 76e4dd2a612..c04cd2fdd23 100644
--- a/reactos/include/crt/mingw32/intrin.h
+++ b/reactos/include/crt/mingw32/intrin.h
@@ -28,8 +28,6 @@
#ifndef KJK_INTRIN_H_
#define KJK_INTRIN_H_
-#ifndef RC_INVOKED
-
#ifndef __GNUC__
#error Unsupported compiler
#endif
@@ -95,6 +93,4 @@
#endif
-#endif
-
/* EOF */
diff --git a/reactos/include/reactos/idl/idl.rbuild b/reactos/include/reactos/idl/idl.rbuild
index 3746bbebbab..d46450e428e 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 a263af562b1..26340684101 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 3b139cf79ca..f12b5301379 100644
--- a/reactos/lib/3rdparty/libwine/libwine.rbuild
+++ b/reactos/lib/3rdparty/libwine/libwine.rbuild
@@ -3,6 +3,7 @@
include/reactos/wine
+
config.c
debug_ros.c
@@ -11,6 +12,7 @@
include/reactos/wine
+
loader.c
diff --git a/reactos/lib/drivers/oskittcp/oskittcp.rbuild b/reactos/lib/drivers/oskittcp/oskittcp.rbuild
index 809ccf67baf..35bdebd3328 100644
--- a/reactos/lib/drivers/oskittcp/oskittcp.rbuild
+++ b/reactos/lib/drivers/oskittcp/oskittcp.rbuild
@@ -3,6 +3,7 @@
+
include/freebsd
include/freebsd/sys/include
diff --git a/reactos/lib/epsapi/epsapi.rbuild b/reactos/lib/epsapi/epsapi.rbuild
index 787b7161f41..2ed79fdafd2 100644
--- a/reactos/lib/epsapi/epsapi.rbuild
+++ b/reactos/lib/epsapi/epsapi.rbuild
@@ -1,6 +1,7 @@
+
drivers.c
modules.c
diff --git a/reactos/lib/fslib/ext2lib/ext2lib.rbuild b/reactos/lib/fslib/ext2lib/ext2lib.rbuild
index 853d7f248f9..affa25ad15a 100644
--- a/reactos/lib/fslib/ext2lib/ext2lib.rbuild
+++ b/reactos/lib/fslib/ext2lib/ext2lib.rbuild
@@ -2,6 +2,7 @@
.
+
Badblock.c
Bitmap.c
Disk.c
diff --git a/reactos/lib/fslib/ntfslib/ntfslib.rbuild b/reactos/lib/fslib/ntfslib/ntfslib.rbuild
index 40edefe4d60..345246dcc2d 100644
--- a/reactos/lib/fslib/ntfslib/ntfslib.rbuild
+++ b/reactos/lib/fslib/ntfslib/ntfslib.rbuild
@@ -2,5 +2,6 @@
.
+
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 1d40958cdf9..f84c671e5e1 100644
--- a/reactos/lib/fslib/vfatlib/vfatlib.rbuild
+++ b/reactos/lib/fslib/vfatlib/vfatlib.rbuild
@@ -2,6 +2,7 @@
.
+
fat12.c
fat16.c
fat32.c
diff --git a/reactos/lib/fslib/vfatxlib/vfatxlib.rbuild b/reactos/lib/fslib/vfatxlib/vfatxlib.rbuild
index bc7736cd6a7..5ba66aa5f84 100644
--- a/reactos/lib/fslib/vfatxlib/vfatxlib.rbuild
+++ b/reactos/lib/fslib/vfatxlib/vfatxlib.rbuild
@@ -2,6 +2,7 @@
.
+
fatx.c
vfatxlib.c
diff --git a/reactos/lib/nls/idna/idna.rbuild b/reactos/lib/nls/idna/idna.rbuild
index 5b32d7071cf..3409d528e84 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 8e581f36322..ddee907547a 100644
--- a/reactos/lib/nls/normalize/normalize.rbuild
+++ b/reactos/lib/nls/normalize/normalize.rbuild
@@ -2,9 +2,11 @@
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 669e2ed248b..a169418335f 100644
--- a/reactos/lib/nls/scripts/scripts.rbuild
+++ b/reactos/lib/nls/scripts/scripts.rbuild
@@ -2,9 +2,11 @@
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 920dc148e74..07d6b625699 100644
--- a/reactos/lib/ntdllsys/ntdllsys.rbuild
+++ b/reactos/lib/ntdllsys/ntdllsys.rbuild
@@ -1,6 +1,7 @@
+
ntdll.S
diff --git a/reactos/lib/sdk/crt/crt.rbuild b/reactos/lib/sdk/crt/crt.rbuild
index cd08f31b3e5..c8c191035cc 100644
--- a/reactos/lib/sdk/crt/crt.rbuild
+++ b/reactos/lib/sdk/crt/crt.rbuild
@@ -19,6 +19,7 @@
chkstk
.
include
+
extern
diff --git a/reactos/lib/sdk/dxguid/dxguid.rbuild b/reactos/lib/sdk/dxguid/dxguid.rbuild
index 9a6a6c46c0a..5e73ad4658d 100644
--- a/reactos/lib/sdk/dxguid/dxguid.rbuild
+++ b/reactos/lib/sdk/dxguid/dxguid.rbuild
@@ -1,5 +1,6 @@
+
dxguid-mingw.c
diff --git a/reactos/lib/sdk/nt/nt.rbuild b/reactos/lib/sdk/nt/nt.rbuild
index 5a8ed051f55..93957d36f4d 100644
--- a/reactos/lib/sdk/nt/nt.rbuild
+++ b/reactos/lib/sdk/nt/nt.rbuild
@@ -1,5 +1,6 @@
+
entry_point.c
diff --git a/reactos/lib/sdk/strmiids/strmiids.rbuild b/reactos/lib/sdk/strmiids/strmiids.rbuild
index 046ff2a8d7f..4fdde36cdd3 100644
--- a/reactos/lib/sdk/strmiids/strmiids.rbuild
+++ b/reactos/lib/sdk/strmiids/strmiids.rbuild
@@ -1,5 +1,6 @@
+
strmiids.c
diff --git a/reactos/lib/sdk/uuid/uuid.rbuild b/reactos/lib/sdk/uuid/uuid.rbuild
index 6c687483973..6326513ff69 100644
--- a/reactos/lib/sdk/uuid/uuid.rbuild
+++ b/reactos/lib/sdk/uuid/uuid.rbuild
@@ -2,5 +2,6 @@
include/reactos/wine
+
uuid.c
diff --git a/reactos/lib/smlib/smlib.rbuild b/reactos/lib/smlib/smlib.rbuild
index 733ff2f7dc4..4e0eb78550f 100644
--- a/reactos/lib/smlib/smlib.rbuild
+++ b/reactos/lib/smlib/smlib.rbuild
@@ -3,6 +3,7 @@
.
include/reactos/subsys
+
connect.c
execpgm.c
compses.c
diff --git a/reactos/lib/win32ksys/win32ksys.rbuild b/reactos/lib/win32ksys/win32ksys.rbuild
index 4ada178347b..65accf1f1c9 100644
--- a/reactos/lib/win32ksys/win32ksys.rbuild
+++ b/reactos/lib/win32ksys/win32ksys.rbuild
@@ -1,6 +1,7 @@
+
win32k.S
diff --git a/reactos/ntoskrnl/ntoskrnl-generic.rbuild b/reactos/ntoskrnl/ntoskrnl-generic.rbuild
index 18cefa3a4cf..273e4824ac0 100644
--- a/reactos/ntoskrnl/ntoskrnl-generic.rbuild
+++ b/reactos/ntoskrnl/ntoskrnl-generic.rbuild
@@ -3,6 +3,7 @@
+
diff --git a/reactos/subsystems/csr/csrsrv/csrsrv.rbuild b/reactos/subsystems/csr/csrsrv/csrsrv.rbuild
index 3a215fda8a8..1238af76e20 100644
--- a/reactos/subsystems/csr/csrsrv/csrsrv.rbuild
+++ b/reactos/subsystems/csr/csrsrv/csrsrv.rbuild
@@ -5,6 +5,7 @@
.
.
include/reactos/subsys
+
ntdll
pseh
api.c
diff --git a/reactos/subsystems/ntvdm/ntvdm.rbuild b/reactos/subsystems/ntvdm/ntvdm.rbuild
index b291042fe4a..31b50e8460a 100644
--- a/reactos/subsystems/ntvdm/ntvdm.rbuild
+++ b/reactos/subsystems/ntvdm/ntvdm.rbuild
@@ -2,6 +2,7 @@
.
+
ntdll
kernel32
user32
diff --git a/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild b/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild
index a48226d7921..bcccf3983f9 100644
--- a/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild
+++ b/reactos/subsystems/win32/csrss/win32csr/win32csr.rbuild
@@ -7,6 +7,7 @@
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 9a514fed7fa..1f5b438d51a 100644
--- a/reactos/tools/rbuild/backend/mingw/mingw.cpp
+++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp
@@ -256,9 +256,6 @@ 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;
@@ -388,7 +385,28 @@ MingwBackend::GenerateHeader () const
}
void
-MingwBackend::GenerateGlobalProperties (
+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 (
const char* assignmentOperation,
const IfableData& data ) const
{
@@ -403,6 +421,86 @@ MingwBackend::GenerateGlobalProperties (
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
@@ -437,45 +535,14 @@ MingwBackend::GenerateGlobalVariables () const
"PREFIX := %s\n",
compilerPrefix.c_str () );
fprintf ( fMakefile,
- "nasm := $(Q)%s\n",
+ "nasm := %s\n",
nasmCommand.c_str () );
- GenerateGlobalProperties ( "=", ProjectNode.non_if_data );
+ GenerateGlobalCFlagsAndProperties ( "=", ProjectNode.non_if_data );
+ GenerateProjectGccOptions ( "=", 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_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_RCFLAGS := $(PROJECT_CINCLUDES) $(PROJECT_CDEFINES)\n" );
+ fprintf ( fMakefile, "PROJECT_WIDLFLAGS := $(PROJECT_CINCLUDES) $(PROJECT_CDEFINES)\n" );
fprintf ( fMakefile, "PROJECT_LFLAGS := '$(shell ${TARGET_CC} -print-libgcc-file-name)' %s\n", GenerateProjectLFLAGS ().c_str () );
fprintf ( fMakefile, "PROJECT_LPPFLAGS := '$(shell ${TARGET_CPP} -print-file-name=libstdc++.a)' '$(shell ${TARGET_CPP} -print-file-name=libgcc.a)' '$(shell ${TARGET_CPP} -print-file-name=libmingw32.a)' '$(shell ${TARGET_CPP} -print-file-name=libmingwex.a)' '$(shell ${TARGET_CPP} -print-file-name=libcoldname.a)'\n" );
/* hack to get libgcc_eh.a, should check mingw version or something */
@@ -483,38 +550,15 @@ MingwBackend::GenerateGlobalVariables () const
{
fprintf ( fMakefile, "PROJECT_LPPFLAGS += '$(shell ${TARGET_CPP} -print-file-name=libgcc_eh.a)'\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, "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" );
fprintf ( fMakefile, "\n" );
}
diff --git a/reactos/tools/rbuild/backend/mingw/mingw.h b/reactos/tools/rbuild/backend/mingw/mingw.h
index 10a9f603ca6..aeb7bb6ff4d 100644
--- a/reactos/tools/rbuild/backend/mingw/mingw.h
+++ b/reactos/tools/rbuild/backend/mingw/mingw.h
@@ -62,8 +62,14 @@ private:
void CreateMakefile ();
void CloseMakefile () const;
void GenerateHeader () const;
- void GenerateGlobalProperties ( const char* assignmentOperation,
- const IfableData& data ) 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;
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 da32c18c772..ba471d34b4e 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
@@ -543,69 +543,6 @@ 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,
@@ -618,69 +555,24 @@ 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.arguments.length ())
+ if (define.name.find('(') != string::npos)
parameters += "$(QT)";
parameters += "-D";
parameters += define.name;
- parameters += define.arguments;
if (define.value.length () > 0)
{
parameters += "=";
parameters += define.value;
}
- if (define.arguments.length ())
+ if (define.name.find('(') != string::npos)
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,
@@ -695,26 +587,27 @@ MingwModuleHandler::ConcatenatePaths (
}
/* static */ string
-MingwModuleHandler::GenerateIncludeParametersFromVector ( const vector& includes, const CompilerType type )
+MingwModuleHandler::GenerateGccIncludeParametersFromVector ( const vector& includes )
{
string parameters, path_prefix;
for ( size_t i = 0; i < includes.size (); i++ )
{
Include& include = *includes[i];
- if ( include.IsCompilerSet( type ) )
- parameters += " -I" + backend->GetFullPath ( *include.directory );
+ if ( parameters.length () > 0 )
+ parameters += " ";
+ parameters += "-I" + backend->GetFullPath ( *include.directory );
}
return parameters;
}
-/* static */ string
-MingwModuleHandler::GenerateCompilerParametersFromVector ( const vector& compilerFlags, const CompilerType type )
+string
+MingwModuleHandler::GenerateCompilerParametersFromVector ( const vector& compilerFlags, const CompilerType type ) const
{
string parameters;
for ( size_t i = 0; i < compilerFlags.size (); i++ )
{
CompilerFlag& compilerFlag = *compilerFlags[i];
- if ( compilerFlag.IsCompilerSet( type ) )
+ if ( compilerFlag.compiler == type )
parameters += " " + compilerFlag.flag;
}
return parameters;
@@ -757,6 +650,104 @@ 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,
@@ -764,6 +755,18 @@ 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 );
@@ -827,6 +830,7 @@ MingwModuleHandler::GenerateSourceMacros (
{
size_t i;
+ fprintf ( fMakefile, "# SOURCE MACROS\n" );
const vector& compilationUnits = data.compilationUnits;
vector headers;
if ( compilationUnits.size () > 0 )
@@ -873,6 +877,7 @@ MingwModuleHandler::GenerateObjectMacros (
vector headers;
vector mcheaders;
vector mcresources;
+ fprintf ( fMakefile, "# OBJECT MACROS\n" );
if ( compilationUnits.size () > 0 )
{
for ( i = 0; i < compilationUnits.size (); i++ )
@@ -1038,16 +1043,7 @@ MingwModuleHandler::GetDlldataFilename() const
return new FileLocation( IntermediateDirectory, dlldata_path, module.name + ".dlldata.c" );
}
-const FileLocation*
-MingwModuleHandler::GetPrecompiledHeaderPath () const
-{
- if ( !module.pch || !use_pch )
- return NULL;
- return new FileLocation ( IntermediateDirectory,
- module.pch->file->relative_path,
- ".gch_" + module.name );
-}
-
+/* caller needs to delete the returned object */
const FileLocation*
MingwModuleHandler::GetPrecompiledHeaderFilename () const
{
@@ -1058,97 +1054,234 @@ MingwModuleHandler::GetPrecompiledHeaderFilename () const
module.pch->file->name + ".gch" );
}
-Rule windresRule ( "$(eval $(call RBUILD_WRC_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n",
- "$(intermediate_path_unique).coff",
- "$(intermediate_path_unique).res",
- "$(intermediate_path_unique).res.d",
- "$(intermediate_dir)$(SEP)", NULL );
-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 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 gasRule ( "$(eval $(call RBUILD_GAS_RULE,$(module_name),$(source),$(dependencies),$(compiler_flags)))\n",
+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", 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 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_dir)$(SEP)", NULL );
-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_dir)$(SEP)", NULL );
-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_dir)$(SEP)", NULL );
-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 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",
- "$(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)",
+ "$(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 ( "$(eval $(call RBUILD_NASM,$(module_name),$(source),$(dependencies),,$(intermediate_path_unique).o))\n",
+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 );
-
-/* TODO: move these to rules.mak */
+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",
+ "$(intermediate_path_unique).coff",
+ "$(intermediate_path_unique).coff.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 );
-/* 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 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",
+ "$(intermediate_path_unique).spec",
+ "$(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",
+ "$(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",
+ "$(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",
+ "$(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",
+ "$(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",
+ "$(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",
+ "$(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",
+ "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch",
+ "$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d", NULL );
Rule emptyRule ( "", NULL );
void
@@ -1160,6 +1293,13 @@ 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 );
@@ -1172,7 +1312,7 @@ MingwModuleHandler::GenerateGccCommand (
if ( rpcDependencies.size () > 0 )
dependencies += " " + v2s ( backend, rpcDependencies, 5 );
- rule->Execute ( fMakefile, backend, module, sourceFile, clean_files, dependencies );
+ rule->Execute ( fMakefile, backend, module, sourceFile, clean_files, dependencies, flags );
}
string
@@ -1266,6 +1406,8 @@ 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 )
@@ -1593,6 +1735,8 @@ MingwModuleHandler::GenerateObjectFileTargets ( const IfableData& data )
{
GenerateCommands ( *compilationUnits[i],
moduleDependencies );
+ fprintf ( fMakefile,
+ "\n" );
}
vector sourceCompilationUnits;
@@ -1604,6 +1748,20 @@ 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,
@@ -1625,6 +1783,22 @@ 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;
@@ -1632,11 +1806,14 @@ MingwModuleHandler::GenerateObjectFileTargets ()
if ( rpcDependencies.size () > 0 )
dependencies = " " + v2s ( backend, rpcDependencies, 5 );
- 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 );
-
+ pchRule.Execute ( fMakefile,
+ backend,
+ module,
+ module.pch->file,
+ clean_files,
+ dependencies,
+ GenerateCompilerParametersFromVector ( module.non_if_data.compilerFlags, module.cplusplus ? CompilerTypeCPP : CompilerTypeCC ).c_str(),
+ vars );
fprintf ( fMakefile, "\n" );
}
@@ -1694,6 +1871,12 @@ 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
{
@@ -1708,7 +1891,7 @@ MingwModuleHandler::GetLinkerMacro () const
}
string
-MingwModuleHandler::GetDebugFormat ()
+MingwModuleHandler::GetDebugFormat () const
{
if (Environment::GetArch() == "amd64")
{
@@ -1736,8 +1919,7 @@ MingwModuleHandler::GenerateSourceMacro ()
{
sourcesMacro = ssprintf ( "%s_SOURCES", module.name.c_str ());
- if ( module.type == RpcProxy || module.type == Cabinet )
- GenerateSourceMacros ( module.non_if_data );
+ GenerateSourceMacros ( module.non_if_data );
// future references to the macro will be to get its values
sourcesMacro = ssprintf ("$(%s)", sourcesMacro.c_str ());
@@ -1757,6 +1939,7 @@ MingwModuleHandler::GenerateObjectMacro ()
void
MingwModuleHandler::GenerateTargetMacro ()
{
+ fprintf ( fMakefile, "# TARGET MACRO\n" );
fprintf ( fMakefile,
"%s := %s\n",
GetTargetMacro ( module, false ).c_str (),
@@ -1818,60 +2001,166 @@ 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 ());
- const FileLocation * pchPath = GetPrecompiledHeaderPath ();
-
- if ( pchPath )
- {
- string pchPathStr = backend->GetFullName ( *pchPath );
- delete pchPath;
-
- fprintf ( fMakefile,
- "%s_%sINCLUDES+= -I%s\n",
- module.name.c_str(),
- CompilerPrefixTable[CompilerTypeCC],
- pchPathStr.c_str() );
-
- fprintf ( fMakefile,
- "%s_%sINCLUDES+= -I%s\n",
- module.name.c_str(),
- CompilerPrefixTable[CompilerTypeCXX],
- pchPathStr.c_str() );
- }
-
- const char * toolPrefix = "";
+ GenerateMacros (
+ "=",
+ module.non_if_data,
+ &module.linkerFlags,
+ used_defs );
if ( ModuleHandlerInformations[module.type].DefaultHost == HostTrue )
- toolPrefix = "HOST_";
-
- // FIXME: this is very ugly and generates lots of useless entries
- for ( unsigned type = CompilerTypeCC; type < CompilerTypesCount; ++ type )
{
- string flags;
-
- if ( module.dynamicCRT )
- flags += ssprintf ( " $(%s%sFLAG_CRTDLL)", toolPrefix, CompilerPrefixTable[type] );
-
- // FIXME: this duplicates the flag for CPP and C/CXX
- if ( !module.allowWarnings )
- flags += ssprintf ( " $(%s%sFLAG_WERROR)", toolPrefix, CompilerPrefixTable[type] );
-
- if ( module.isUnicode )
- flags += ssprintf ( " $(%s%sFLAG_UNICODE)", toolPrefix, CompilerPrefixTable[type] );
-
- if ( flags.size() )
- {
- fprintf ( fMakefile,
- "%s_%sFLAGS+=%s\n",
- module.name.c_str(),
- CompilerPrefixTable[type],
- flags.c_str() );
- }
+ GenerateMacros("+=", module.project.host_non_if_data, NULL, used_defs);
+ }
+ else
+ {
+ GenerateMacros (
+ "+=",
+ module.project.non_if_data,
+ NULL,
+ used_defs );
}
- GenerateParameters ( module.name.c_str(), "+=", module.non_if_data );
+ 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" );
+ }
+
+ 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";
+ }
+
+ // 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";
+
+ 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 () );
+
+ fprintf (
+ fMakefile,
+ "%s_LFLAGS := $(PROJECT_LFLAGS) $(%s_LFLAGS)\n",
+ module.name.c_str (),
+ module.name.c_str () );
+ }
+ else
+ {
+ fprintf (
+ fMakefile,
+ "%s +=%s\n",
+ cflagsMacro.c_str (),
+ globalCflags.c_str () );
+
+ fprintf (
+ fMakefile,
+ "%s +=%s\n",
+ cxxflagsMacro.c_str (),
+ globalCflags.c_str () );
+
+ fprintf (
+ fMakefile,
+ "%s_LFLAGS += $(HOST_LFLAGS)\n",
+ module.name.c_str () );
+ }
+
+ fprintf (
+ fMakefile,
+ "%s += $(%s)\n",
+ linkDepsMacro.c_str (),
+ libsMacro.c_str () );
+
+ 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 );
+ }
+
+ const char* nasmflags = ModuleHandlerInformations[module.type].nasmflags;
+ if ( strlen( nasmflags ) > 0 )
+ {
+ fprintf ( fMakefile,
+ "%s += %s\n\n",
+ nasmflagsMacro.c_str (),
+ nasmflags );
+ }
const char *linkerflags = ModuleHandlerInformations[module.type].linkerflags;
if ( strlen( linkerflags ) > 0 )
@@ -1882,26 +2171,14 @@ MingwModuleHandler::GenerateOtherMacros ()
linkerflags );
}
- // 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 () );
- }
-
- GenerateMacros (
- "+=",
- module.non_if_data,
- &module.linkerFlags,
- used_defs );
-
fprintf ( fMakefile, "\n\n" );
+
+ // 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 ());
}
void
@@ -1944,9 +2221,9 @@ MingwModuleHandler::GenerateRules ()
Rule * defRule;
if (spec == PSpec)
- defRule = &winebuildPRule;
+ defRule = &winebuildPDefRule;
else
- defRule = &winebuildRule;
+ defRule = &winebuildDefRule;
defRule->Execute ( fMakefile, backend, module, module.importLibrary->source, clean_files );
}
@@ -2184,6 +2461,16 @@ 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,
@@ -2317,6 +2604,7 @@ MingwBuildToolModuleHandler::GenerateBuildToolModuleTarget ()
{
string targetMacro ( GetTargetMacro (module) );
string objectsMacro = GetObjectsMacro ( module );
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
string libsMacro = GetLibsMacro ();
GenerateRules ();
@@ -2333,7 +2621,7 @@ MingwBuildToolModuleHandler::GenerateBuildToolModuleTarget ()
fprintf ( fMakefile, "%s: %s %s | %s\n",
targetMacro.c_str (),
objectsMacro.c_str (),
- libsMacro.c_str (),
+ linkDepsMacro.c_str (),
backend->GetFullPath ( *target_file ).c_str () );
fprintf ( fMakefile, "\t$(ECHO_HOSTLD)\n" );
fprintf ( fMakefile,
@@ -2365,7 +2653,7 @@ MingwKernelModuleHandler::GenerateKernelModuleTarget ()
{
string targetMacro ( GetTargetMacro ( module ) );
string workingDirectory = GetWorkingDirectory ( );
- string libsMacro = GetLibsMacro ();
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
GenerateImportLibraryTargetIfNeeded ();
@@ -2373,7 +2661,7 @@ MingwKernelModuleHandler::GenerateKernelModuleTarget ()
{
GenerateRules ();
- string dependencies = libsMacro + " " + objectsMacro;
+ string dependencies = linkDepsMacro + " " + objectsMacro;
string linkerParameters = ssprintf ( "-subsystem=native -entry=%s -image-base=%s",
module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (),
@@ -2416,7 +2704,7 @@ MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget ()
{
string targetMacro ( GetTargetMacro ( module ) );
string workingDirectory = GetWorkingDirectory ();
- string libsMacro = GetLibsMacro ();
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
GenerateImportLibraryTargetIfNeeded ();
@@ -2424,7 +2712,7 @@ MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget ()
{
GenerateRules ();
- string dependencies = libsMacro + " " + objectsMacro;
+ string dependencies = linkDepsMacro + " " + 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 (),
@@ -2465,7 +2753,7 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ()
{
string targetMacro ( GetTargetMacro (module) );
string workingDirectory = GetWorkingDirectory ( );
- string libsMacro = GetLibsMacro ();
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
GenerateImportLibraryTargetIfNeeded ();
@@ -2473,7 +2761,7 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ()
{
GenerateRules ();
- string dependencies = libsMacro + " " + objectsMacro;
+ string dependencies = linkDepsMacro + " " + 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 (),
@@ -2514,7 +2802,7 @@ MingwNativeCUIModuleHandler::GenerateNativeCUIModuleTarget ()
{
string targetMacro ( GetTargetMacro (module) );
string workingDirectory = GetWorkingDirectory ( );
- string libsMacro = GetLibsMacro ();
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
GenerateImportLibraryTargetIfNeeded ();
@@ -2522,7 +2810,7 @@ MingwNativeCUIModuleHandler::GenerateNativeCUIModuleTarget ()
{
GenerateRules ();
- string dependencies = libsMacro + " " + objectsMacro;
+ string dependencies = linkDepsMacro + " " + objectsMacro;
string linkerParameters = ssprintf ( "-subsystem=native -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000",
module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (),
@@ -2604,7 +2892,7 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ()
{
string targetMacro ( GetTargetMacro (module) );
string workingDirectory = GetWorkingDirectory ( );
- string libsMacro = GetLibsMacro ();
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
GenerateImportLibraryTargetIfNeeded ();
@@ -2612,7 +2900,7 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ()
{
GenerateRules ();
- string dependencies = libsMacro + " " + objectsMacro;
+ string dependencies = linkDepsMacro + " " + 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 (),
@@ -2645,7 +2933,7 @@ MingwWin32OCXModuleHandler::GenerateWin32OCXModuleTarget ()
{
string targetMacro ( GetTargetMacro (module) );
string workingDirectory = GetWorkingDirectory ( );
- string libsMacro = GetLibsMacro ();
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
GenerateImportLibraryTargetIfNeeded ();
@@ -2653,7 +2941,7 @@ MingwWin32OCXModuleHandler::GenerateWin32OCXModuleTarget ()
{
GenerateRules ();
- string dependencies = libsMacro + " " + objectsMacro;
+ string dependencies = linkDepsMacro + " " + 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 (),
@@ -2693,7 +2981,7 @@ MingwWin32CUIModuleHandler::GenerateWin32CUIModuleTarget ()
{
string targetMacro ( GetTargetMacro (module) );
string workingDirectory = GetWorkingDirectory ( );
- string libsMacro = GetLibsMacro ();
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
GenerateImportLibraryTargetIfNeeded ();
@@ -2701,7 +2989,7 @@ MingwWin32CUIModuleHandler::GenerateWin32CUIModuleTarget ()
{
GenerateRules ();
- string dependencies = libsMacro + " " + objectsMacro;
+ string dependencies = linkDepsMacro + " " + objectsMacro;
string linkerParameters = ssprintf ( "-subsystem=console -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000",
module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (),
@@ -2741,7 +3029,7 @@ MingwWin32GUIModuleHandler::GenerateWin32GUIModuleTarget ()
{
string targetMacro ( GetTargetMacro (module) );
string workingDirectory = GetWorkingDirectory ( );
- string libsMacro = GetLibsMacro ();
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
GenerateImportLibraryTargetIfNeeded ();
@@ -2749,7 +3037,7 @@ MingwWin32GUIModuleHandler::GenerateWin32GUIModuleTarget ()
{
GenerateRules ();
- string dependencies = libsMacro + " " + objectsMacro;
+ string dependencies = linkDepsMacro + " " + objectsMacro;
string linkerParameters = ssprintf ( "-subsystem=windows -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000",
module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (),
@@ -2781,7 +3069,6 @@ MingwBootLoaderModuleHandler::Process ()
void
MingwBootLoaderModuleHandler::GenerateBootLoaderModuleTarget ()
{
- fprintf ( fMakefile, "# BOOT LOADER MODULE TARGET\n" );
string targetName ( module.output->name );
string targetMacro ( GetTargetMacro (module) );
string workingDirectory = GetWorkingDirectory ();
@@ -2790,15 +3077,17 @@ MingwBootLoaderModuleHandler::GenerateBootLoaderModuleTarget ()
module.name + ".junk.tmp" );
CLEAN_FILE ( junk_tmp );
string objectsMacro = GetObjectsMacro ( module );
- string libsMacro = GetLibsMacro ();
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
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 (),
- libsMacro.c_str (),
+ linkDepsMacro.c_str (),
backend->GetFullPath ( *target_file ).c_str () );
fprintf ( fMakefile, "\t$(ECHO_LD)\n" );
@@ -2809,7 +3098,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 (),
- libsMacro.c_str (),
+ linkDepsMacro.c_str (),
GetLinkerMacro ().c_str ());
}
else
@@ -2818,7 +3107,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 (),
- libsMacro.c_str (),
+ linkDepsMacro.c_str (),
GetLinkerMacro ().c_str ());
}
fprintf ( fMakefile,
@@ -2848,8 +3137,6 @@ MingwBootProgramModuleHandler::Process ()
void
MingwBootProgramModuleHandler::GenerateBootProgramModuleTarget ()
{
- fprintf ( fMakefile, "# BOOT PROGRAM MODULE TARGET\n" );
-
string targetName ( module.output->name );
string targetMacro ( GetTargetMacro (module) );
string workingDirectory = GetWorkingDirectory ();
@@ -2866,16 +3153,18 @@ MingwBootProgramModuleHandler::GenerateBootProgramModuleTarget ()
CLEAN_FILE ( junk_elf );
CLEAN_FILE ( junk_cpy );
string objectsMacro = GetObjectsMacro ( module );
- string libsMacro = GetLibsMacro ();
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
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 (),
- libsMacro.c_str (),
+ linkDepsMacro.c_str (),
payload->name.c_str (),
backend->GetFullPath ( *target_file ).c_str () );
@@ -2893,7 +3182,7 @@ MingwBootProgramModuleHandler::GenerateBootProgramModuleTarget ()
fprintf ( fMakefile, "\t${ld} $(%s_LINKFORMAT) %s %s -o %s\n",
module.buildtype.c_str (),
- libsMacro.c_str (),
+ linkDepsMacro.c_str (),
backend->GetFullName ( junk_tmp ).c_str (),
backend->GetFullName ( junk_elf ).c_str () );
@@ -3338,7 +3627,7 @@ MingwTestModuleHandler::GenerateTestModuleTarget ()
{
string targetMacro ( GetTargetMacro ( module ) );
string workingDirectory = GetWorkingDirectory ( );
- string libsMacro = GetLibsMacro ();
+ string linkDepsMacro = GetLinkingDependenciesMacro ();
GenerateImportLibraryTargetIfNeeded ();
@@ -3346,7 +3635,7 @@ MingwTestModuleHandler::GenerateTestModuleTarget ()
{
GenerateRules ();
- string dependencies = libsMacro + " " + objectsMacro;
+ string dependencies = linkDepsMacro + " " + objectsMacro;
string linkerParameters = ssprintf ( "-subsystem=console -entry=%s -image-base=%s -file-alignment=0x1000 -section-alignment=0x1000",
module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (),
@@ -3385,11 +3674,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 (),
@@ -3416,17 +3705,18 @@ 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 (),
- libsMacro.c_str (),
+ linkDepsMacro.c_str (),
backend->GetFullPath ( *target_file ).c_str () );
fprintf ( fMakefile, "\t$(ECHO_BOOTPROG)\n" );
@@ -3439,5 +3729,4 @@ 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 5b02cb9975a..d6a529d016c 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.h
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.h
@@ -60,13 +60,7 @@ public:
string_list* pclean_files );
static std::string GenerateGccDefineParametersFromVector ( const std::vector& defines, std::set &used_defs );
- 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 );
+ static std::string GenerateGccIncludeParametersFromVector ( const std::vector& includes );
std::string GetModuleTargets ( const Module& module );
void GetObjectsVector ( const IfableData& data,
@@ -108,7 +102,7 @@ protected:
std::string GetLinkingDependenciesMacro () const;
std::string GetLibsMacro () const;
std::string GetLinkerMacro () const;
- static std::string GetDebugFormat ();
+ std::string GetDebugFormat () const;
void GenerateCleanObjectsAsYouGoCode () const;
void GenerateRunRsymCode () const;
void GenerateRunStripCode () const;
@@ -127,9 +121,15 @@ 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,7 +137,6 @@ 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 36b081b425d..7b403abbc92 100644
--- a/reactos/tools/rbuild/backend/mingw/rules.mak
+++ b/reactos/tools/rbuild/backend/mingw/rules.mak
@@ -6,200 +6,38 @@ 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_path_noext,$(2)}_$(1)
+RBUILD_intermediate_path_unique=${call RBUILD_intermediate_dir,$(2)}$(SEP)$(basename $(notdir $(2)))_$(1)
#(source)
RBUILD_intermediate_dir=${call RBUILD_fullpath,$(value INTERMEDIATE)$(SEP)$(dir ${call RBUILD_strip_prefixes,$(1)})}
-#(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)
-
-$(5).d: $(2) | ${call RBUILD_dir,$(5)}
- $$(ECHO_DEPENDS)
- $${gcc} -MF $$@ ${call RBUILD_cflags,$(1),$(4)} -M -MP -MT $$@ $$<
-
--include $(5).d
-
-$(5): $(2) $(5).d $(3) | ${call RBUILD_dir,$(5)}
- $$(ECHO_CC)
- $${gcc} -o $$@ ${call RBUILD_cflags,$(1),$(4)} -c $$<
-
-else
-
-$(5): $(2) $(3) | ${call RBUILD_dir,$(5)}
- $$(ECHO_CC)
- $${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}
+define RBUILD_GCC_RULE
+
+$(2): $${$(1)_precondition}
+
+ifeq ($(ROS_BUILDDEPS),full)
+
+${call RBUILD_intermediate_path_unique,$(1),$(2)}.o.d: $(2) | ${call RBUILD_intermediate_dir,$(2)}
+ $$(ECHO_DEPENDS)
+ $${gcc} -MF $$@ $$($(1)_CFLAGS) $(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)
+ $${gcc} -o $$@ $$($(1)_CFLAGS) $(4) -c $$<
+
+else
+
+${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)}
+ $$(ECHO_CC)
+ $${gcc} -o $$@ $$($(1)_CFLAGS) $(4) -c $$<
+
+endif
+
+endef
#(module, source, dependencies, cflags)
define RBUILD_GPP_RULE
@@ -210,288 +48,22 @@ ifeq ($(ROS_BUILDDEPS),full)
${call RBUILD_intermediate_path_unique,$(1),$(2)}.o.d: $(2) | ${call RBUILD_intermediate_dir,$(2)}
$$(ECHO_DEPENDS)
- $${gpp} -MF $$@ ${call RBUILD_cxxflags,$(1),$(4)} -M -MP -MT $$@ $$<
+ $${gpp} -MF $$@ $$($(1)_CXXFLAGS) $(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 $$@ ${call RBUILD_cxxflags,$(1),$(4)} -c $$<
+ $${gpp} -o $$@ $$($(1)_CXXFLAGS) $(4) -c $$<
else
${call RBUILD_intermediate_path_unique,$(1),$(2)}.o: $(2) $(3) | ${call RBUILD_intermediate_dir,$(2)}
$$(ECHO_CC)
- $${gpp} -o $$@ ${call RBUILD_cxxflags,$(1),$(4)} -c $$<
+ $${gpp} -o $$@ $$($(1)_CXXFLAGS) $(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
deleted file mode 100644
index 859e7a859a4..00000000000
--- a/reactos/tools/rbuild/compilerdirective.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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 c76ac85d9d2..00c5562b831 100644
--- a/reactos/tools/rbuild/compilerflag.cpp
+++ b/reactos/tools/rbuild/compilerflag.cpp
@@ -57,8 +57,23 @@ CompilerFlag::Initialize ()
}
flag = node.value;
+ compiler = CompilerTypeDontCare;
- ParseCompilers ( node, "cc,cxx" );
+ 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 );
+ }
+ }
}
void
diff --git a/reactos/tools/rbuild/define.cpp b/reactos/tools/rbuild/define.cpp
index d4d394d1231..d972d672b0c 100644
--- a/reactos/tools/rbuild/define.cpp
+++ b/reactos/tools/rbuild/define.cpp
@@ -45,8 +45,7 @@ Define::Define ( const Project& project,
Define::Define ( const Project& project,
const Module* module,
const std::string& name_,
- const std::string& backend_,
- bool redefine_)
+ const std::string& backend_)
: project(project),
module(module),
node(NULL)
@@ -54,7 +53,6 @@ Define::Define ( const Project& project,
name = name_;
value = "";
backend = backend_;
- redefine = redefine_;
}
Define::~Define ()
@@ -68,27 +66,22 @@ Define::~Define ()
void
Define::Initialize()
{
- redefine = node->name == "redefine";
-
const XMLAttribute* att = node->GetAttribute ( "name", true );
att = node->GetAttribute ( "name", true );
assert(att);
-
- 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 ( '(' ) );
-
+ name = att->value;
value = node->value;
att = node->GetAttribute ( "backend", false );
if ( att )
backend = att->value;
- ParseCompilers ( *node, "cpp" );
+ att = node->GetAttribute ( "overridable", false );
+ if ( att )
+ overridable = ( att->value == "true" || att->value == "yes" );
+ else
+ overridable = false;
}
void
diff --git a/reactos/tools/rbuild/include.cpp b/reactos/tools/rbuild/include.cpp
index 9a5aaff23d7..863ebf87436 100644
--- a/reactos/tools/rbuild/include.cpp
+++ b/reactos/tools/rbuild/include.cpp
@@ -30,7 +30,6 @@ Include::Include ( const Project& project,
node ( includeNode ),
module ( NULL )
{
- Initialize ();
}
Include::Include ( const Project& project,
@@ -41,7 +40,6 @@ Include::Include ( const Project& project,
node ( includeNode ),
module ( module )
{
- Initialize ();
}
Include::Include ( const Project& project,
@@ -129,9 +127,3 @@ 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 54cebaf14ed..e87a21091a3 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" || e.name == "redefine" )
+ else if ( e.name == "define" )
{
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 05dafc1a732..42b44d0ab02 100644
--- a/reactos/tools/rbuild/pch.h
+++ b/reactos/tools/rbuild/pch.h
@@ -28,7 +28,6 @@
#include