@@ -70,7 +70,7 @@ ifeq ($(PLATFORM),windows)
7070else ifeq ($(PLATFORM),macos)
7171 TARGET := $(DIST_DIR ) /cloudsync.dylib
7272 LDFLAGS += -arch x86_64 -arch arm64 -framework Security -dynamiclib -undefined dynamic_lookup
73- T_LDFLAGS = -framework Security
73+ T_LDFLAGS = -framework Security -lpthread
7474 CFLAGS += -arch x86_64 -arch arm64
7575 CURL_CONFIG = --with-secure-transport CFLAGS="-arch x86_64 -arch arm64"
7676else ifeq ($(PLATFORM),android)
@@ -96,6 +96,7 @@ else ifeq ($(PLATFORM),android)
9696 CURL_CONFIG = --host $(ARCH ) -$(HOST ) -android26 --with-openssl=$(BIN ) /../sysroot/usr LIBS="-lssl -lcrypto" AR=$(BIN ) /llvm-ar AS=$(BIN ) /llvm-as CC=$(CC ) CXX=$(BIN ) /$(ARCH ) -linux-android26-clang++ LD=$(BIN ) /ld RANLIB=$(BIN ) /llvm-ranlib STRIP=$(BIN ) /llvm-strip
9797 TARGET := $(DIST_DIR ) /cloudsync.so
9898 LDFLAGS += -shared -lcrypto -lssl
99+ T_LDFLAGS = -lpthread
99100else ifeq ($(PLATFORM),ios)
100101 TARGET := $(DIST_DIR ) /cloudsync.dylib
101102 SDK := -isysroot $(shell xcrun --sdk iphoneos --show-sdk-path) -miphoneos-version-min=11.0
@@ -114,6 +115,7 @@ else # linux
114115 TARGET := $(DIST_DIR ) /cloudsync.so
115116 LDFLAGS += -shared -lssl -lcrypto
116117 CURL_CONFIG = --with-openssl
118+ T_LDFLAGS = -lpthread
117119endif
118120
119121ifneq ($(COVERAGE ) ,false)
@@ -162,8 +164,7 @@ $(BUILD_TEST)/%.o: %.c
162164# Run code coverage (--css-file $(CUSTOM_CSS))
163165test : $(TARGET ) $(TEST_TARGET )
164166 $(SQLITE3 ) " :memory:" -cmd " .bail on" " .load ./$<" " SELECT cloudsync_version();"
165- ./dist/unit
166- ./dist/main
167+ set -e; for t in $( TEST_TARGET) ; do ./$$ t; done
167168ifneq ($(COVERAGE ) ,false)
168169 mkdir -p $(COV_DIR)
169170 lcov --capture --directory . --output-file $(COV_DIR)/coverage.info $(subst src, --include src,${COV_FILES})
0 commit comments