]> git.proxmox.com Git - ceph.git/blob - ceph/src/c-ares/test/Makefile.m32
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / c-ares / test / Makefile.m32
1 #############################################################
2 #
3 ## Makefile for building arestest.exe with MingW32 (GCC-3.2)
4 ## Use: make -f Makefile.m32
5 #
6 ########################################################
7 CXX = g++
8 LD = g++
9
10 # Where to find the c-ares source code; needed because the tests use library-internal headers
11 ARES_SRC_DIR = ..
12 # Where to find the built c-ares static library
13 ARES_BLD_DIR = ..
14 ARESLIB = $(ARES_BLD_DIR)/libcares.a
15 GMOCK_DIR = gmock-1.7.0
16 GTEST_DIR = $(GMOCK_DIR)/gtest
17 CPPFLAGS = -I$(ARES_SRC_DIR) -I$(GTEST_DIR)/include -I$(GMOCK_DIR)/include -DCARES_STATICLIB
18 CXXFLAGS = -Wall $(PTHREAD_CFLAGS) -std=gnu++11
19 LDFLAGS =
20 LDLIBS = -lwsock32
21
22 # Makefile.inc provides the TESTSOURCES and TESTHEADERS defines
23 include Makefile.inc
24
25 OBJS := $(patsubst %.cc,%.o,$(strip $(TESTSOURCES)))
26
27 all: arestest.exe
28
29 arestest.exe: $(OBJS) gmock-all.o gtest-all.o
30 $(LD) $(LDFLAGS) -o $@ $^ -L$(ARES_BLD_DIR) -lcares $(LDLIBS)
31
32 $(OBJS): $(TESTHEADERS)
33
34 .cc.o:
35 $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
36 gmock-all.o: $(GMOCK_DIR)/src/gmock-all.cc
37 $(CXX) -I$(GTEST_DIR) -I$(GMOCK_DIR) $(CPPFLAGS) $(CXXFLAGS) -c $<
38 gtest-all.o: $(GTEST_DIR)/src/gtest-all.cc
39 $(CXX) -I$(GTEST_DIR) -I$(GMOCK_DIR) $(CPPFLAGS) $(CXXFLAGS) -c $<
40
41 test: arestest.exe
42 ./arestest.exe
43 vtest: arestest.exe
44 ./arestest.exe -v
45
46 clean:
47 $(RM) $(OBJS) gmock-all.o gtest-all.o arestest.exe
48