fix NUL, move macros to the bootstrap makefile as necessary
authorRoyce Mitchell III <royce3@ev1.net>
Fri, 25 Feb 2005 21:21:53 +0000 (21:21 +0000)
committerRoyce Mitchell III <royce3@ev1.net>
Fri, 25 Feb 2005 21:21:53 +0000 (21:21 +0000)
svn path=/branches/xmlbuildsystem/; revision=13746

reactos/Makefile
reactos/tools/rbuild/backend/mingw/mingw.cpp

index 46fc6f9..e151d9a 100644 (file)
@@ -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):
index 80eeefb..ea99758 100644 (file)
@@ -80,7 +80,7 @@ MingwBackend::GenerateProjectCFlagsMacro ( const char* assignmentOperation,
                        " -I%s",\r
                        includes[i]->directory.c_str() );\r
        }\r
-       \r
+\r
        for ( i = 0; i < defines.size(); i++ )\r
        {\r
                Define& d = *defines[i];\r
@@ -138,7 +138,7 @@ MingwBackend::GenerateGlobalCFlagsAndProperties (
                                rIf.includes,\r
                                rIf.defines,\r
                                rIf.ifs );\r
-                       fprintf ( \r
+                       fprintf (\r
                                fMakefile,\r
                                "endif\n\n" );\r
                }\r
@@ -162,37 +162,7 @@ MingwBackend::GenerateProjectLFLAGS () const
 void\r
 MingwBackend::GenerateGlobalVariables () const\r
 {\r
-       fprintf ( fMakefile, "EXEPREFIX = " EXEPREFIX "\n" );\r
-       fprintf ( fMakefile, "EXEPOSTFIX = " EXEPOSTFIX "\n" );\r
-       fprintf ( fMakefile, "SEP = " SSEP "$(EMPTY_VAR)\n" );\r
-       fprintf ( fMakefile, "host_gcc = gcc\n" );\r
-       fprintf ( fMakefile, "host_gpp = g++\n" );\r
-       fprintf ( fMakefile, "host_ld = ld\n" );\r
-       fprintf ( fMakefile, "host_ar = ar\n" );\r
-       fprintf ( fMakefile, "host_objcopy = objcopy\n" );\r
-#ifdef WIN32\r
-       fprintf ( fMakefile, "nmkdir = mkdir\n" );\r
-       fprintf ( fMakefile, "rm = del /f /q\n" );\r
-       fprintf ( fMakefile, "gcc = gcc\n" );\r
-       fprintf ( fMakefile, "gpp = g++\n" );\r
-       fprintf ( fMakefile, "ld = ld\n" );\r
-       fprintf ( fMakefile, "ar = ar\n" );\r
-       fprintf ( fMakefile, "objcopy = objcopy\n" );\r
-       fprintf ( fMakefile, "dlltool = dlltool\n" );\r
-       fprintf ( fMakefile, "windres = windres\n" );\r
-#else\r
-       fprintf ( fMakefile, "nmkdir = mkdir -p\n" );\r
-       fprintf ( fMakefile, "rm = rm -f\n" );\r
-       fprintf ( fMakefile, "gcc = mingw32-gcc\n" );\r
-       fprintf ( fMakefile, "gpp = mingw32-g++\n" );\r
-       fprintf ( fMakefile, "ld = mingw32-ld\n" );\r
-       fprintf ( fMakefile, "ar = mingw32-ar\n" );\r
-       fprintf ( fMakefile, "objcopy = mingw32-objcopy\n" );\r
-       fprintf ( fMakefile, "dlltool = mingw32-dlltool\n" );\r
-       fprintf ( fMakefile, "windres = mingw32-windres\n" );\r
-#endif\r
        fprintf ( fMakefile, "mkdir = tools" SSEP "rmkdir" EXEPOSTFIX "\n" );\r
-       fprintf ( fMakefile, "NUL=NUL\n" );\r
        fprintf ( fMakefile, "winebuild = tools" SSEP "winebuild" SSEP "winebuild" EXEPOSTFIX "\n" );\r
        fprintf ( fMakefile, "bin2res = tools" SSEP "bin2res" SSEP "bin2res" EXEPOSTFIX "\n" );\r
        fprintf ( fMakefile, "cabman = tools" SSEP "cabman" SSEP "cabman" EXEPOSTFIX "\n" );\r
@@ -208,8 +178,6 @@ MingwBackend::GenerateGlobalVariables () const
        fprintf ( fMakefile, "PROJECT_LFLAGS = %s\n",\r
                  GenerateProjectLFLAGS ().c_str () );\r
        fprintf ( fMakefile, "\n" );\r
-\r
-       fprintf ( fMakefile, ".PHONY: clean\n\n" );\r
 }\r
 \r
 bool\r
@@ -257,7 +225,7 @@ MingwBackend::GetBuildToolDependencies () const
        }\r
        return dependencies;\r
 }\r
-       \r
+\r
 void\r
 MingwBackend::GenerateInitTarget () const\r
 {\r