blob: bcc765446a01116449f17fe7167b093a64ba755b [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#
Roger Meierc0959192013-01-15 23:20:19 +010019.NOTPARALLEL:
Roger Meier18a90d12012-10-24 18:40:06 +000020noinst_LTLIBRARIES = libtutorialgencpp.la
21nodist_libtutorialgencpp_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020022 gen-cpp/Calculator.cpp \
23 gen-cpp/Calculator.h \
24 gen-cpp/SharedService.cpp \
25 gen-cpp/SharedService.h \
26 gen-cpp/shared_constants.cpp \
27 gen-cpp/shared_constants.h \
28 gen-cpp/shared_types.cpp \
29 gen-cpp/shared_types.h \
30 gen-cpp/tutorial_constants.cpp \
31 gen-cpp/tutorial_constants.h \
32 gen-cpp/tutorial_types.cpp \
33 gen-cpp/tutorial_types.h
Roger Meier18a90d12012-10-24 18:40:06 +000034
35
36
37libtutorialgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
38
39noinst_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020040 TutorialServer \
41 TutorialClient
Roger Meier18a90d12012-10-24 18:40:06 +000042
43TutorialServer_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020044 CppServer.cpp
Roger Meier18a90d12012-10-24 18:40:06 +000045
46TutorialServer_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020047 libtutorialgencpp.la \
48 $(top_builddir)/lib/cpp/libthrift.la
Roger Meier18a90d12012-10-24 18:40:06 +000049
50TutorialClient_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020051 CppClient.cpp
Roger Meier18a90d12012-10-24 18:40:06 +000052
53TutorialClient_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020054 libtutorialgencpp.la \
55 $(top_builddir)/lib/cpp/libthrift.la
Roger Meier18a90d12012-10-24 18:40:06 +000056
57#
58# Common thrift code generation rules
59#
60THRIFT = $(top_builddir)/compiler/cpp/thrift
61
62gen-cpp/Calculator.cpp gen-cpp/tutorial_types.cpp gen-cpp/tutorial_constants.cpp: $(top_srcdir)/tutorial/tutorial.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +020063 $(THRIFT) --gen cpp -r $<
Roger Meier18a90d12012-10-24 18:40:06 +000064
Konrad Grochowski1ff4a972014-09-19 23:57:57 +020065AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -Igen-cpp
Roger Meierec300e32014-10-13 02:13:35 +020066AM_CXXFLAGS = -Wall -Wextra -pedantic
Roger Meier18a90d12012-10-24 18:40:06 +000067AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS)
68
69clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +020070 $(RM) -r gen-cpp
Roger Meier18a90d12012-10-24 18:40:06 +000071
72tutorialserver: all
Jens Geyer79f988c2014-10-03 20:42:54 +020073 ./TutorialServer
Roger Meier18a90d12012-10-24 18:40:06 +000074
75tutorialclient: all
Jens Geyer79f988c2014-10-03 20:42:54 +020076 ./TutorialClient
Roger Meier18a90d12012-10-24 18:40:06 +000077
78EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +020079 CppClient.cpp \
80 CppServer.cpp