forked from izaya/LuPPC
libevent2 dependency script
This commit is contained in:
parent
bdf4bf7a67
commit
5221e5e113
@ -7,7 +7,7 @@ OUT=$TOOL
|
|||||||
|
|
||||||
if [ $# -lt 1 ]
|
if [ $# -lt 1 ]
|
||||||
then
|
then
|
||||||
echo "Usage : $0 [all|arm32|x86_64|i486]"
|
echo "Usage : $0 [all|arm32|x86_64|i486] <libevent|libressl>"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ case "$1" in
|
|||||||
all )
|
all )
|
||||||
TARGETS=(arm32 i486 x86_64)
|
TARGETS=(arm32 i486 x86_64)
|
||||||
for i in ${TARGETS[@]}; do
|
for i in ${TARGETS[@]}; do
|
||||||
./$0 $i
|
./$0 $i $2
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
arm32 )
|
arm32 )
|
||||||
@ -46,6 +46,12 @@ rm -rf dependencies/lib-$OUT
|
|||||||
mkdir -p dependencies/lib-$OUT
|
mkdir -p dependencies/lib-$OUT
|
||||||
|
|
||||||
cd dependencies
|
cd dependencies
|
||||||
|
|
||||||
|
#################
|
||||||
|
# LibreSSL
|
||||||
|
|
||||||
|
if [ $2 = "libressl" ] || [ $# -lt 2 ]; then
|
||||||
|
|
||||||
git clone https://github.com/libressl-portable/portable.git libressl
|
git clone https://github.com/libressl-portable/portable.git libressl
|
||||||
cd libressl
|
cd libressl
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
@ -58,3 +64,34 @@ mkdir -p ../include-$OUT/openssl
|
|||||||
cp -rfv crypto/.libs/libcrypto.a ../lib-$OUT
|
cp -rfv crypto/.libs/libcrypto.a ../lib-$OUT
|
||||||
cp -rfv ssl/.libs/libssl.a ../lib-$OUT
|
cp -rfv ssl/.libs/libssl.a ../lib-$OUT
|
||||||
cp -rfv include/openssl/* ../include-$OUT/openssl
|
cp -rfv include/openssl/* ../include-$OUT/openssl
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################
|
||||||
|
# LibEvent
|
||||||
|
|
||||||
|
if [ $2 = "libevent" ] || [ $# -lt 2 ]; then
|
||||||
|
|
||||||
|
if [ ! -f "libevent-2.0.22-stable.tar.gz" ]; then
|
||||||
|
wget "https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz"
|
||||||
|
tar xzvf "libevent-2.0.22-stable.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd libevent-2.0.22-stable
|
||||||
|
|
||||||
|
./autogen.sh
|
||||||
|
./configure --host=$TOOL
|
||||||
|
make clean
|
||||||
|
make -j8
|
||||||
|
|
||||||
|
mkdir -p ../include/event2
|
||||||
|
mkdir -p ../include-$OUT/event2
|
||||||
|
cp -rfv include/event2/* ../include-$OUT/event2
|
||||||
|
cp -rfv .libs/libevent.a ../lib-$OUT
|
||||||
|
cp -rfv .libs/libevent_core.a ../lib-$OUT
|
||||||
|
cp -rfv .libs/libevent_extra.a ../lib-$OUT
|
||||||
|
cp -rfv .libs/libevent_pthreads.a ../lib-$OUT
|
||||||
|
|
||||||
|
fi
|
@ -6,6 +6,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <event2/event.h>
|
||||||
|
|
||||||
static int epollfd;
|
static int epollfd;
|
||||||
|
|
||||||
static int handleStdin(int fd, void* data) {
|
static int handleStdin(int fd, void* data) {
|
||||||
|
Loading…
Reference in New Issue
Block a user