forked from esptiny86/espsynth86
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_library.sh
executable file
·68 lines (51 loc) · 3.51 KB
/
build_library.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
#
# Folder Structure
#
# COMPILE_PATH = make build result
# LIBRARY_PATH = lib build result
# SOURCE_PATH = Actual Library Source Code
#
CWD=`pwd`
COMPILE_PATH=build
SOURCE_PATH=src
LIBRARY_VERSION_TAG=`git describe --tag`
LIBRARY_PATH=./library/espsynth86-${LIBRARY_VERSION_TAG}
LIBRARY_BUILD_NAME=espsynth86-${LIBRARY_VERSION_TAG}
LIBRARY_SRC_PATH=${LIBRARY_PATH}/src
PRECOMPILED_PATH=${LIBRARY_SRC_PATH}/esp8266
ESPTOOL_PATH=/Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin
AR_PATH=$ESPTOOL_PATH/xtensa-lx106-elf-ar
git submodule update --init
rm -fr ${LIBRARY_PATH}
mkdir -p ${LIBRARY_PATH}
mkdir -p ${LIBRARY_SRC_PATH}
mkdir -p ${PRECOMPILED_PATH}
#Copy header file to library
cp ./$SOURCE_PATH/*.h $LIBRARY_SRC_PATH
cp -r ./examples $LIBRARY_PATH
cp ./library.json $LIBRARY_PATH
cp ./library.properties $LIBRARY_PATH
#Build Sketch
make
cd $SOURCE_PATH
LIB_FILES=`ls *.cpp | while read f; do echo ${COMPILE_PATH}/${f}.o; done;`
cd $CWD
${AR_PATH} rvs $PRECOMPILED_PATH/libespsynth86.a ${LIB_FILES}
cp ./external/*/src/* $LIBRARY_SRC_PATH
rm -fr ${LIBRARY_PATH}.zip
cd library
zip -r ${LIBRARY_BUILD_NAME}.zip ${LIBRARY_BUILD_NAME}
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Global*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Defines*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Analog*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Audio*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Euclid*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Expr*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Neo*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Vector*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Equation*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Fixed*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Input*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Module*.o
# /Users/xcorex/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-ar rvs espsynth86.a /tmp/mkESP/synthmodule86_d1_mini/Synth*.o