PRSDK-2194: Added RULES_MAKE macro
authorM V Pratap Reddy <x0257344@ti.com>
Wed, 11 Jul 2018 21:54:43 +0000 (03:24 +0530)
committerM V Pratap Reddy <x0257344@ti.com>
Wed, 11 Jul 2018 21:54:43 +0000 (03:24 +0530)
 - Added RULES_MAKE macro to support build based on custom Rules.make location

build/buildlib.xs

index 42af1587f1eacaafcee48fd093b2d5450825d14b..49900edbe9e2027d969179277b69c66ac75a13b6 100644 (file)
@@ -153,7 +153,16 @@ function createMake(makefile)
         
       makefile.writeLine("\n# ROOT Directory");        
       makefile.writeLine("export ROOTDIR := "+pkgroot);
-    
+
+      makefile.writeLine("\n# Include Rules.make");
+      makefile.writeLine("ifndef PDK_INSTALL_DIR_RECIPE");
+      makefile.writeLine("ifeq ($(RULES_MAKE),)");
+      makefile.writeLine("include $(PDK_INSTALL_PATH)/ti/build/Rules.make");
+      makefile.writeLine("else");
+      makefile.writeLine("include $(RULES_MAKE)");
+      makefile.writeLine("endif");
+      makefile.writeLine("endif");
+
       makefile.writeLine("\n# INCLUDE Directory");
       makefile.writeLine("export INCDIR := "+getxdcpath+";$(ROOTDIR)");