Output rules for objectlibrary files
authorCasper Hornstrup <chorns@users.sourceforge.net>
Fri, 25 Mar 2005 16:32:46 +0000 (16:32 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Fri, 25 Mar 2005 16:32:46 +0000 (16:32 +0000)
svn path=/branches/xmlbuildsystem/; revision=14314

reactos/tools/rbuild/backend/mingw/mingw.cpp
reactos/tools/rbuild/backend/mingw/modulehandler.cpp
reactos/tools/rbuild/module.cpp

index 943ef62..e3ef786 100644 (file)
@@ -143,6 +143,7 @@ MingwBackend::Process ()
 \r
        for ( i = 0; i < iend; i++ )\r
                v[i]->GenerateObjectMacro();\r
+       fprintf ( fMakefile, "\n" );\r
        for ( i = 0; i < iend; i++ )\r
                v[i]->GenerateTargetMacro();\r
        fprintf ( fMakefile, "\n" );\r
index 69fcab4..3954f6f 100644 (file)
@@ -1234,7 +1234,7 @@ MingwModuleHandler::GenerateOtherMacros ()
 \r
        fprintf (\r
                fMakefile,\r
-               "%s += $(%s)",\r
+               "%s += $(%s)\n",\r
                linkDepsMacro.c_str (),\r
                libsMacro.c_str () );\r
 \r
@@ -1281,17 +1281,18 @@ MingwModuleHandler::GenerateRules ()
                module.name.c_str (),\r
                GetTargetMacro ( module ).c_str () );\r
 \r
+       string ar_target;\r
        if ( module.type != ObjectLibrary )\r
-       {\r
-               string ar_target =\r
-                       GenerateArchiveTarget ( ar, objectsMacro );\r
+               ar_target = GenerateArchiveTarget ( ar, objectsMacro );\r
 \r
-               GenerateObjectFileTargets ( cc,\r
-                                                                       cppc,\r
-                                                                       cflagsMacro,\r
-                                                                       nasmflagsMacro,\r
-                                                                       windresflagsMacro );\r
+       GenerateObjectFileTargets ( cc,\r
+                                                               cppc,\r
+                                                               cflagsMacro,\r
+                                                               nasmflagsMacro,\r
+                                                               windresflagsMacro );\r
 \r
+       if ( module.type != ObjectLibrary )\r
+       {\r
                if ( targetMacro != ar_target )\r
                {\r
                        CLEAN_FILE ( ar_target );\r
@@ -1722,8 +1723,7 @@ MingwKernelModeDriverModuleHandler::GenerateKernelModeDriverModuleTarget ()
        {\r
                GenerateRules ();\r
 \r
-               string dependencies =\r
-                       objectsMacro + " " + linkDepsMacro;\r
+               string dependencies = objectsMacro + " " + linkDepsMacro;\r
 \r
                string linkerParameters = ssprintf ( "-Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -mdll",\r
                                                     module.entrypoint.c_str (),\r
index 992dcf1..702dc23 100644 (file)
@@ -561,11 +561,6 @@ Module::GetDependencyPath () const
        if ( HasImportLibrary () )\r
        {\r
                return ReplaceExtension ( GetPath(), ".a" );\r
-               /*return ssprintf ( "dk%cnkm%clib%clib%s.a",\r
-                                 CSEP,\r
-                                 CSEP,\r
-                                 CSEP,\r
-                                 name.c_str () );*/\r
        }\r
        else\r
                return GetPath();\r