blob: 5e965964996db4a9174fbd8f94c8673c65935c1d [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 \
Roger Meierd3b9dca2011-06-24 14:01:10 +000023 gen-cpp/ThriftTest_constants.h \
Roger Meier63fcb7e2014-06-15 21:48:59 +020024 gen-cpp/ThriftTest_types.cpp \
Roger Meierd3b9dca2011-06-24 14:01:10 +000025 gen-cpp/ThriftTest_types.h \
26 gen-cpp/ThriftTest_types.tcc \
Roger Meier63fcb7e2014-06-15 21:48:59 +020027 gen-cpp/ThriftTest.cpp \
28 gen-cpp/ThriftTest.h \
Roger Meier0a7c69c2014-05-02 21:15:45 +020029 gen-cpp/ThriftTest.tcc \
30 src/ThriftTest_extras.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000031
32libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
33
34nodist_libstresstestgencpp_la_SOURCES = \
35 gen-cpp/StressTest_constants.cpp \
36 gen-cpp/StressTest_types.cpp \
37 gen-cpp/StressTest_constants.h \
38 gen-cpp/StressTest_types.h \
39 gen-cpp/Service.cpp \
40 gen-cpp/Service.h
41
42libstresstestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
43
44check_PROGRAMS = \
45 TestServer \
46 TestClient \
47 StressTest \
48 StressTestNonBlocking
49
50# we currently do not run the testsuite, stop c++ server issue
51# TESTS = \
52# $(check_PROGRAMS)
53
54TestServer_SOURCES = \
55 src/TestServer.cpp
56
57TestServer_LDADD = \
58 libtestgencpp.la \
59 $(top_builddir)/lib/cpp/libthrift.la \
60 $(top_builddir)/lib/cpp/libthriftz.la \
61 $(top_builddir)/lib/cpp/libthriftnb.la \
cdwijayarathnaa07ec0b2014-08-09 17:45:56 +053062 -levent -lboost_program_options -lboost_system -lboost_filesystem
Roger Meierd3b9dca2011-06-24 14:01:10 +000063
64TestClient_SOURCES = \
65 src/TestClient.cpp
66
67TestClient_LDADD = \
68 libtestgencpp.la \
69 $(top_builddir)/lib/cpp/libthrift.la \
70 $(top_builddir)/lib/cpp/libthriftz.la \
71 $(top_builddir)/lib/cpp/libthriftnb.la \
cdwijayarathnaa07ec0b2014-08-09 17:45:56 +053072 -levent -lboost_program_options -lboost_system -lboost_filesystem
Roger Meierd3b9dca2011-06-24 14:01:10 +000073
74StressTest_SOURCES = \
75 src/StressTest.cpp
76
77StressTest_LDADD = \
78 libstresstestgencpp.la \
79 $(top_builddir)/lib/cpp/libthrift.la
80
81StressTestNonBlocking_SOURCES = \
82 src/StressTestNonBlocking.cpp
83
84StressTestNonBlocking_LDADD = \
85 libstresstestgencpp.la \
86 $(top_builddir)/lib/cpp/libthriftnb.la \
87 -levent
88#
89# Common thrift code generation rules
90#
91THRIFT = $(top_builddir)/compiler/cpp/thrift
92
93gen-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 +000094 $(THRIFT) --gen cpp:templates,cob_style -r $<
Roger Meierd3b9dca2011-06-24 14:01:10 +000095
Roger Meierdffc9fe2014-01-15 21:10:59 +010096gen-cpp/StressTest_types.cpp gen-cpp/StressTest_constants.cpp: $(top_srcdir)/test/StressTest.thrift
Roger Meierd3b9dca2011-06-24 14:01:10 +000097 $(THRIFT) --gen cpp $<
98
99INCLUDES = \
100 -I$(top_srcdir)/lib/cpp/src -Igen-cpp
101
Roger Meier3faaedf2011-10-02 10:51:45 +0000102AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
Jake Farrellea949fb2011-12-13 20:02:33 +0000103AM_CXXFLAGS = -Wall
Roger Meier3faaedf2011-10-02 10:51:45 +0000104AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS)
Roger Meierd3b9dca2011-06-24 14:01:10 +0000105
106clean-local:
107 $(RM) -r gen-cpp
108
109EXTRA_DIST = \
110 src/TestClient.cpp \
111 src/TestServer.cpp \
112 src/StressTest.cpp \
113 src/StressTestNonBlocking.cpp \
114 realloc/realloc_test.c \
115 realloc/Makefile