aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2023-08-17 12:41:12 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2023-08-17 12:41:12 +0200
commit5ced1ca8836bd47a1a64a8ecaffd22a50170e079 (patch)
tree55d2db8f9441a7501bb6f0734a88e383a35d352e
parentf828383609906455b9369b1ae86a75f0bd4ba374 (diff)
add precompile script
-rwxr-xr-xprecompile.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/precompile.sh b/precompile.sh
new file mode 100755
index 00000000..1868b28b
--- /dev/null
+++ b/precompile.sh
@@ -0,0 +1,39 @@
+#! /bin/bash
+
+#
+# x86_64
+#
+
+echo "Building for x86_64"
+
+./configure CC=musl-gcc \
+ --disable-shared \
+ --host x86_64-unknown-linux-musl \
+ --enable-ipv6
+make -j$(nproc)
+
+mkdir -p x86_64
+cp -v libpcap.a x86_64/libpcap.a
+
+make clean
+
+echo "Built x86_64"
+
+#
+# rpi
+#
+
+echo "Building for rpi"
+
+./configure CC=aarch64-linux-musl-gcc \
+ --disable-shared \
+ --host aarch64-unknown-linux-musl \
+ --enable-ipv6
+make -j$(nproc)
+
+mkdir -p rpi
+cp -v libpcap.a rpi/libpcap.a
+
+make clean
+
+echo "Built rpi"