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