Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Build/libHttpClient.Linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ get_filename_component(PATH_TO_ROOT "../.." ABSOLUTE)

project("libHttpClient.Linux")

set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
set(CMAKE_STATIC_LIBRARY_PREFIX "")
set(CMAKE_SHARED_LIBRARY_PREFIX "")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down
14 changes: 13 additions & 1 deletion Build/libHttpClient.Linux/curl_Linux.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@ while [[ $# -gt 0 ]]; do
done

pushd "$SCRIPT_DIR"/../../External/curl
autoreconf -fi "$SCRIPT_DIR"/../../External/curl

if [ ! -f ./configure ]; then
if [ -f configure.ac ]; then
if command -v autoreconf >/dev/null 2>&1; then
autoreconf -fi
else
echo "autoreconf not found; skipping"
fi
else
echo "Missing cURL sources. Please run 'git submodule update --init --recursive'."
exit 1
fi
fi

if [ -f "$SCRIPT_DIR/../../Out/x64/$CONFIGURATION/libcurl.Linux/libcurl.a" ]; then
echo "Previously-built library present at $SCRIPT_DIR/../../Out/x64/$CONFIGURATION/libcurl.Linux/libcurl.a - skipping build"
Expand Down
7 changes: 7 additions & 0 deletions Build/libHttpClient.Linux/libHttpClient_Linux.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ CONFIGURATION="Release"
BUILD_CURL=true
BUILD_SSL=true
BUILD_STATIC=false
DO_APTGET=true

while [[ $# -gt 0 ]]; do
case $1 in
Expand Down Expand Up @@ -66,6 +67,12 @@ log "BUILD CURL = ${BUILD_CURL}"
log "CMakeLists.txt = ${SCRIPT_DIR}"
log "CMake output = ${SCRIPT_DIR}/../../Int/CMake/libHttpClient.Linux"

# Verify that required submodules are present
if [ ! -f "$SCRIPT_DIR/../../External/curl/configure.ac" ] || [ ! -f "$SCRIPT_DIR/../../External/openssl/Configure" ]; then
echo "Required submodules are missing. Please run 'git submodule update --init --recursive'."
exit 1
fi

# make libcrypto and libssl
if [ "$BUILD_SSL" = true ]; then
log "Building SSL"
Expand Down
10 changes: 8 additions & 2 deletions Build/libHttpClient.Linux/openssl_Linux.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ while [[ $# -gt 0 ]]; do
esac
done

sudo hwclock --hctosys
# Skip hwclock if not available
if command -v hwclock >/dev/null 2>&1; then
sudo hwclock --hctosys
fi
sudo rm -rf /usr/local/ssl
sudo mkdir /usr/local/ssl
sudo mkdir /usr/local/ssl/lib
Expand Down Expand Up @@ -50,6 +53,7 @@ else
fi

pushd $OPENSSL_SRC

if [ -f Makefile ] && make -n clean >/dev/null 2>&1; then
make clean
fi
Expand All @@ -64,7 +68,9 @@ else
fi

make CFLAGS="-fvisibility=hidden" CXXFLAGS="-fvisibility=hidden"
sudo make install
if make -n install >/dev/null 2>&1; then
sudo make install
fi
# copies binaries to final directory
mkdir -p "$SCRIPT_DIR"/../../Out/x64/"$CONFIGURATION"/libcrypto.Linux
cp -R "$PWD"/libcrypto.a "$SCRIPT_DIR"/../../Out/x64/"$CONFIGURATION"/libcrypto.Linux
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.PHONY: all clean
all:
@echo "Use build scripts under Build/ to compile"

clean:
rm -rf Out Int