Roger Meier | 18a90d1 | 2012-10-24 18:40:06 +0000 | [diff] [blame^] | 1 | # |
| 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 | # |
| 19 | noinst_LTLIBRARIES = libtutorialgencpp.la |
| 20 | nodist_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 | |
| 36 | libtutorialgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la |
| 37 | |
| 38 | noinst_PROGRAMS = \ |
| 39 | TutorialServer \ |
| 40 | TutorialClient |
| 41 | |
| 42 | TutorialServer_SOURCES = \ |
| 43 | CppServer.cpp |
| 44 | |
| 45 | TutorialServer_LDADD = \ |
| 46 | libtutorialgencpp.la \ |
| 47 | $(top_builddir)/lib/cpp/libthrift.la |
| 48 | |
| 49 | TutorialClient_SOURCES = \ |
| 50 | CppClient.cpp |
| 51 | |
| 52 | TutorialClient_LDADD = \ |
| 53 | libtutorialgencpp.la \ |
| 54 | $(top_builddir)/lib/cpp/libthrift.la |
| 55 | |
| 56 | # |
| 57 | # Common thrift code generation rules |
| 58 | # |
| 59 | THRIFT = $(top_builddir)/compiler/cpp/thrift |
| 60 | |
| 61 | gen-cpp/Calculator.cpp gen-cpp/tutorial_types.cpp gen-cpp/tutorial_constants.cpp: $(top_srcdir)/tutorial/tutorial.thrift |
| 62 | $(THRIFT) --gen cpp -r $< |
| 63 | |
| 64 | INCLUDES = \ |
| 65 | -I$(top_srcdir)/lib/cpp/src -Igen-cpp |
| 66 | |
| 67 | AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) |
| 68 | AM_CXXFLAGS = -Wall |
| 69 | AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS) |
| 70 | |
| 71 | clean-local: |
| 72 | $(RM) -r gen-cpp |
| 73 | |
| 74 | tutorialserver: all |
| 75 | ./TutorialServer |
| 76 | |
| 77 | tutorialclient: all |
| 78 | ./TutorialClient |
| 79 | |
| 80 | EXTRA_DIST = \ |
| 81 | CppClient.cpp \ |
| 82 | CppServer.cpp |