blob: 0157b8dc620a1bc1a5fa6df5d004da2852f8b840 [file] [log] [blame]
Roger Meier18a90d12012-10-24 18:40:06 +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#
19noinst_LTLIBRARIES = libtutorialgencpp.la
20nodist_libtutorialgencpp_la_SOURCES = \
21 gen-cpp/Calculator.cpp \
22 gen-cpp/Calculator.h \
23 gen-cpp/SharedService.cpp \
24 gen-cpp/SharedService.h \
25 gen-cpp/shared_constants.cpp \
26 gen-cpp/shared_constants.h \
27 gen-cpp/shared_types.cpp \
28 gen-cpp/shared_types.h \
29 gen-cpp/tutorial_constants.cpp \
30 gen-cpp/tutorial_constants.h \
31 gen-cpp/tutorial_types.cpp \
32 gen-cpp/tutorial_types.h
33
34
35
36libtutorialgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
37
38noinst_PROGRAMS = \
39 TutorialServer \
40 TutorialClient
41
42TutorialServer_SOURCES = \
43 CppServer.cpp
44
45TutorialServer_LDADD = \
46 libtutorialgencpp.la \
47 $(top_builddir)/lib/cpp/libthrift.la
48
49TutorialClient_SOURCES = \
50 CppClient.cpp
51
52TutorialClient_LDADD = \
53 libtutorialgencpp.la \
54 $(top_builddir)/lib/cpp/libthrift.la
55
56#
57# Common thrift code generation rules
58#
59THRIFT = $(top_builddir)/compiler/cpp/thrift
60
61gen-cpp/Calculator.cpp gen-cpp/tutorial_types.cpp gen-cpp/tutorial_constants.cpp: $(top_srcdir)/tutorial/tutorial.thrift
62 $(THRIFT) --gen cpp -r $<
63
64INCLUDES = \
65 -I$(top_srcdir)/lib/cpp/src -Igen-cpp
66
67AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
68AM_CXXFLAGS = -Wall
69AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS)
70
71clean-local:
72 $(RM) -r gen-cpp
73
74tutorialserver: all
75 ./TutorialServer
76
77tutorialclient: all
78 ./TutorialClient
79
80EXTRA_DIST = \
81 CppClient.cpp \
82 CppServer.cpp