[rdkb][logan][config][Refactor machine config and sync script]

[Description]
Refactor machine config and sync script

[Release-log]

Change-Id: Ic236e97095716dc7634c48e2cd1e0fb2a51d7301
diff --git a/mtk_scripts/rdkb_logan_config_helper b/mtk_scripts/rdkb_logan_config_helper
index 4a082a5..8c73cf6 100755
--- a/mtk_scripts/rdkb_logan_config_helper
+++ b/mtk_scripts/rdkb_logan_config_helper
@@ -9,11 +9,11 @@
 
 
 
-def create_inc_file(config):
+def create_inc_file(config,output):
     f = open(config, "r")
     data = f.read()
     f.close()
-    out = "PKG_MAKE_FLAGS = \" \\\n"
+    out = "PKG_MAKE_FLAGS_%s= \" \\\n"% output
     
     for line in data.split("\n"):
         if "#" not in line:
@@ -23,10 +23,10 @@
                 out += " \\"
                 out += "\n"
     out += "    \""
-    f = open("config.inc", "w")
+    f = open("%s.inc"% output, "w")
     f.write(out)
     f.close()
 
 
 
-create_inc_file (sys.argv[1])
\ No newline at end of file
+create_inc_file (sys.argv[1], sys.argv[2])
\ No newline at end of file