blob: 3cf31a328b14a67862aa441c7c862fdc52ddfacd [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 = \
Jens Geyer79f988c2014-10-03 20:42:54 +020022 gen-cpp/ThriftTest_constants.cpp \
23 gen-cpp/ThriftTest_constants.h \
24 gen-cpp/ThriftTest_types.cpp \
25 gen-cpp/ThriftTest_types.h \
26 gen-cpp/ThriftTest_types.tcc \
27 gen-cpp/ThriftTest.cpp \
28 gen-cpp/ThriftTest.h \
29 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 = \
Jens Geyer79f988c2014-10-03 20:42:54 +020035 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
Roger Meierd3b9dca2011-06-24 14:01:10 +000041
42libstresstestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
43
44check_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020045 TestServer \
46 TestClient \
47 StressTest \
48 StressTestNonBlocking
Roger Meierd3b9dca2011-06-24 14:01:10 +000049
50# we currently do not run the testsuite, stop c++ server issue
51# TESTS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020052# $(check_PROGRAMS)
Roger Meierd3b9dca2011-06-24 14:01:10 +000053
54TestServer_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020055 src/TestServer.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000056
57TestServer_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020058 libtestgencpp.la \
59 $(top_builddir)/lib/cpp/libthrift.la \
60 $(top_builddir)/lib/cpp/libthriftz.la \
61 $(top_builddir)/lib/cpp/libthriftnb.la \
62 -levent -lboost_program_options -lboost_system -lboost_filesystem
Roger Meierd3b9dca2011-06-24 14:01:10 +000063
64TestClient_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020065 src/TestClient.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000066
67TestClient_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020068 libtestgencpp.la \
69 $(top_builddir)/lib/cpp/libthrift.la \
70 $(top_builddir)/lib/cpp/libthriftz.la \
71 $(top_builddir)/lib/cpp/libthriftnb.la \
72 -levent -lboost_program_options -lboost_system -lboost_filesystem
Roger Meierd3b9dca2011-06-24 14:01:10 +000073
74StressTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020075 src/StressTest.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000076
77StressTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020078 libstresstestgencpp.la \
79 $(top_builddir)/lib/cpp/libthrift.la
Roger Meierd3b9dca2011-06-24 14:01:10 +000080
81StressTestNonBlocking_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020082 src/StressTestNonBlocking.cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +000083
84StressTestNonBlocking_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020085 libstresstestgencpp.la \
86 $(top_builddir)/lib/cpp/libthriftnb.la \
87 -levent
Roger Meierd3b9dca2011-06-24 14:01:10 +000088#
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
Jens Geyer79f988c2014-10-03 20:42:54 +020094 $(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
Jens Geyer79f988c2014-10-03 20:42:54 +020097 $(THRIFT) --gen cpp $<
Roger Meierd3b9dca2011-06-24 14:01:10 +000098
Konrad Grochowski1ff4a972014-09-19 23:57:57 +020099AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -Igen-cpp
Roger Meierec300e32014-10-13 02:13:35 +0200100AM_CXXFLAGS = -Wall -Wextra -pedantic
Roger Meier3faaedf2011-10-02 10:51:45 +0000101AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS)
Roger Meierd3b9dca2011-06-24 14:01:10 +0000102
103clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +0200104 $(RM) -r gen-cpp
Roger Meierd3b9dca2011-06-24 14:01:10 +0000105
106EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200107 src/TestClient.cpp \
108 src/TestServer.cpp \
109 src/StressTest.cpp \
110 src/StressTestNonBlocking.cpp \
111 realloc/realloc_test.c \
112 realloc/Makefile