summaryrefslogtreecommitdiff
path: root/www/cpp-httplib/files/patch-test_Makefile
blob: f3e7d7b3699c026a03524f4f240de001bb8b3b3a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--- test/Makefile.orig	2025-07-16 21:59:52 UTC
+++ test/Makefile
@@ -27,9 +27,6 @@ ifneq ($(OS), Windows_NT)
 	ifeq ($(UNAME_S), Darwin)
 		LIBS += -framework CoreFoundation -framework CFNetwork
 	endif
-	ifneq ($(UNAME_S), Darwin)
-		LIBS += -lanl
-	endif
 endif
 
 TEST_ARGS = gtest/src/gtest-all.cc gtest/src/gtest_main.cc -Igtest -Igtest/include $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT) $(BROTLI_SUPPORT) $(ZSTD_SUPPORT) $(LIBS)
@@ -70,13 +67,13 @@ test : test.cc include_httplib.cc ../httplib.h Makefil
 	exit $$exit_code
 
 test : test.cc include_httplib.cc ../httplib.h Makefile cert.pem
-	$(CXX) -o $@ -I.. $(CXXFLAGS) test.cc include_httplib.cc $(TEST_ARGS)
+	$(CXX) -o $@ -I.. $(CXXFLAGS) test.cc include_httplib.cc ${LDFLAGS} $(TEST_ARGS)
 	@file $@
 
 # Note: The intention of test_split is to verify that it works to compile and
 # link the split httplib.h, so there is normally no need to execute it.
 test_split : test.cc ../httplib.h httplib.cc Makefile cert.pem
-	$(CXX) -o $@ $(CXXFLAGS) test.cc httplib.cc $(TEST_ARGS)
+	$(CXX) -o $@ $(CXXFLAGS) test.cc httplib.cc ${LDFLAGS} $(TEST_ARGS)
 
 check_abi:
 	@./check-shared-library-abi-compatibility.sh
@@ -104,7 +101,7 @@ test_proxy : test_proxy.cc ../httplib.h Makefile cert.
 	fi
 
 test_proxy : test_proxy.cc ../httplib.h Makefile cert.pem
-	$(CXX) -o $@ -I.. $(CXXFLAGS) test_proxy.cc $(TEST_ARGS)
+	$(CXX) -o $@ -I.. $(CXXFLAGS) test_proxy.cc ${LDFLAGS} $(TEST_ARGS)
 
 # Runs server_fuzzer.cc based on value of $(LIB_FUZZING_ENGINE).
 # Usage: make fuzz_test LIB_FUZZING_ENGINE=/path/to/libFuzzer
@@ -113,7 +110,7 @@ server_fuzzer : fuzzing/server_fuzzer.cc ../httplib.h 
 
 # Fuzz target, so that you can choose which $(LIB_FUZZING_ENGINE) to use.
 server_fuzzer : fuzzing/server_fuzzer.cc ../httplib.h standalone_fuzz_target_runner.o
-	$(CXX) -o $@ -I.. $(CXXFLAGS) $< $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT) $(BROTLI_SUPPORT) $(LIB_FUZZING_ENGINE) $(ZSTD_SUPPORT) $(LIBS)
+	$(CXX) -o $@ -I.. $(CXXFLAGS) $< $(OPENSSL_SUPPORT) $(ZLIB_SUPPORT) $(BROTLI_SUPPORT) $(LIB_FUZZING_ENGINE) $(ZSTD_SUPPORT) $(LIBS) -pthread
 	@file $@
 
 # Standalone fuzz runner, which just reads inputs from fuzzing/corpus/ dir and