diff --git a/.gitmodules b/.gitmodules index 76077c1..ae19cfb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "deps/json-c"] path = deps/json-c url = https://github.com/json-c/json-c.git +[submodule "deps/curl"] + path = deps/curl + url = https://github.com/curl/curl.git diff --git a/deps/build.sh b/deps/build.sh new file mode 100755 index 0000000..2c5afd3 --- /dev/null +++ b/deps/build.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e +set -x + +cd json-c +./autogen.sh +./configure +make -j24 +make install DESTDIR=$PWD/../build/ +cd ../ + + +# Note: in curl we've disabled the resolver and ssl. We have no DNS resolution or SSL support. +cd curl +./buildconf +./configure --enable-static=on --without-ssl --without-zlib --disable-shared --without-resolver +make -j24 +make install DESTDIR=$PWD/../build/ +cd ../ diff --git a/deps/curl b/deps/curl new file mode 160000 index 0000000..91d03fc --- /dev/null +++ b/deps/curl @@ -0,0 +1 @@ +Subproject commit 91d03fce9634bbaab0129a1d98d2b4fc61bf1d1b diff --git a/src/Makefile b/src/Makefile index 06be737..5fb3793 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,7 +1,7 @@ CC=cc CFLAGS := -g -I. -Wall -Wpedantic -I ../deps/build/usr/local/include/ LDFLAGS = -L ../deps/build/usr/local/lib/ -LDLIBS = -ljson-c +LDLIBS = -ljson-c -lcurl -lpthread LDFLAGS += $(LDLIBS) CFLAGS_STATIC = $(CFLAGS) --static OBJ=main.o pfparser.o sysparser.o