#
# Accepted environment variables:
#
+# ROS_ARCH
+# This variable specifies the name of the architecture to build ReactOS for.
+# The variable defaults to i386.
+#
# ROS_PREFIX
# This variable specifies the prefix of the MinGW installation. On Windows
# a prefix is usually not needed, but on linux it is usually "mingw32". If
endif
endif
+ifneq ($(ROS_ARCH),)
+ ARCH := $(ROS_ARCH)
+else
+ ARCH := i386
+endif
+
ifneq ($(ROS_INTERMEDIATE),)
INTERMEDIATE := $(ROS_INTERMEDIATE)
else
ifneq ($(ROS_CDOUTPUT),)
INTERMEDIATE := obj-$(ROS_CDOUTPUT)
else
- INTERMEDIATE := obj-i386
+ INTERMEDIATE := obj-$(ARCH)
endif
endif
INTERMEDIATE_ := $(INTERMEDIATE)$(SEP)
ifneq ($(ROS_CDOUTPUT),)
OUTPUT := output-$(ROS_CDOUTPUT)
else
- OUTPUT := output-i386
+ OUTPUT := output-$(ARCH)
endif
endif
OUTPUT_ := $(OUTPUT)$(SEP)
include tools/tools.mak
include boot/freeldr/bootsect/bootsect.mak
-include $(ROS_AUTOMAKE)
-include tools/nci/nci.mak
PREAUTO := \
$(BIN2C_TARGET) \
$(BUGCODES_RC) \
$(ERRCODES_H) \
$(ERRCODES_RC) \
- $(GENDIB_DIB_FILES)
+ $(GENDIB_DIB_FILES) \
+ $(NCI_SERVICE_FILES)
POSTAUTO : \
psdk \
- $(IDL_FILES) \
- $(NCI_SERVICE_FILES)
+ $(IDL_FILES)
$(ROS_AUTOMAKE): $(RBUILD_TARGET) $(PREAUTO) $(XMLBUILDFILES)
${mkdir} $(INTERMEDIATE_)media$(SEP)inf 2>$(NUL)
$(ECHO_RBUILD)
- $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) mingw
+ $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -rReactOS-$(ARCH).rbuild mingw
@$(MAKE) POSTAUTO
world: all bootcd livecd
}
+MissingArgumentException::MissingArgumentException ( const string& argument )
+ : Exception ( "Argument '%s' is missing",
+ argument.c_str () )
+{
+}
+
+
OutOfMemoryException::OutOfMemoryException ()
: Exception ( "Out of memory" )
{
};
+class MissingArgumentException : public Exception
+{
+public:
+ MissingArgumentException ( const std::string& argument );
+};
+
+
class InvalidOperationException : public Exception
{
public:
using std::vector;
static string BuildSystem;
-static string RootXmlFile = "ReactOS.rbuild";
+static string RootXmlFile;
static Configuration configuration;
bool
if ( !ParseArguments ( argc, argv ) )
{
printf ( "Generates project files for buildsystems\n\n" );
- printf ( " rbuild [switches] buildsystem\n\n" );
+ printf ( " rbuild [switches] -r{rootfile.rbuild} buildsystem\n\n" );
printf ( "Switches:\n" );
printf ( " -v Be verbose.\n" );
printf ( " -c Clean as you go. Delete generated files as soon as they are not\n" );
printf ( " needed anymore.\n" );
- printf ( " -r{file.rbuild} Name of the root rbuild file. Default is ReactOS.rbuild.\n" );
printf ( " -dd Disable automatic dependencies.\n" );
printf ( " -dm{module} Check only automatic dependencies for this module.\n" );
printf ( " -ud Disable multiple source files per compilation unit.\n" );
}
try
{
+ if ( RootXmlFile.length () == 0 )
+ throw MissingArgumentException ( "-r" );
+
string projectFilename ( RootXmlFile );
printf ( "Reading build files..." );
include tools/dbgprint/dbgprint.mak
include tools/gendib/gendib.mak
include tools/mkhive/mkhive.mak
+include tools/nci/nci.mak
include tools/pefixup.mak
include tools/raddr2line.mak
include tools/rbuild/rbuild.mak