Support two more attribute LIBPATH and INCLUDEPATH in tools_def file.
[mirror_edk2.git] / Tools / Java / Source / GenBuild / org / tianocore / build / GenBuildTask.java
index 7ce975a60ad3a94b2064db1e689d9a55a57d3f65..9a847172f8f0ecfd17f3bc48248db1e34e209dca 100644 (file)
@@ -543,6 +543,28 @@ public class GenBuildTask extends Ant {
             } else {\r
                 getProject().setProperty(cmd[m] + "_DPATH", "");\r
             }\r
+            \r
+            //\r
+            // Set CC_LIBPATH\r
+            //\r
+            key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_LIBPATH;\r
+            String libpath = GlobalData.getCommandSetting(key, fpdModuleId);\r
+            if (libpath != null) {\r
+                getProject().setProperty(cmd[m] + "_LIBPATH", libpath.replaceAll("(\\\\)", "/"));\r
+            } else {\r
+                getProject().setProperty(cmd[m] + "_LIBPATH", "");\r
+            }\r
+            \r
+            //\r
+            // Set CC_INCLUDEPATH\r
+            //\r
+            key[4] = ToolDefinitions.TOOLS_DEF_ATTRIBUTE_INCLUDEPATH;\r
+            String includepath = GlobalData.getCommandSetting(key, fpdModuleId);\r
+            if (dpath != null) {\r
+                getProject().setProperty(cmd[m] + "_INCLUDEPATH", includepath.replaceAll("(\\\\)", "/"));\r
+            } else {\r
+                getProject().setProperty(cmd[m] + "_INCLUDEPATH", "");\r
+            }\r
         }\r
     }\r
 \r