From 02d4519032f01475040779fbd30d81b08994b067 Mon Sep 17 00:00:00 2001 From: Tal Regev Date: Sat, 30 Apr 2022 22:00:46 +0300 Subject: [PATCH] Fix condor app for ubuntu 22.04 --- mingw/ci_make_apps.sh | 2 +- samples/condor/Makefile | 28 +++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/mingw/ci_make_apps.sh b/mingw/ci_make_apps.sh index a5f0e0f4fa..0ea80bbf50 100755 --- a/mingw/ci_make_apps.sh +++ b/mingw/ci_make_apps.sh @@ -14,7 +14,7 @@ export CXX="x86_64-w64-mingw32-g++" export CC="x86_64-w64-mingw32-gcc" # condor export MINGW_FLAGS="-Dflockfile=_lock_file -Dfunlockfile=_unlock_file" -export MINGW_CURL="-lcurl -lwinmm -lws2_32 -lpthread -lssl -lcrypto -lcrypt32 -lws2_32 -lzlib -ladvapi32 -lcrypt32" +export CURL_EXTRA_LDFLAGS="-lcurl -lwinmm -lpthread -lssl -lcrypto -lws2_32 -lzlib -ladvapi32 -lcrypt32" # wrapper export MINGW_WRAPPER_FLAGS="-DEINSTEINATHOME_CROSS_BUILD -DMINGW_WIN32 -DHAVE_STRCASECMP -D_WINDOWS -D_WIN32 -DWIN32 -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_MT -DBOINC -DNODB -D_CONSOLE -fexceptions" export MINGW_ZIP_FIX="../../zip/zip/__p___mb_cur_max.c" diff --git a/samples/condor/Makefile b/samples/condor/Makefile index 38f0e75de0..5452add04a 100644 --- a/samples/condor/Makefile +++ b/samples/condor/Makefile @@ -17,6 +17,28 @@ else MAKEFILE_LDFLAGS = -lpthread endif +CXXFLAGS += \ + -I$(BOINC_DIR) \ + -I$(BOINC_SOURCE_API_DIR) \ + -I$(BOINC_SOURCE_LIB_DIR) \ + -I$(BOINC_SOURCE_ZIP_DIR) \ + -I$(FREETYPE_DIR) \ + -L$(BOINC_API_DIR) \ + -L$(BOINC_LIB_DIR) \ + -L$(BOINC_ZIP_DIR) + + +ifdef BUILD_WITH_VCPKG + BUILD_DIR = $(BOINC_DIR)/3rdParty/linux + VCPKG_DIR ?= $(BUILD_DIR)/vcpkg/installed/x64-linux + + CXXFLAGS += \ + -I$(VCPKG_DIR)/include \ + -L$(VCPKG_DIR)/lib + + CURL_EXTRA_LDFLAGS ?= -lz -ldl +endif + PROGS = boinc_gahp all: $(PROGS) @@ -29,6 +51,6 @@ distclean: clean distclean-recursive: clean boinc_gahp: boinc_gahp.cpp $(BOINC_SOURCE_LIB_DIR)/remote_submit.h $(BOINC_SOURCE_LIB_DIR)/remote_submit.cpp $(BOINC_DIR)/svn_version.h $(BOINC_DIR)/version.h - $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MINGW_FLAGS) -g -O2 -I$(BOINC_DIR) -I$(BOINC_SOURCE_LIB_DIR) \ - -I$(VCPKG_DIR)/include -o boinc_gahp boinc_gahp.cpp $(BOINC_SOURCE_LIB_DIR)/remote_submit.cpp \ - -L$(BOINC_LIB_DIR) -L$(VCPKG_DIR)/lib -lcurl $(MINGW_CURL) -lssl -lcrypto -lboinc $(MAKEFILE_LDFLAGS) $(STDCPPTC) + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(MINGW_FLAGS) -g -O2 \ + -o boinc_gahp boinc_gahp.cpp $(BOINC_SOURCE_LIB_DIR)/remote_submit.cpp \ + -lcurl -lssl -lcrypto -lboinc $(CURL_EXTRA_LDFLAGS) $(MAKEFILE_LDFLAGS) $(STDCPPTC)