mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
fixed some dependency issues, verbose support, 'make clean' gets more
svn path=/branches/xmlbuildsystem/; revision=13899
This commit is contained in:
+40
-24
@@ -1,37 +1,52 @@
|
||||
host_gcc = gcc
|
||||
host_gpp = g++
|
||||
host_ld = ld
|
||||
host_ar = ar
|
||||
host_objcopy = objcopy
|
||||
# Default to half-verbose mode
|
||||
ifeq ($(VERBOSE),no)
|
||||
Q = @
|
||||
HALFVERBOSEECHO = @:
|
||||
else
|
||||
ifeq ($(VERBOSE),yes)
|
||||
Q =
|
||||
HALFVERBOSEECHO = @:
|
||||
else
|
||||
Q = @
|
||||
HALFVERBOSEECHO = @echo
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
host_gcc = $(Q)gcc
|
||||
host_gpp = $(Q)g++
|
||||
host_ld = $(Q)ld
|
||||
host_ar = $(Q)ar
|
||||
host_objcopy = $(Q)objcopy
|
||||
ifeq ($(HOST),mingw32-linux)
|
||||
EXEPREFIX = ./
|
||||
EXEPOSTFIX =
|
||||
SEP = /
|
||||
nmkdir = mkdir -p
|
||||
gcc = mingw32-gcc
|
||||
gpp = mingw32-g++
|
||||
ld = mingw32-ld
|
||||
ar = mingw32-ar
|
||||
objcopy = mingw32-objcopy
|
||||
dlltool = mingw32-dlltool
|
||||
windres = mingw32-windres
|
||||
nmkdir = $(Q)mkdir -p
|
||||
gcc = $(Q)mingw32-gcc
|
||||
gpp = $(Q)mingw32-g++
|
||||
ld = $(Q)mingw32-ld
|
||||
ar = $(Q)mingw32-ar
|
||||
objcopy = $(Q)mingw32-objcopy
|
||||
dlltool = $(Q)mingw32-dlltool
|
||||
windres = $(Q)mingw32-windres
|
||||
rm = rm -f
|
||||
cp = cp
|
||||
cp = $(Q)cp
|
||||
NUL = /dev/null
|
||||
else # mingw32-windows
|
||||
EXEPREFIX =
|
||||
EXEPOSTFIX = .exe
|
||||
SEP = \$(EMPTY_VAR)
|
||||
nmkdir = mkdir
|
||||
gcc = gcc
|
||||
gpp = g++
|
||||
ld = ld
|
||||
ar = ar
|
||||
objcopy = objcopy
|
||||
dlltool = dlltool
|
||||
windres = windres
|
||||
nmkdir = $(Q)mkdir
|
||||
gcc = $(Q)gcc
|
||||
gpp = $(Q)g++
|
||||
ld = $(Q)ld
|
||||
ar = $(Q)ar
|
||||
objcopy = $(Q)objcopy
|
||||
dlltool = $(Q)dlltool
|
||||
windres = $(Q)windres
|
||||
rm = del /f /q
|
||||
cp = copy /y
|
||||
cp = $(Q)copy /y
|
||||
NUL = NUL
|
||||
endif
|
||||
|
||||
@@ -62,7 +77,8 @@ PREAUTO := \
|
||||
|
||||
Makefile.auto: $(RMKDIR_TARGET) $(BUILDNO_TARGET) $(NCI_SERVICE_FILES) $(WMC_TARGET) $(WRC_TARGET) \
|
||||
$(RSYM_TARGET) $(CDMAKE_TARGET) $(RBUILD_TARGET) $(PREAUTO) $(XMLBUILDFILES)
|
||||
tools$(SEP)rbuild$(SEP)rbuild$(EXEPOSTFIX) mingw
|
||||
$(HALFVERBOSEECHO) [RBUILD] makefile.auto
|
||||
$(Q)tools$(SEP)rbuild$(SEP)rbuild$(EXEPOSTFIX) mingw
|
||||
|
||||
|
||||
include$(SEP)reactos$(SEP)bugcodes.h ntoskrnl$(SEP)bugcodes.rc: $(WMC_TARGET) ntoskrnl$(SEP)ntoskrnl.mc
|
||||
|
||||
@@ -14,9 +14,11 @@ RMKDIR_HOST_CFLAGS = -g -Werror -Wall
|
||||
RMKDIR_HOST_LFLAGS = -g
|
||||
|
||||
$(RMKDIR_TARGET): $(RMKDIR_OBJECTS)
|
||||
$(HALFVERBOSEECHO) [LD] $@
|
||||
${host_gcc} $(RMKDIR_OBJECTS) $(RMKDIR_HOST_LFLAGS) -o $(RMKDIR_TARGET)
|
||||
|
||||
$(RMKDIR_OBJECTS): %.o : %.c
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gcc} $(RMKDIR_HOST_CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: rmkdir_clean
|
||||
@@ -41,9 +43,11 @@ RSYM_HOST_CFLAGS = -g -Werror -Wall
|
||||
RSYM_HOST_LFLAGS = -g
|
||||
|
||||
$(RSYM_TARGET): $(RSYM_OBJECTS)
|
||||
$(HALFVERBOSEECHO) [LD] $@
|
||||
${host_gcc} $(RSYM_OBJECTS) $(RSYM_HOST_LFLAGS) -o $(RSYM_TARGET)
|
||||
|
||||
$(RSYM_OBJECTS): %.o : %.c
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gcc} $(RSYM_HOST_CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: rsym_clean
|
||||
|
||||
@@ -17,9 +17,11 @@ BUILDNO_HOST_CFLAGS = -Iinclude/reactos -g -Werror -Wall
|
||||
BUILDNO_HOST_LFLAGS = -g
|
||||
|
||||
$(BUILDNO_TARGET): $(BUILDNO_OBJECTS)
|
||||
$(HALFVERBOSEECHO) [LD] $@
|
||||
${host_gpp} $(BUILDNO_OBJECTS) $(BUILDNO_HOST_CFLAGS) -o $(BUILDNO_TARGET)
|
||||
|
||||
$(BUILDNO_OBJECTS): %.o : %.cpp include$(SEP)reactos$(SEP)version.h
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gpp} $(BUILDNO_HOST_CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: buildno_clean
|
||||
|
||||
@@ -15,9 +15,11 @@ CDMAKE_HOST_CFLAGS = -Iinclude -g -Werror -Wall
|
||||
CDMAKE_HOST_LFLAGS = -g
|
||||
|
||||
$(CDMAKE_TARGET): $(CDMAKE_OBJECTS)
|
||||
$(HALFVERBOSEECHO) [LD] $@
|
||||
${host_gcc} $(CDMAKE_OBJECTS) $(CDMAKE_HOST_CFLAGS) -o $(CDMAKE_TARGET)
|
||||
|
||||
$(CDMAKE_OBJECTS): %.o : %.c
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gcc} $(CDMAKE_CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: cdmake_clean
|
||||
|
||||
@@ -14,9 +14,11 @@ NCI_HOST_CFLAGS = -Iinclude -g -Werror -Wall
|
||||
NCI_HOST_LFLAGS = -g
|
||||
|
||||
$(NCI_TARGET): $(NCI_OBJECTS)
|
||||
$(HALFVERBOSEECHO) [LD] $@
|
||||
${host_gcc} $(NCI_OBJECTS) $(NCI_HOST_CFLAGS) -o $(NCI_TARGET)
|
||||
|
||||
$(NCI_OBJECTS): %.o : %.c
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gcc} $(NCI_HOST_CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: nci_clean
|
||||
@@ -45,7 +47,8 @@ NCI_SERVICE_FILES = \
|
||||
$(WIN32K_USER_STUBS)
|
||||
|
||||
$(NCI_SERVICE_FILES): $(NCI_TARGET)
|
||||
@$(EXEPREFIX)$(NCI_TARGET) \
|
||||
$(HALFVERBOSEECHO) [NCI] $@
|
||||
$(Q)$(EXEPREFIX)$(NCI_TARGET) \
|
||||
$(KERNEL_SVC_DB) \
|
||||
$(WIN32K_SVC_DB) \
|
||||
$(KERNEL_SERVICE_TABLE) \
|
||||
|
||||
@@ -165,13 +165,13 @@ MingwBackend::GenerateProjectLFLAGS () const
|
||||
void
|
||||
MingwBackend::GenerateGlobalVariables () const
|
||||
{
|
||||
fprintf ( fMakefile, "mkdir = tools" SSEP "rmkdir" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "winebuild = tools" SSEP "winebuild" SSEP "winebuild" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "bin2res = tools" SSEP "bin2res" SSEP "bin2res" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "cabman = tools" SSEP "cabman" SSEP "cabman" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "cdmake = tools" SSEP "cdmake" SSEP "cdmake" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "rsym = tools" SSEP "rsym" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "wrc = tools" SSEP "wrc" SSEP "wrc" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "mkdir = $(Q)tools" SSEP "rmkdir" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "winebuild = $(Q)tools" SSEP "winebuild" SSEP "winebuild" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "bin2res = $(Q)tools" SSEP "bin2res" SSEP "bin2res" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "cabman = $(Q)tools" SSEP "cabman" SSEP "cabman" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "cdmake = $(Q)tools" SSEP "cdmake" SSEP "cdmake" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "rsym = $(Q)tools" SSEP "rsym" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "wrc = $(Q)tools" SSEP "wrc" SSEP "wrc" EXEPOSTFIX "\n" );
|
||||
fprintf ( fMakefile, "\n" );
|
||||
GenerateGlobalCFlagsAndProperties (
|
||||
"=",
|
||||
@@ -201,11 +201,14 @@ void
|
||||
MingwBackend::GenerateAllTarget () const
|
||||
{
|
||||
fprintf ( fMakefile, "all:" );
|
||||
int wrap_count = 0;
|
||||
for ( size_t i = 0; i < ProjectNode.modules.size (); i++ )
|
||||
{
|
||||
Module& module = *ProjectNode.modules[i];
|
||||
if ( IncludeInAllTarget ( module ) )
|
||||
{
|
||||
if ( wrap_count++ == 5 )
|
||||
fprintf ( fMakefile, " \\\n\t\t" ), wrap_count = 0;
|
||||
fprintf ( fMakefile,
|
||||
" %s",
|
||||
FixupTargetFilename ( module.GetPath () ).c_str () );
|
||||
@@ -316,7 +319,9 @@ MingwBackend::ProcessModule ( Module& module ) const
|
||||
MingwModuleHandler* h = MingwModuleHandler::LookupHandler (
|
||||
module.node.location,
|
||||
module.type );
|
||||
h->Process ( module );
|
||||
MingwModuleHandler::string_list clean_files;
|
||||
h->Process ( module, clean_files );
|
||||
h->GenerateCleanTarget ( module, clean_files );
|
||||
h->GenerateDirectoryTargets ();
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,8 @@ ReplaceExtension ( const std::string& filename,
|
||||
class MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
typedef std::vector<std::string> string_list;
|
||||
|
||||
static std::map<ModuleType,MingwModuleHandler*>* handler_map;
|
||||
static int ref;
|
||||
|
||||
@@ -20,10 +22,12 @@ public:
|
||||
static void SetMakefile ( FILE* f );
|
||||
static MingwModuleHandler* LookupHandler ( const std::string& location,
|
||||
ModuleType moduletype_ );
|
||||
virtual void Process ( const Module& module ) = 0;
|
||||
virtual void Process ( const Module& module, string_list& clean_files ) = 0;
|
||||
bool IncludeDirectoryTarget ( const std::string& directory ) const;
|
||||
void GenerateDirectoryTargets () const;
|
||||
static std::string GetObjectFilename ( const std::string& sourceFilename );
|
||||
void GenerateCleanTarget ( const Module& module,
|
||||
const string_list& clean_files ) const;
|
||||
protected:
|
||||
const std::string &PassThruCacheDirectory ( const std::string &f ) const;
|
||||
std::string GetWorkingDirectory () const;
|
||||
@@ -32,7 +36,6 @@ protected:
|
||||
std::string GetModuleArchiveFilename ( const Module& module ) const;
|
||||
bool IsGeneratedFile ( const File& file ) const;
|
||||
std::string GetImportLibraryDependency ( const Module& importedModule ) const;
|
||||
std::string GetImportLibraryDependencies ( const Module& module ) const;
|
||||
std::string GetModuleDependencies ( const Module& module ) const;
|
||||
std::string GetAllDependencies ( const Module& module ) const;
|
||||
std::string GetSourceFilenames ( const Module& module,
|
||||
@@ -41,11 +44,14 @@ protected:
|
||||
std::string GetSourceFilenamesWithoutGeneratedFiles ( const Module& module ) const;
|
||||
|
||||
std::string GetObjectFilenames ( const Module& module ) const;
|
||||
void GenerateMacrosAndTargetsHost ( const Module& module ) const;
|
||||
void GenerateMacrosAndTargetsTarget ( const Module& module ) const;
|
||||
void GenerateMacrosAndTargetsHost ( const Module& module,
|
||||
string_list& clean_files ) const;
|
||||
void GenerateMacrosAndTargetsTarget ( const Module& module,
|
||||
string_list& clean_files ) const;
|
||||
void GenerateMacrosAndTargetsTarget ( const Module& module,
|
||||
const std::string* cflags,
|
||||
const std::string* nasmflags ) const;
|
||||
const std::string* nasmflags,
|
||||
string_list& clean_files ) const;
|
||||
std::string GetInvocationDependencies ( const Module& module ) const;
|
||||
void GenerateInvocations ( const Module& module ) const;
|
||||
|
||||
@@ -53,12 +59,16 @@ protected:
|
||||
void GeneratePreconditionDependencies ( const Module& module ) const;
|
||||
std::string GetCFlagsMacro ( const Module& module ) const;
|
||||
std::string GetObjectsMacro ( const Module& module ) const;
|
||||
std::string GetLinkingDependenciesMacro ( const Module& module ) const;
|
||||
std::string GetLibsMacro ( const Module& module ) const;
|
||||
std::string GetLinkerMacro ( const Module& module ) const;
|
||||
void GenerateLinkerCommand ( const Module& module,
|
||||
const std::string& linker,
|
||||
const std::string& linkerParameters,
|
||||
const std::string& objectFilenames ) const;
|
||||
void GenerateImportLibraryTargetIfNeeded ( const Module& module ) const;
|
||||
const std::string& objectsMacro,
|
||||
const std::string& libsMacro,
|
||||
string_list& clean_files ) const;
|
||||
void GenerateImportLibraryTargetIfNeeded ( const Module& module, string_list& clean_files ) const;
|
||||
std::string GetDefinitionDependencies ( const Module& module ) const;
|
||||
std::string GetLinkingDependencies ( const Module& module ) const;
|
||||
bool IsCPlusPlusModule ( const Module& module ) const;
|
||||
@@ -72,6 +82,7 @@ private:
|
||||
std::string GenerateGccIncludeParametersFromVector ( const std::vector<Include*>& includes ) const;
|
||||
std::string GenerateCompilerParametersFromVector ( const std::vector<CompilerFlag*>& compilerFlags ) const;
|
||||
std::string GenerateLinkerParametersFromVector ( const std::vector<LinkerFlag*>& linkerFlags ) const;
|
||||
std::string GenerateImportLibraryDependenciesFromVector ( const std::vector<Library*>& libraries ) const;
|
||||
std::string GenerateLinkerParameters ( const Module& module ) const;
|
||||
void GenerateMacro ( const char* assignmentOperation,
|
||||
const std::string& macro,
|
||||
@@ -82,6 +93,7 @@ private:
|
||||
const std::vector<File*>& files,
|
||||
const std::vector<Include*>& includes,
|
||||
const std::vector<Define*>& defines,
|
||||
const std::vector<Library*>& libraries,
|
||||
const std::vector<CompilerFlag*>* compilerFlags,
|
||||
const std::vector<LinkerFlag*>* linkerFlags,
|
||||
const std::vector<If*>& ifs,
|
||||
@@ -89,13 +101,17 @@ private:
|
||||
const std::string& nasmflags_macro,
|
||||
const std::string& windresflags_macro,
|
||||
const std::string& linkerflags_macro,
|
||||
const std::string& objs_macro) const;
|
||||
const std::string& objs_macro,
|
||||
const std::string& libs_macro,
|
||||
const std::string& linkdeps_macro ) const;
|
||||
void GenerateMacros ( const Module& module,
|
||||
const std::string& cflags_macro,
|
||||
const std::string& nasmflags_macro,
|
||||
const std::string& windresflags_macro,
|
||||
const std::string& linkerflags_macro,
|
||||
const std::string& objs_macro) const;
|
||||
const std::string& objs_macro,
|
||||
const std::string& libs_macro,
|
||||
const std::string& linkDepsMacro ) const;
|
||||
std::string GenerateGccIncludeParameters ( const Module& module ) const;
|
||||
std::string GenerateGccParameters ( const Module& module ) const;
|
||||
std::string GenerateNasmParameters ( const Module& module ) const;
|
||||
@@ -114,14 +130,16 @@ private:
|
||||
const std::string& sourceFilename,
|
||||
const std::string& windresflagsMacro ) const;
|
||||
void GenerateWinebuildCommands ( const Module& module,
|
||||
const std::string& sourceFilename ) const;
|
||||
const std::string& sourceFilename,
|
||||
string_list& clean_files ) const;
|
||||
void GenerateCommands ( const Module& module,
|
||||
const std::string& sourceFilename,
|
||||
const std::string& cc,
|
||||
const std::string& cppc,
|
||||
const std::string& cflagsMacro,
|
||||
const std::string& nasmflagsMacro,
|
||||
const std::string& windresflagsMacro ) const;
|
||||
const std::string& windresflagsMacro,
|
||||
string_list& clean_files ) const;
|
||||
void GenerateObjectFileTargets ( const Module& module,
|
||||
const std::vector<File*>& files,
|
||||
const std::vector<If*>& ifs,
|
||||
@@ -129,14 +147,16 @@ private:
|
||||
const std::string& cppc,
|
||||
const std::string& cflagsMacro,
|
||||
const std::string& nasmflagsMacro,
|
||||
const std::string& windresflagsMacro ) const;
|
||||
const std::string& windresflagsMacro,
|
||||
string_list& clean_files ) const;
|
||||
void GenerateObjectFileTargets ( const Module& module,
|
||||
const std::string& cc,
|
||||
const std::string& cppc,
|
||||
const std::string& cflagsMacro,
|
||||
const std::string& nasmflagsMacro,
|
||||
const std::string& windresflagsMacro ) const;
|
||||
void GetCleanTargets ( std::vector<std::string>& out,
|
||||
const std::string& windresflagsMacro,
|
||||
string_list& clean_files ) const;
|
||||
void GetCleanTargets ( string_list& out,
|
||||
const std::vector<File*>& files,
|
||||
const std::vector<If*>& ifs ) const;
|
||||
std::string GenerateArchiveTarget ( const Module& module,
|
||||
@@ -147,7 +167,8 @@ private:
|
||||
const std::string& cppc,
|
||||
const std::string& ar,
|
||||
const std::string* clags,
|
||||
const std::string* nasmflags ) const;
|
||||
const std::string* nasmflags,
|
||||
string_list& clean_files ) const;
|
||||
std::string GetSpecObjectDependencies ( const std::string& filename ) const;
|
||||
std::string GetDefaultDependencies ( const Module& module ) const;
|
||||
};
|
||||
@@ -157,9 +178,9 @@ class MingwBuildToolModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwBuildToolModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateBuildToolModuleTarget ( const Module& module );
|
||||
void GenerateBuildToolModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -167,9 +188,9 @@ class MingwKernelModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwKernelModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateKernelModuleTarget ( const Module& module );
|
||||
void GenerateKernelModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -177,9 +198,9 @@ class MingwStaticLibraryModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwStaticLibraryModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateStaticLibraryModuleTarget ( const Module& module );
|
||||
void GenerateStaticLibraryModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -187,9 +208,9 @@ class MingwObjectLibraryModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwObjectLibraryModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateObjectLibraryModuleTarget ( const Module& module );
|
||||
void GenerateObjectLibraryModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -197,9 +218,9 @@ class MingwKernelModeDLLModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwKernelModeDLLModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateKernelModeDLLModuleTarget ( const Module& module );
|
||||
void GenerateKernelModeDLLModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -207,9 +228,9 @@ class MingwKernelModeDriverModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwKernelModeDriverModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateKernelModeDriverModuleTarget ( const Module& module );
|
||||
void GenerateKernelModeDriverModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -217,9 +238,9 @@ class MingwNativeDLLModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwNativeDLLModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateNativeDLLModuleTarget ( const Module& module );
|
||||
void GenerateNativeDLLModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -227,9 +248,9 @@ class MingwNativeCUIModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwNativeCUIModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateNativeCUIModuleTarget ( const Module& module );
|
||||
void GenerateNativeCUIModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -237,10 +258,10 @@ class MingwWin32DLLModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwWin32DLLModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateExtractWineDLLResourcesTarget ( const Module& module );
|
||||
void GenerateWin32DLLModuleTarget ( const Module& module );
|
||||
void GenerateExtractWineDLLResourcesTarget ( const Module& module, string_list& clean_files );
|
||||
void GenerateWin32DLLModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -248,9 +269,9 @@ class MingwWin32CUIModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwWin32CUIModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateWin32CUIModuleTarget ( const Module& module );
|
||||
void GenerateWin32CUIModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -258,9 +279,9 @@ class MingwWin32GUIModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwWin32GUIModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateWin32GUIModuleTarget ( const Module& module );
|
||||
void GenerateWin32GUIModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -268,9 +289,9 @@ class MingwBootLoaderModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwBootLoaderModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateBootLoaderModuleTarget ( const Module& module );
|
||||
void GenerateBootLoaderModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -278,9 +299,9 @@ class MingwBootSectorModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwBootSectorModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateBootSectorModuleTarget ( const Module& module );
|
||||
void GenerateBootSectorModuleTarget ( const Module& module, string_list& clean_files );
|
||||
};
|
||||
|
||||
|
||||
@@ -288,9 +309,9 @@ class MingwIsoModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwIsoModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
virtual void Process ( const Module& module, string_list& clean_files );
|
||||
private:
|
||||
void GenerateIsoModuleTarget ( const Module& module );
|
||||
void GenerateIsoModuleTarget ( const Module& module, string_list& clean_files );
|
||||
std::string GetBootstrapCdDirectories ( const std::string bootcdDirectory,
|
||||
const Module& module ) const;
|
||||
std::string GetNonModuleCdDirectories ( const std::string bootcdDirectory,
|
||||
|
||||
@@ -85,24 +85,30 @@ RBUILD_HOST_CXXFLAGS = -g -I$(RBUILD_BASE) -Werror -Wall
|
||||
RBUILD_HOST_LFLAGS = -g
|
||||
|
||||
$(RBUILD_TARGET): $(RBUILD_OBJECTS)
|
||||
$(HALFVERBOSEECHO) [LD] $@
|
||||
${host_gpp} $(RBUILD_OBJECTS) $(RBUILD_HOST_LFLAGS) -o $(RBUILD_TARGET)
|
||||
|
||||
$(RBUILD_COMMON_OBJECTS): %.o: %.cpp
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
|
||||
|
||||
$(RBUILD_SPECIAL_OBJECTS): %.o: %.cpp
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
|
||||
|
||||
$(RBUILD_TEST_TARGET): $(RBUILD_TEST_OBJECTS)
|
||||
$(HALFVERBOSEECHO) [LD] $@
|
||||
${host_gpp} $(RBUILD_TEST_OBJECTS) $(RBUILD_HOST_LFLAGS) -o $(RBUILD_TEST_TARGET)
|
||||
|
||||
$(RBUILD_TEST_SPECIAL_OBJECTS): %.o: %.cpp
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: rbuild_test
|
||||
|
||||
rbuild_test: $(RBUILD_TEST_TARGET)
|
||||
$(RBUILD_TEST_TARGET)
|
||||
$(HALFVERBOSEECHO) [TEST] $@
|
||||
$(Q)$(RBUILD_TEST_TARGET)
|
||||
|
||||
.PHONY: rbuild_clean
|
||||
rbuild_clean:
|
||||
|
||||
@@ -174,10 +174,10 @@ Module::ProcessXMLSubElement ( const XMLElement& e,
|
||||
}
|
||||
else if ( e.name == "library" && e.value.size () )
|
||||
{
|
||||
if ( pIf )
|
||||
/*if ( pIf )
|
||||
throw InvalidBuildFileException (
|
||||
e.location,
|
||||
"<library> is not a valid sub-element of <if>" );
|
||||
"<library> is not a valid sub-element of <if>" );*/
|
||||
libraries.push_back ( new Library ( e, *this, e.value ) );
|
||||
subs_invalid = true;
|
||||
}
|
||||
@@ -528,13 +528,20 @@ Library::Library ( const XMLElement& _node,
|
||||
const string& _name )
|
||||
: node(_node),
|
||||
module(_module),
|
||||
name(_name)
|
||||
name(_name),
|
||||
imported_module(_module.project.LocateModule(_name))
|
||||
{
|
||||
if ( module.name == name )
|
||||
throw InvalidBuildFileException (
|
||||
node.location,
|
||||
"module '%s' cannot link against itself",
|
||||
name.c_str() );
|
||||
if ( !imported_module )
|
||||
throw InvalidBuildFileException (
|
||||
node.location,
|
||||
"module '%s' trying to import non-existant module '%s'",
|
||||
module.name.c_str(),
|
||||
name.c_str() );
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -231,6 +231,7 @@ public:
|
||||
const XMLElement& node;
|
||||
const Module& module;
|
||||
std::string name;
|
||||
const Module* imported_module;
|
||||
|
||||
Library ( const XMLElement& _node,
|
||||
const Module& _module,
|
||||
@@ -317,6 +318,7 @@ public:
|
||||
std::vector<Define*> defines;
|
||||
std::vector<Property*> properties;
|
||||
std::vector<If*> ifs;
|
||||
std::vector<Library*> libraries;
|
||||
|
||||
If ( const XMLElement& node_,
|
||||
const Project& project_,
|
||||
|
||||
@@ -84,9 +84,11 @@ UNICODE_HOST_CFLAGS = \
|
||||
-I$(UNICODE_BASE) -Iinclude/wine -Iw32api/include
|
||||
|
||||
$(UNICODE_TARGET): $(UNICODE_OBJECTS)
|
||||
$(HALFVERBOSEECHO) [AR] $@
|
||||
${host_ar} -rc $(UNICODE_TARGET) $(UNICODE_OBJECTS)
|
||||
|
||||
$(UNICODE_OBJECTS): %.o : %.c
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gcc} $(UNICODE_HOST_CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: unicode_clean
|
||||
|
||||
@@ -21,9 +21,11 @@ WMC_HOST_CXXFLAGS = -I$(WMC_BASE) -g -Werror -Wall
|
||||
WMC_HOST_LFLAGS = -g
|
||||
|
||||
$(WMC_TARGET): $(WMC_OBJECTS)
|
||||
$(HALFVERBOSEECHO) [LD] $@
|
||||
${host_gcc} $(WMC_OBJECTS) $(WMC_HOST_LFLAGS) -o $(WMC_TARGET)
|
||||
|
||||
$(WMC_OBJECTS): %.o : %.c
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gcc} $(WMC_HOST_CXXFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: wmc_clean
|
||||
|
||||
@@ -15,9 +15,11 @@ WPP_OBJECTS = \
|
||||
WPP_HOST_CFLAGS = -D__USE_W32API -I$(WPP_BASE) -Iinclude -Iinclude/wine -g
|
||||
|
||||
$(WPP_TARGET): $(WPP_OBJECTS)
|
||||
$(HALFVERBOSEECHO) [AR] $@
|
||||
${host_ar} -rc $(WPP_TARGET) $(WPP_OBJECTS)
|
||||
|
||||
$(WPP_OBJECTS): %.o : %.c
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gcc} $(WPP_HOST_CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: wpp_clean
|
||||
|
||||
@@ -28,9 +28,11 @@ WRC_HOST_CFLAGS = -I$(WRC_BASE) -g -Werror -Wall \
|
||||
WRC_HOST_LFLAGS = -g
|
||||
|
||||
$(WRC_TARGET): $(WRC_OBJECTS) $(UNICODE_TARGET) $(WPP_TARGET)
|
||||
$(HALFVERBOSEECHO) [LD] $@
|
||||
${host_gcc} $(WRC_OBJECTS) $(UNICODE_TARGET) $(WPP_TARGET) $(WRC_HOST_LFLAGS) -o $(WRC_TARGET)
|
||||
|
||||
$(WRC_OBJECTS): %.o : %.c
|
||||
$(HALFVERBOSEECHO) [CC] $<
|
||||
${host_gcc} $(WRC_HOST_CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: wrc_clean
|
||||
|
||||
Reference in New Issue
Block a user