blob: 347b17568e7185f677a4dbc327e4ba254b75a86c [file] [log] [blame]
Roger Meierd3b9dca2011-06-24 14:01:10 +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#
Roger Meierc0959192013-01-15 23:20:19 +010019.NOTPARALLEL:
Roger Meierd3b9dca2011-06-24 14:01:10 +000020noinst_LTLIBRARIES = libtestgencpp.la libstresstestgencpp.la
21nodist_libtestgencpp_la_SOURCES = \
22 gen-cpp/ThriftTest_constants.cpp \
23 gen-cpp/ThriftTest_types.cpp \
24 gen-cpp/ThriftTest_constants.h \
25 gen-cpp/ThriftTest_types.h \
26 gen-cpp/ThriftTest_types.tcc \
Roger Meier0a7c69c2014-05-02 21:15:45 +020027 gen-cpp/ThriftTest.tcc \
28 src/ThriftTest_extras.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000029
30libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
31
32nodist_libstresstestgencpp_la_SOURCES = \
33 gen-cpp/StressTest_constants.cpp \
34 gen-cpp/StressTest_types.cpp \
35 gen-cpp/StressTest_constants.h \
36 gen-cpp/StressTest_types.h \
37 gen-cpp/Service.cpp \
38 gen-cpp/Service.h
39
40libstresstestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
41
42check_PROGRAMS = \
43 TestServer \
44 TestClient \
45 StressTest \
46 StressTestNonBlocking
47
48# we currently do not run the testsuite, stop c++ server issue
49# TESTS = \
50# $(check_PROGRAMS)
51
52TestServer_SOURCES = \
53 src/TestServer.cpp
54
55TestServer_LDADD = \
56 libtestgencpp.la \
57 $(top_builddir)/lib/cpp/libthrift.la \
58 $(top_builddir)/lib/cpp/libthriftz.la \
59 $(top_builddir)/lib/cpp/libthriftnb.la \
60 -levent -lboost_program_options
61
62TestClient_SOURCES = \
63 src/TestClient.cpp
64
65TestClient_LDADD = \
66 libtestgencpp.la \
67 $(top_builddir)/lib/cpp/libthrift.la \
68 $(top_builddir)/lib/cpp/libthriftz.la \
69 $(top_builddir)/lib/cpp/libthriftnb.la \
70 -levent -lboost_program_options
71
72StressTest_SOURCES = \
73 src/StressTest.cpp
74
75StressTest_LDADD = \
76 libstresstestgencpp.la \
77 $(top_builddir)/lib/cpp/libthrift.la
78
79StressTestNonBlocking_SOURCES = \
80 src/StressTestNonBlocking.cpp
81
82StressTestNonBlocking_LDADD = \
83 libstresstestgencpp.la \
84 $(top_builddir)/lib/cpp/libthriftnb.la \
85 -levent
86#
87# Common thrift code generation rules
88#
89THRIFT = $(top_builddir)/compiler/cpp/thrift
90
91gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp: $(top_srcdir)/test/ThriftTest.thrift
Roger Meier7e056e72011-07-17 07:28:28 +000092 $(THRIFT) --gen cpp:templates,cob_style -r $<
Roger Meierd3b9dca2011-06-24 14:01:10 +000093
Roger Meierdffc9fe2014-01-15 21:10:59 +010094gen-cpp/StressTest_types.cpp gen-cpp/StressTest_constants.cpp: $(top_srcdir)/test/StressTest.thrift
Roger Meierd3b9dca2011-06-24 14:01:10 +000095 $(THRIFT) --gen cpp $<
96
97INCLUDES = \
98 -I$(top_srcdir)/lib/cpp/src -Igen-cpp
99
Roger Meier3faaedf2011-10-02 10:51:45 +0000100AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
Jake Farrellea949fb2011-12-13 20:02:33 +0000101AM_CXXFLAGS = -Wall
Roger Meier3faaedf2011-10-02 10:51:45 +0000102AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS)
Roger Meierd3b9dca2011-06-24 14:01:10 +0000103
104clean-local:
105 $(RM) -r gen-cpp
106
107EXTRA_DIST = \
108 src/TestClient.cpp \
109 src/TestServer.cpp \
110 src/StressTest.cpp \
111 src/StressTestNonBlocking.cpp \
112 realloc/realloc_test.c \
113 realloc/Makefile