Add curl dep

This commit is contained in:
dave 2018-07-04 17:08:07 -07:00
parent 7fef29b935
commit ff7b709118
4 changed files with 25 additions and 1 deletions

3
.gitmodules vendored
View File

@ -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

20
deps/build.sh vendored Executable file
View File

@ -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 ../

1
deps/curl vendored Submodule

@ -0,0 +1 @@
Subproject commit 91d03fce9634bbaab0129a1d98d2b4fc61bf1d1b

View File

@ -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