15 lines
No EOL
623 B
Bash
15 lines
No EOL
623 B
Bash
#!/bin/sh
|
|
|
|
# Clone the specific FANN version you want
|
|
git clone https://github.com/libfann/fann.git
|
|
cd fann/src
|
|
|
|
# Build the library with gcc (which uses musl in Alpine)
|
|
gcc -c -O2 -fPIC -I../src/include -DDISABLE_PARALLEL_FANN -o floatfann.o floatfann.c
|
|
gcc -c -O2 -fPIC -I../src/include -DDISABLE_PARALLEL_FANN -o doublefann.o doublefann.c
|
|
gcc -c -O2 -fPIC -I../src/include -DDISABLE_PARALLEL_FANN -o fixedfann.o fixedfann.c
|
|
ar rcs libfann.a floatfann.o doublefann.o fixedfann.o
|
|
|
|
# Copy artifacts to the output directory in the home folder
|
|
cp libfann.a /home/builder/output/
|
|
cp ../src/include/fann.h /home/builder/output/ |