blob: 4a082a55716973c4dfbe4e1df88764f0f6ef0380 [file] [log] [blame]
developer825ab6a2023-01-18 13:58:01 +08001#!/usr/bin/python3 -u
2import argparse
3import os
4import sys
5import traceback
6
7__author__ = "Sam Shih <sam.shih@medaitek.com>"
8__copyright__ = "Copyright 2023, MediaTek Inc"
9
10
11
12def create_inc_file(config):
13 f = open(config, "r")
14 data = f.read()
15 f.close()
16 out = "PKG_MAKE_FLAGS = \" \\\n"
17
18 for line in data.split("\n"):
19 if "#" not in line:
20 if "CONFIG_MTK_WIFI7" in line:
21 out += "\t"
22 out += (line.replace("_MTK_WIFI7", ""))
23 out += " \\"
24 out += "\n"
25 out += " \""
26 f = open("config.inc", "w")
27 f.write(out)
28 f.close()
29
30
31
32create_inc_file (sys.argv[1])