summaryrefslogtreecommitdiffstats
path: root/src/c-ares/test/Makefile.m32
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 18:24:20 +0000
commit483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch)
treee5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/c-ares/test/Makefile.m32
parentInitial commit. (diff)
downloadceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz
ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/c-ares/test/Makefile.m32')
-rw-r--r--src/c-ares/test/Makefile.m3248
1 files changed, 48 insertions, 0 deletions
diff --git a/src/c-ares/test/Makefile.m32 b/src/c-ares/test/Makefile.m32
new file mode 100644
index 00000000..4c97674c
--- /dev/null
+++ b/src/c-ares/test/Makefile.m32
@@ -0,0 +1,48 @@
+#############################################################
+#
+## Makefile for building arestest.exe with MingW32 (GCC-3.2)
+## Use: make -f Makefile.m32
+#
+########################################################
+CXX = g++
+LD = g++
+
+# Where to find the c-ares source code; needed because the tests use library-internal headers
+ARES_SRC_DIR = ..
+# Where to find the built c-ares static library
+ARES_BLD_DIR = ..
+ARESLIB = $(ARES_BLD_DIR)/libcares.a
+GMOCK_DIR = gmock-1.7.0
+GTEST_DIR = $(GMOCK_DIR)/gtest
+CPPFLAGS = -I$(ARES_SRC_DIR) -I$(GTEST_DIR)/include -I$(GMOCK_DIR)/include -DCARES_STATICLIB
+CXXFLAGS = -Wall $(PTHREAD_CFLAGS) -std=gnu++11
+LDFLAGS =
+LDLIBS = -lwsock32
+
+# Makefile.inc provides the TESTSOURCES and TESTHEADERS defines
+include Makefile.inc
+
+OBJS := $(patsubst %.cc,%.o,$(strip $(TESTSOURCES)))
+
+all: arestest.exe
+
+arestest.exe: $(OBJS) gmock-all.o gtest-all.o
+ $(LD) $(LDFLAGS) -o $@ $^ -L$(ARES_BLD_DIR) -lcares $(LDLIBS)
+
+$(OBJS): $(TESTHEADERS)
+
+.cc.o:
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
+gmock-all.o: $(GMOCK_DIR)/src/gmock-all.cc
+ $(CXX) -I$(GTEST_DIR) -I$(GMOCK_DIR) $(CPPFLAGS) $(CXXFLAGS) -c $<
+gtest-all.o: $(GTEST_DIR)/src/gtest-all.cc
+ $(CXX) -I$(GTEST_DIR) -I$(GMOCK_DIR) $(CPPFLAGS) $(CXXFLAGS) -c $<
+
+test: arestest.exe
+ ./arestest.exe
+vtest: arestest.exe
+ ./arestest.exe -v
+
+clean:
+ $(RM) $(OBJS) gmock-all.o gtest-all.o arestest.exe
+