From 3324a119a458de41bcc1ec850ac9e4d7b0bf365c Mon Sep 17 00:00:00 2001 From: Royce Mitchell III Date: Fri, 25 Feb 2005 21:21:53 +0000 Subject: [PATCH] fix NUL, move macros to the bootstrap makefile as necessary svn path=/branches/xmlbuildsystem/; revision=13746 --- reactos/Makefile | 36 ++++++++++++++----- reactos/tools/rbuild/backend/mingw/mingw.cpp | 38 ++------------------ 2 files changed, 31 insertions(+), 43 deletions(-) diff --git a/reactos/Makefile b/reactos/Makefile index 46fc6f914a6..e151d9a34b6 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -1,27 +1,47 @@ +host_gcc = gcc +host_gpp = g++ +host_ld = ld +host_ar = ar +host_objcopy = objcopy ifeq ($(HOST),mingw32-linux) + EXEPREFIX = ./ EXEPOSTFIX = SEP = / - host_gcc = gcc - host_gpp = g++ nmkdir = mkdir -p - rm = rm + gcc = mingw32-gcc + gpp = mingw32-g++ + ld = mingw32-ld + ar = mingw32-ar + objcopy = mingw32-objcopy + dlltool = mingw32-dlltool + windres = mingw32-windres + rm = rm -f + NUL = /dev/null else # mingw32-windows + EXEPREFIX = EXEPOSTFIX = .exe SEP = \$(EMPTY_VAR) - host_gcc = gcc - host_gpp = g++ nmkdir = mkdir + gcc = gcc + gpp = g++ + ld = ld + ar = ar + objcopy = objcopy + dlltool = dlltool + windres = windres rm = del /f /q + NUL = NUL endif +.PHONY: all +.PHONY: clean + all: Makefile.auto ifneq ($(ROS_INTERMEDIATE),) $(ROS_INTERMEDIATE)tools: $(ROS_INTERMEDIATE) -else -$(ROS_INTERMEDIATE)tools: -endif ${nmkdir} $(ROS_INTERMEDIATE)tools +endif ifneq ($(ROS_INTERMEDIATE),) $(ROS_INTERMEDIATE): diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp index 80eeefbf48d..ea997581403 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.cpp +++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp @@ -80,7 +80,7 @@ MingwBackend::GenerateProjectCFlagsMacro ( const char* assignmentOperation, " -I%s", includes[i]->directory.c_str() ); } - + for ( i = 0; i < defines.size(); i++ ) { Define& d = *defines[i]; @@ -138,7 +138,7 @@ MingwBackend::GenerateGlobalCFlagsAndProperties ( rIf.includes, rIf.defines, rIf.ifs ); - fprintf ( + fprintf ( fMakefile, "endif\n\n" ); } @@ -162,37 +162,7 @@ MingwBackend::GenerateProjectLFLAGS () const void MingwBackend::GenerateGlobalVariables () const { - fprintf ( fMakefile, "EXEPREFIX = " EXEPREFIX "\n" ); - fprintf ( fMakefile, "EXEPOSTFIX = " EXEPOSTFIX "\n" ); - fprintf ( fMakefile, "SEP = " SSEP "$(EMPTY_VAR)\n" ); - fprintf ( fMakefile, "host_gcc = gcc\n" ); - fprintf ( fMakefile, "host_gpp = g++\n" ); - fprintf ( fMakefile, "host_ld = ld\n" ); - fprintf ( fMakefile, "host_ar = ar\n" ); - fprintf ( fMakefile, "host_objcopy = objcopy\n" ); -#ifdef WIN32 - fprintf ( fMakefile, "nmkdir = mkdir\n" ); - fprintf ( fMakefile, "rm = del /f /q\n" ); - fprintf ( fMakefile, "gcc = gcc\n" ); - fprintf ( fMakefile, "gpp = g++\n" ); - fprintf ( fMakefile, "ld = ld\n" ); - fprintf ( fMakefile, "ar = ar\n" ); - fprintf ( fMakefile, "objcopy = objcopy\n" ); - fprintf ( fMakefile, "dlltool = dlltool\n" ); - fprintf ( fMakefile, "windres = windres\n" ); -#else - fprintf ( fMakefile, "nmkdir = mkdir -p\n" ); - fprintf ( fMakefile, "rm = rm -f\n" ); - fprintf ( fMakefile, "gcc = mingw32-gcc\n" ); - fprintf ( fMakefile, "gpp = mingw32-g++\n" ); - fprintf ( fMakefile, "ld = mingw32-ld\n" ); - fprintf ( fMakefile, "ar = mingw32-ar\n" ); - fprintf ( fMakefile, "objcopy = mingw32-objcopy\n" ); - fprintf ( fMakefile, "dlltool = mingw32-dlltool\n" ); - fprintf ( fMakefile, "windres = mingw32-windres\n" ); -#endif fprintf ( fMakefile, "mkdir = tools" SSEP "rmkdir" EXEPOSTFIX "\n" ); - fprintf ( fMakefile, "NUL=NUL\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" ); @@ -208,8 +178,6 @@ MingwBackend::GenerateGlobalVariables () const fprintf ( fMakefile, "PROJECT_LFLAGS = %s\n", GenerateProjectLFLAGS ().c_str () ); fprintf ( fMakefile, "\n" ); - - fprintf ( fMakefile, ".PHONY: clean\n\n" ); } bool @@ -257,7 +225,7 @@ MingwBackend::GetBuildToolDependencies () const } return dependencies; } - + void MingwBackend::GenerateInitTarget () const { -- 2.17.1