blob: 3dc54180fbd4518f199d9abad702b8eb4df07665 [file] [log] [blame]
Roger Meierc2cc61a2010-11-30 19:53:29 +00001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
Jens Geyer86777192015-07-25 15:59:46 +020019AUTOMAKE_OPTIONS = subdir-objects serial-tests
Roger Meier81a1f992014-10-22 14:09:43 +020020
Roger Meier213a6642010-10-27 12:30:11 +000021SUBDIRS =
22
Nobuaki Sukegawaef0a8fa2015-05-10 20:21:17 +090023BUILT_SOURCES = \
Jens Geyer54f392b2015-08-05 21:45:10 +020024 gen-c_glib/t_test_container_test_types.c \
25 gen-c_glib/t_test_container_test_types.h \
Nobuaki Sukegawaef0a8fa2015-05-10 20:21:17 +090026 gen-c_glib/t_test_debug_proto_test_types.h \
27 gen-c_glib/t_test_empty_service.h \
28 gen-c_glib/t_test_inherited.h \
29 gen-c_glib/t_test_optional_required_test_types.h \
30 gen-c_glib/t_test_reverse_order_service.h \
31 gen-c_glib/t_test_second_service.h \
32 gen-c_glib/t_test_service_for_exception_with_a_map.h \
Jens Geyer54f392b2015-08-05 21:45:10 +020033 gen-c_glib/t_test_container_service.c \
34 gen-c_glib/t_test_container_service.h \
Nobuaki Sukegawaef0a8fa2015-05-10 20:21:17 +090035 gen-c_glib/t_test_srv.h \
36 gen-c_glib/t_test_thrift_test.h \
37 gen-c_glib/t_test_thrift_test_types.h
38
Nobuaki Sukegawa60769702016-01-23 19:25:06 +090039AM_CPPFLAGS = -I../src -I./gen-c_glib
Simon Southdb3646f2015-08-01 12:18:12 +000040AM_CFLAGS = -g -Wall -Wextra -pedantic $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) \
41 @GCOV_CFLAGS@
42AM_CXXFLAGS = $(AM_CFLAGS)
Roger Meier213a6642010-10-27 12:30:11 +000043AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) @GCOV_LDFLAGS@
44
Roger Meier213a6642010-10-27 12:30:11 +000045check_PROGRAMS = \
Nobuaki Sukegawa362a5ed2015-12-01 22:17:24 +090046 testserialization \
Roger Meier909f1862014-07-24 23:52:14 +020047 testapplicationexception \
Jens Geyer54f392b2015-08-05 21:45:10 +020048 testcontainertest \
Roger Meier213a6642010-10-27 12:30:11 +000049 testtransportsocket \
Roger Meierc1010922010-11-26 10:17:48 +000050 testbinaryprotocol \
Chandler May6dde90b2016-01-10 06:01:10 +000051 testcompactprotocol \
Roger Meier213a6642010-10-27 12:30:11 +000052 testbufferedtransport \
53 testframedtransport \
Simon Southe71f20c2016-02-11 06:52:37 -050054 testfdtransport \
Roger Meier213a6642010-10-27 12:30:11 +000055 testmemorybuffer \
56 teststruct \
57 testsimpleserver \
58 testdebugproto \
59 testoptionalrequired \
60 testthrifttest
61
62if WITH_CPP
Nobuaki Sukegawaef0a8fa2015-05-10 20:21:17 +090063 BUILT_SOURCES += gen-cpp/ThriftTest_types.cpp
Roger Meier213a6642010-10-27 12:30:11 +000064 check_PROGRAMS += testthrifttestclient
65endif
66
Nobuaki Sukegawa362a5ed2015-12-01 22:17:24 +090067testserialization_SOURCES = testserialization.c
68testserialization_LDADD = \
69 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
70 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
71 libtestgenc.la
72
Roger Meier909f1862014-07-24 23:52:14 +020073testapplicationexception_SOURCES = testapplicationexception.c
74testapplicationexception_LDADD = \
Jens Geyer86777192015-07-25 15:59:46 +020075 $(top_builddir)/lib/c_glib/src/thrift/c_glib/libthrift_c_glib_la-thrift_application_exception.o \
76 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
77 $(top_builddir)/lib/c_glib/src/thrift/c_glib/libthrift_c_glib_la-thrift_struct.o \
78 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o
Roger Meier909f1862014-07-24 23:52:14 +020079
Jens Geyer54f392b2015-08-05 21:45:10 +020080testcontainertest_SOURCES = testcontainertest.c
81testcontainertest_LDADD = \
82 $(top_builddir)/lib/c_glib/src/thrift/c_glib/libthrift_c_glib_la-thrift_struct.o \
83 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
84 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
85 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport_factory.o \
86 $(top_builddir)/lib/c_glib/src/thrift/c_glib/processor/libthrift_c_glib_la-thrift_processor.o \
87 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol_factory.o \
88 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_binary_protocol.o \
89 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_binary_protocol_factory.o \
90 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
91 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
92 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o \
93 $(top_builddir)/lib/c_glib/src/thrift/c_glib/server/libthrift_c_glib_la-thrift_server.o \
94 libtestgenc.la
95
Roger Meier213a6642010-10-27 12:30:11 +000096testtransportsocket_SOURCES = testtransportsocket.c
97testtransportsocket_LDADD = \
Jens Geyer86777192015-07-25 15:59:46 +020098 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
99 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_buffered_transport.o \
100 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
101 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o
Roger Meier213a6642010-10-27 12:30:11 +0000102
Roger Meierc1010922010-11-26 10:17:48 +0000103testbinaryprotocol_SOURCES = testbinaryprotocol.c
104testbinaryprotocol_LDADD = \
Jens Geyer86777192015-07-25 15:59:46 +0200105 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
106 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
Chandler May1ccd81b2016-02-11 08:25:25 -0500107 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_framed_transport.o \
Jens Geyer86777192015-07-25 15:59:46 +0200108 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
109 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
110 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o
Roger Meier213a6642010-10-27 12:30:11 +0000111
Chandler May6dde90b2016-01-10 06:01:10 +0000112testcompactprotocol_SOURCES = testcompactprotocol.c
113testcompactprotocol_LDADD = \
114 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
115 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
Chandler May1ccd81b2016-02-11 08:25:25 -0500116 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_framed_transport.o \
Chandler May6dde90b2016-01-10 06:01:10 +0000117 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
118 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
119 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o
120
Roger Meier213a6642010-10-27 12:30:11 +0000121testbufferedtransport_SOURCES = testbufferedtransport.c
122testbufferedtransport_LDADD = \
Jens Geyer86777192015-07-25 15:59:46 +0200123 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
124 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
125 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
126 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o
Roger Meier213a6642010-10-27 12:30:11 +0000127
128testframedtransport_SOURCES = testframedtransport.c
129testframedtransport_LDADD = \
Jens Geyer86777192015-07-25 15:59:46 +0200130 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
131 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
132 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
133 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o
Roger Meier213a6642010-10-27 12:30:11 +0000134
Simon Southe71f20c2016-02-11 06:52:37 -0500135testfdtransport_SOURCES = testfdtransport.c
136testfdtransport_LDADD = \
137 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
138 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_fd_transport.o
139
Roger Meier213a6642010-10-27 12:30:11 +0000140testmemorybuffer_SOURCES = testmemorybuffer.c
141testmemorybuffer_LDADD = \
Jens Geyer86777192015-07-25 15:59:46 +0200142 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o
Roger Meier213a6642010-10-27 12:30:11 +0000143
144teststruct_SOURCES = teststruct.c
145teststruct_LDADD = \
Jens Geyer86777192015-07-25 15:59:46 +0200146 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
147 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o
Roger Meier213a6642010-10-27 12:30:11 +0000148
149testsimpleserver_SOURCES = testsimpleserver.c
150testsimpleserver_LDADD = \
Jens Geyer86777192015-07-25 15:59:46 +0200151 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
152 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
153 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport_factory.o \
154 $(top_builddir)/lib/c_glib/src/thrift/c_glib/processor/libthrift_c_glib_la-thrift_processor.o \
155 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol_factory.o \
156 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_binary_protocol.o \
157 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_binary_protocol_factory.o \
158 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
159 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
160 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o \
161 $(top_builddir)/lib/c_glib/src/thrift/c_glib/server/libthrift_c_glib_la-thrift_server.o
Roger Meier213a6642010-10-27 12:30:11 +0000162
163testdebugproto_SOURCES = testdebugproto.c
164testdebugproto_LDADD = libtestgenc.la
165
166testoptionalrequired_SOURCES = testoptionalrequired.c
167testoptionalrequired_LDADD = \
Jens Geyer86777192015-07-25 15:59:46 +0200168 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
169 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
Roger Meier213a6642010-10-27 12:30:11 +0000170 libtestgenc.la
171
Nobuaki Sukegawa60769702016-01-23 19:25:06 +0900172testthrifttest_SOURCES = testthrifttest.c
173testthrifttest_LDADD = libtestgenc.la \
174 $(top_builddir)/test/c_glib/src/thrift_test_handler.o
Chandler May3fe3df22016-01-18 11:05:40 -0500175testthrifttest_CFLAGS = -I$(top_srcdir)/test/c_glib/src -I./gen-c_glib $(GLIB_CFLAGS)
Roger Meier213a6642010-10-27 12:30:11 +0000176
177testthrifttestclient_SOURCES = testthrifttestclient.cpp
178testthrifttestclient_CPPFLAGS = -I../../cpp/src $(BOOST_CPPFLAGS) -I./gen-cpp -I../src -I./gen-c_glib $(GLIB_CFLAGS)
179testthrifttestclient_LDADD = ../../cpp/.libs/libthrift.la ../libthrift_c_glib.la libtestgenc.la libtestgencpp.la
180testthrifttestclient_LDFLAGS = -L../.libs -L../../cpp/.libs $(GLIB_LIBS) $(GOBJECT_LIBS)
181
182check_LTLIBRARIES = libtestgenc.la
183
184if WITH_CPP
185 check_LTLIBRARIES += libtestgencpp.la
186endif
187
Bryan Duxbury39fbb9a2011-01-13 18:09:51 +0000188nodist_libtestgenc_la_SOURCES = \
Jens Geyer54f392b2015-08-05 21:45:10 +0200189 gen-c_glib/t_test_container_test_types.c \
Roger Meier213a6642010-10-27 12:30:11 +0000190 gen-c_glib/t_test_debug_proto_test_types.c \
Nobuaki Sukegawaba3fe862015-12-01 22:42:55 +0900191 gen-c_glib/t_test_enum_test_types.c \
192 gen-c_glib/t_test_enum_test_service.c \
Roger Meier213a6642010-10-27 12:30:11 +0000193 gen-c_glib/t_test_empty_service.c \
194 gen-c_glib/t_test_inherited.c \
195 gen-c_glib/t_test_optional_required_test_types.c \
196 gen-c_glib/t_test_reverse_order_service.c \
197 gen-c_glib/t_test_second_service.c \
198 gen-c_glib/t_test_service_for_exception_with_a_map.c \
199 gen-c_glib/t_test_srv.c \
Jens Geyer54f392b2015-08-05 21:45:10 +0200200 gen-c_glib/t_test_container_service.c \
Roger Meier213a6642010-10-27 12:30:11 +0000201 gen-c_glib/t_test_thrift_test.c \
202 gen-c_glib/t_test_thrift_test_types.c \
Jens Geyer54f392b2015-08-05 21:45:10 +0200203 gen-c_glib/t_test_container_test_types.h \
Roger Meier213a6642010-10-27 12:30:11 +0000204 gen-c_glib/t_test_debug_proto_test_types.h \
Nobuaki Sukegawaba3fe862015-12-01 22:42:55 +0900205 gen-c_glib/t_test_enum_test_types.h \
206 gen-c_glib/t_test_enum_test_service.h \
Roger Meier213a6642010-10-27 12:30:11 +0000207 gen-c_glib/t_test_empty_service.h \
208 gen-c_glib/t_test_inherited.h \
209 gen-c_glib/t_test_optional_required_test_types.h \
210 gen-c_glib/t_test_reverse_order_service.h \
211 gen-c_glib/t_test_second_service.h \
212 gen-c_glib/t_test_service_for_exception_with_a_map.h \
213 gen-c_glib/t_test_srv.h \
Jens Geyer54f392b2015-08-05 21:45:10 +0200214 gen-c_glib/t_test_container_service.h \
Roger Meier213a6642010-10-27 12:30:11 +0000215 gen-c_glib/t_test_thrift_test.h \
216 gen-c_glib/t_test_thrift_test_types.h
217libtestgenc_la_LIBADD = $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Jens Geyer1c190272015-07-28 23:15:18 +0200218libtestgenc_la_CPPFLAGS = $(AM_CPPFLAGS) -Wno-unused-function
Roger Meier213a6642010-10-27 12:30:11 +0000219
Bryan Duxbury39fbb9a2011-01-13 18:09:51 +0000220nodist_libtestgencpp_la_SOURCES = \
Roger Meier213a6642010-10-27 12:30:11 +0000221 gen-cpp/ThriftTest.cpp \
222 gen-cpp/ThriftTest_constants.cpp \
223 gen-cpp/ThriftTest_types.cpp \
224 gen-cpp/ThriftTest.h \
225 gen-cpp/ThriftTest_constants.h \
226 gen-cpp/ThriftTest_types.h
227libtestgencpp_la_CPPFLAGS = -I../../cpp/src $(BOOST_CPPFLAGS) -I./gen-cpp
228
229THRIFT = $(top_builddir)/compiler/cpp/thrift
230
Nobuaki Sukegawa60769702016-01-23 19:25:06 +0900231gen-c_glib/t_test_container_test_types.c gen-c_glib/t_test_container_test_types.h gen-c_glib/t_test_container_service.c gen-c_glib/t_test_container_service.h: ContainerTest.thrift $(THRIFT)
Jens Geyer54f392b2015-08-05 21:45:10 +0200232 $(THRIFT) --gen c_glib $<
233
Nobuaki Sukegawa60769702016-01-23 19:25:06 +0900234gen-c_glib/t_test_debug_proto_test_types.c gen-c_glib/t_test_debug_proto_test_types.h gen-c_glib/t_test_empty_service.c gen-c_glib/t_test_empty_service.h gen-c_glib/t_test_inherited.c gen-c_glib/t_test_inherited.h gen-c_glib/t_test_reverse_order_service.c gen-c_glib/t_test_reverse_order_service.h gen-c_glib/t_test_service_for_exception_with_a_map.c gen-c_glib/t_test_service_for_exception_with_a_map.h gen-c_glib/t_test_srv.c gen-c_glib/t_test_srv.h: ../../../test/DebugProtoTest.thrift $(THRIFT)
Jens Geyer79f988c2014-10-03 20:42:54 +0200235 $(THRIFT) --gen c_glib $<
Roger Meier213a6642010-10-27 12:30:11 +0000236
Nobuaki Sukegawa60769702016-01-23 19:25:06 +0900237gen-c_glib/t_test_enum_test_types.c gen-c_glib/t_test_enum_test_types.h gen-c_glib/t_test_enum_test_service.c gen-c_glib/t_test_enum_test_service.h : ../../../test/EnumTest.thrift $(THRIFT)
Nobuaki Sukegawaba3fe862015-12-01 22:42:55 +0900238 $(THRIFT) --gen c_glib $<
239
Nobuaki Sukegawa60769702016-01-23 19:25:06 +0900240gen-c_glib/t_test_optional_required_test_types.c gen-c_glib/t_test_optional_required_test_types.h: ../../../test/OptionalRequiredTest.thrift $(THRIFT)
Jens Geyer79f988c2014-10-03 20:42:54 +0200241 $(THRIFT) --gen c_glib $<
Roger Meier213a6642010-10-27 12:30:11 +0000242
Nobuaki Sukegawa60769702016-01-23 19:25:06 +0900243gen-c_glib/t_test_second_service.c gen-c_glib/t_test_thrift_test.c gen-c_glib/t_test_thrift_test_types.c gen-c_glib/t_test_second_service.h gen-c_glib/t_test_thrift_test.h gen-c_glib/t_test_thrift_test_types.h: ../../../test/ThriftTest.thrift $(THRIFT)
Jens Geyer79f988c2014-10-03 20:42:54 +0200244 $(THRIFT) --gen c_glib $<
Roger Meier213a6642010-10-27 12:30:11 +0000245
Nobuaki Sukegawa60769702016-01-23 19:25:06 +0900246gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest_types.cpp: ../../../test/ThriftTest.thrift $(THRIFT)
Jens Geyer79f988c2014-10-03 20:42:54 +0200247 $(THRIFT) --gen cpp $<
Roger Meier213a6642010-10-27 12:30:11 +0000248
Roger Meier213a6642010-10-27 12:30:11 +0000249TESTS = \
Roger Meier213a6642010-10-27 12:30:11 +0000250 $(check_PROGRAMS) \
251 $(check_SCRIPTS)
252
253# globally added to all instances of valgrind calls
254# VALGRIND_OPTS = --suppressions=glib.suppress
255VALGRIND_OPTS =
256
257# globally added to all memcheck calls
258VALGRIND_MEM_OPTS = --tool=memcheck \
259 --num-callers=10 \
260 ${myextravalgrindmemopts}
261
262# globally added to all leakcheck calls
263VALGRIND_LEAK_OPTS = --tool=memcheck \
264 --num-callers=10 \
265 --leak-check=full \
266 --leak-resolution=high \
267 ${myextravalgrindleakopts}
268
269memcheck: $(check_PROGRAMS)
Jens Geyer79f988c2014-10-03 20:42:54 +0200270 @for x in $(check_PROGRAMS); \
271 do \
272 $(MAKE) memcheck-$$x; \
273 done
Roger Meier213a6642010-10-27 12:30:11 +0000274
275leakcheck: $(check_PROGRAMS)
Jens Geyer79f988c2014-10-03 20:42:54 +0200276 @for x in $(check_PROGRAMS); \
277 do \
278 $(MAKE) leakcheck-$$x; \
279 done
Roger Meier213a6642010-10-27 12:30:11 +0000280
281memcheck-%: %
Jens Geyer79f988c2014-10-03 20:42:54 +0200282 @echo "*****************************************"; \
283 echo "MEMCHECK: $<"; \
284 echo "ARGS: ${VALGRIND_OPTS} ${VALGRIND_MEM_OPTS} ${$<_VALGRIND_MEM_OPTS}"; \
285 $(LIBTOOL) --mode=execute \
286 valgrind \
287 ${VALGRIND_OPTS} \
288 ${VALGRIND_MEM_OPTS} \
289 ${$<_VALGRIND_MEM_OPTS} ./$<
Roger Meier213a6642010-10-27 12:30:11 +0000290
291leakcheck-%: %
Jens Geyer79f988c2014-10-03 20:42:54 +0200292 @echo "*****************************************"; \
293 echo "LEAKCHECK: $<"; \
294 echo "ARGS: ${VALGRIND_OPTS} ${VALGRIND_LEAK_OPTS} ${$<_VALGRIND_LEAK_OPTS}"; \
295 G_SLICE=always-malloc $(LIBTOOL) --mode=execute \
296 valgrind \
297 ${VALGRIND_OPTS} \
298 ${VALGRIND_LEAK_OPTS} \
299 ${$<_VALGRIND_LEAK_OPTS} ./$<
Roger Meier213a6642010-10-27 12:30:11 +0000300
Roger Meier213a6642010-10-27 12:30:11 +0000301clean-local:
Jens Geyer8c5fce92015-07-28 22:59:16 +0200302 $(RM) gen-c_glib/* gen-cpp/*
Roger Meier213a6642010-10-27 12:30:11 +0000303
304CLEANFILES = \
Roger Meier213a6642010-10-27 12:30:11 +0000305 *.bb \
306 *.bbg \
307 *.da \
308 *.gcno \
309 *.gcda \
Roger Meierc1010922010-11-26 10:17:48 +0000310 *.gcov
jfarrellf13e4312015-08-25 00:39:29 -0400311
312EXTRA_DIST = \
313 CMakeLists.txt \
314 ContainerTest.thrift
315