aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorladislas <ladislas@weareleka.com>2014-08-19 00:02:38 +0200
committerladislas <ladislas@weareleka.com>2014-08-19 00:29:52 +0200
commitf930c1780170f53f81bfe42095c8c161a5802cfc (patch)
treeea93260b540916278cb035f9e97d7b2c9eba93eb /bin
parent58f303a5d358f68e1b53012790225e8d677f8f0e (diff)
Add automatic lib detection with python script, enhance lib listing output when compiling
Diffstat (limited to 'bin')
-rwxr-xr-xbin/auto-lib.py22
1 files changed, 7 insertions, 15 deletions
diff --git a/bin/auto-lib.py b/bin/auto-lib.py
index a0a1d4a..77d69f6 100755
--- a/bin/auto-lib.py
+++ b/bin/auto-lib.py
@@ -16,6 +16,12 @@ MAIN_LIBS = [] ;
LIBS_DEPS = [] ;
LIBS_DEPS_STACK = [] ;
+# Define functions
+def outputLibs(libArray):
+ for lib in libArray:
+ print(lib),
+ print("")
+
# Find local sources .ino, .c or .cpp
for file in os.listdir(os.curdir):
if file.endswith((".c", ".cpp", ".ino")):
@@ -70,24 +76,10 @@ while LIBS_DEPS_STACK:
LIBS_DEPS_STACK.remove(lib)
LIBS_DEPS_STACK = sorted(set(LIBS_DEPS_STACK))
- # print(LIBS_DEPS_STACK)
LIBS_DEPS = sorted(set(LIBS_DEPS))
-# print("Main libraries: ")
-# print(MAIN_LIBS);
-# print("")
-# print("Dependencies stack: ")
-# print(LIBS_DEPS_STACK)
-# print("")
-# print("Libraries dependencies: ")
-# print(LIBS_DEPS);
-
-def outputLibs(libArray):
- for lib in libArray:
- print(lib),
- print("")
-
+# Output libraries for the Makefile
print("MAIN_LIBS"),
outputLibs(MAIN_LIBS)