David Reiss | ea2cba8 | 2009-03-30 21:35:00 +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 | # |
Todd Lipcon | 53ae9f3 | 2009-12-07 00:42:38 +0000 | [diff] [blame] | 19 | # |
| 20 | # Contains some contributions under the Thrift Software License. |
| 21 | # Please see doc/old-thrift-license.txt in the Thrift distribution for |
| 22 | # details. |
David Reiss | ea2cba8 | 2009-03-30 21:35:00 +0000 | [diff] [blame] | 23 | |
Nobuaki Sukegawa | 11da87e | 2016-09-10 14:02:19 +0900 | [diff] [blame] | 24 | AUTOMAKE_OPTIONS = subdir-objects |
| 25 | |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 26 | # Note on why we have src/thrift and src/thrift/plugin directories: |
Nobuaki Sukegawa | 11da87e | 2016-09-10 14:02:19 +0900 | [diff] [blame] | 27 | # Since Automake supports only one set of BUILT_SOURCES per file and does not allow |
| 28 | # SUBDIRS built before BUILT_SOURCES, we end up separate Makefile.am for each source |
| 29 | # code generation, i.e. lex-yacc and Thrift, to achieve stable parallel make. |
| 30 | |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 31 | SUBDIRS = src src/thrift/plugin . |
Nobuaki Sukegawa | 11da87e | 2016-09-10 14:02:19 +0900 | [diff] [blame] | 32 | if WITH_TESTS |
| 33 | SUBDIRS += test |
| 34 | endif |
Mark Slee | eb0d024 | 2007-01-25 07:58:55 +0000 | [diff] [blame] | 35 | |
| 36 | bin_PROGRAMS = thrift |
| 37 | |
| 38 | thrift_OBJDIR = obj |
| 39 | |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 40 | plugin_gen = src/thrift/plugin/plugin_types.h \ |
| 41 | src/thrift/plugin/plugin_types.cpp \ |
| 42 | src/thrift/plugin/plugin_constants.h \ |
| 43 | src/thrift/plugin/plugin_constants.cpp |
Nobuaki Sukegawa | 11da87e | 2016-09-10 14:02:19 +0900 | [diff] [blame] | 44 | |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 45 | compiler_core = src/thrift/common.h \ |
| 46 | src/thrift/common.cc \ |
| 47 | src/thrift/generate/t_generator.cc \ |
| 48 | src/thrift/generate/t_generator_registry.h \ |
| 49 | src/thrift/globals.h \ |
| 50 | src/thrift/platform.h \ |
| 51 | src/thrift/logging.h \ |
| 52 | src/thrift/parse/t_doc.h \ |
| 53 | src/thrift/parse/t_type.h \ |
| 54 | src/thrift/parse/t_base_type.h \ |
| 55 | src/thrift/parse/t_enum.h \ |
| 56 | src/thrift/parse/t_enum_value.h \ |
| 57 | src/thrift/parse/t_typedef.h \ |
| 58 | src/thrift/parse/t_typedef.cc \ |
| 59 | src/thrift/parse/t_container.h \ |
| 60 | src/thrift/parse/t_list.h \ |
| 61 | src/thrift/parse/t_set.h \ |
| 62 | src/thrift/parse/t_map.h \ |
| 63 | src/thrift/parse/t_struct.h \ |
| 64 | src/thrift/parse/t_field.h \ |
| 65 | src/thrift/parse/t_service.h \ |
| 66 | src/thrift/parse/t_function.h \ |
| 67 | src/thrift/parse/t_program.h \ |
| 68 | src/thrift/parse/t_scope.h \ |
| 69 | src/thrift/parse/t_const.h \ |
| 70 | src/thrift/parse/t_const_value.h \ |
| 71 | src/thrift/parse/parse.cc \ |
| 72 | src/thrift/generate/t_generator.h \ |
| 73 | src/thrift/generate/t_oop_generator.h \ |
Volodymyr Gotra | 5499329 | 2017-12-18 02:08:09 +0200 | [diff] [blame] | 74 | src/thrift/generate/t_html_generator.h |
iproctor | 9a41a0c | 2007-07-16 21:59:24 +0000 | [diff] [blame] | 75 | |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 76 | thrift_SOURCES = src/thrift/main.h \ |
| 77 | src/thrift/main.cc \ |
| 78 | src/thrift/audit/t_audit.cpp \ |
| 79 | src/thrift/audit/t_audit.h |
Nobuaki Sukegawa | 11da87e | 2016-09-10 14:02:19 +0900 | [diff] [blame] | 80 | |
Jake Farrell | dec8c54 | 2011-09-21 00:15:27 +0000 | [diff] [blame] | 81 | # Specific client generator source |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 82 | thrift_SOURCES += src/thrift/generate/t_c_glib_generator.cc \ |
| 83 | src/thrift/generate/t_cpp_generator.cc \ |
| 84 | src/thrift/generate/t_java_generator.cc \ |
| 85 | src/thrift/generate/t_json_generator.cc \ |
| 86 | src/thrift/generate/t_as3_generator.cc \ |
| 87 | src/thrift/generate/t_dart_generator.cc \ |
| 88 | src/thrift/generate/t_haxe_generator.cc \ |
| 89 | src/thrift/generate/t_csharp_generator.cc \ |
Volodymyr Gotra | b587a12 | 2016-09-14 19:18:48 -0500 | [diff] [blame] | 90 | src/thrift/generate/t_netcore_generator.cc \ |
Volodymyr Gotra | 5499329 | 2017-12-18 02:08:09 +0200 | [diff] [blame] | 91 | src/thrift/generate/t_netcore_generator.h \ |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 92 | src/thrift/generate/t_py_generator.cc \ |
| 93 | src/thrift/generate/t_rb_generator.cc \ |
| 94 | src/thrift/generate/t_perl_generator.cc \ |
| 95 | src/thrift/generate/t_php_generator.cc \ |
| 96 | src/thrift/generate/t_erl_generator.cc \ |
| 97 | src/thrift/generate/t_cocoa_generator.cc \ |
| 98 | src/thrift/generate/t_swift_generator.cc \ |
| 99 | src/thrift/generate/t_st_generator.cc \ |
| 100 | src/thrift/generate/t_ocaml_generator.cc \ |
| 101 | src/thrift/generate/t_hs_generator.cc \ |
| 102 | src/thrift/generate/t_xsd_generator.cc \ |
| 103 | src/thrift/generate/t_xml_generator.cc \ |
| 104 | src/thrift/generate/t_html_generator.cc \ |
| 105 | src/thrift/generate/t_js_generator.cc \ |
| 106 | src/thrift/generate/t_javame_generator.cc \ |
| 107 | src/thrift/generate/t_delphi_generator.cc \ |
| 108 | src/thrift/generate/t_go_generator.cc \ |
| 109 | src/thrift/generate/t_gv_generator.cc \ |
| 110 | src/thrift/generate/t_d_generator.cc \ |
Allen George | 8b96bfb | 2016-11-02 08:01:08 -0400 | [diff] [blame] | 111 | src/thrift/generate/t_lua_generator.cc \ |
Tomek Kurcz | e93a901 | 2017-09-19 09:16:43 +0200 | [diff] [blame^] | 112 | src/thrift/generate/t_rs_generator.cc \ |
| 113 | src/thrift/generate/t_cl_generator.cc |
David Reiss | 2258573 | 2008-02-27 01:55:33 +0000 | [diff] [blame] | 114 | |
Christian Lavoie | af65f1b | 2010-11-24 21:58:05 +0000 | [diff] [blame] | 115 | thrift_CPPFLAGS = -I$(srcdir)/src |
James E. King, III | 0ad20bd | 2017-09-30 15:44:16 -0700 | [diff] [blame] | 116 | thrift_CXXFLAGS = -Wall -Wextra -pedantic -Werror |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 117 | thrift_LDADD = @LEXLIB@ src/thrift/libparse.a |
Mark Slee | eb0d024 | 2007-01-25 07:58:55 +0000 | [diff] [blame] | 118 | |
Nobuaki Sukegawa | 11da87e | 2016-09-10 14:02:19 +0900 | [diff] [blame] | 119 | if !WITH_PLUGIN |
| 120 | thrift_SOURCES += $(compiler_core) |
| 121 | else |
Christian Lavoie | af65f1b | 2010-11-24 21:58:05 +0000 | [diff] [blame] | 122 | |
Nobuaki Sukegawa | 11da87e | 2016-09-10 14:02:19 +0900 | [diff] [blame] | 123 | lib_LTLIBRARIES = libthriftc.la |
| 124 | |
| 125 | thrift_CPPFLAGS += -DTHRIFT_ENABLE_PLUGIN=1 |
| 126 | thrift_LDADD += libthriftc.la |
| 127 | |
| 128 | nodist_libthriftc_la_SOURCES = $(plugin_gen) |
| 129 | libthriftc_la_SOURCES = $(compiler_core) \ |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 130 | src/thrift/plugin/type_util.h \ |
| 131 | src/thrift/plugin/plugin.h \ |
| 132 | src/thrift/plugin/plugin.cc \ |
| 133 | src/thrift/plugin/plugin_output.h \ |
| 134 | src/thrift/plugin/plugin_output.cc \ |
| 135 | src/thrift/plugin/plugin.thrift \ |
| 136 | src/thrift/logging.cc |
Nobuaki Sukegawa | 11da87e | 2016-09-10 14:02:19 +0900 | [diff] [blame] | 137 | |
| 138 | |
| 139 | libthriftc_la_CPPFLAGS = -I$(srcdir)/src -Isrc -I$(top_builddir)/lib/cpp/src -DTHRIFT_ENABLE_PLUGIN=1 |
| 140 | libthriftc_la_CXXFLAGS = -Wall -Wextra -pedantic |
| 141 | libthriftc_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 142 | |
| 143 | include_thriftdir = $(includedir)/thrift |
| 144 | include_thrift_HEADERS = src/thrift/common.h \ |
| 145 | src/thrift/globals.h \ |
| 146 | src/thrift/logging.h \ |
| 147 | src/thrift/main.h \ |
| 148 | src/thrift/platform.h \ |
| 149 | src/thrift/version.h |
| 150 | |
| 151 | include_auditdir = $(include_thriftdir)/windows |
| 152 | include_audit_HEADERS = src/thrift/audit/t_audit.h |
| 153 | |
| 154 | include_generatedir = $(include_thriftdir)/generate |
| 155 | include_generate_HEADERS = src/thrift/generate/t_generator.h \ |
| 156 | src/thrift/generate/t_generator_registry.h \ |
| 157 | src/thrift/generate/t_oop_generator.h \ |
Volodymyr Gotra | 5499329 | 2017-12-18 02:08:09 +0200 | [diff] [blame] | 158 | src/thrift/generate/t_html_generator.h |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 159 | |
| 160 | include_parsedir = $(include_thriftdir)/parse |
| 161 | include_parse_HEADERS = src/thrift/parse/t_service.h \ |
| 162 | src/thrift/parse/t_program.h \ |
| 163 | src/thrift/parse/t_field.h \ |
| 164 | src/thrift/parse/t_scope.h \ |
| 165 | src/thrift/parse/t_typedef.h \ |
| 166 | src/thrift/parse/t_set.h \ |
| 167 | src/thrift/parse/t_const_value.h \ |
| 168 | src/thrift/parse/t_enum_value.h \ |
| 169 | src/thrift/parse/t_const.h \ |
| 170 | src/thrift/parse/t_list.h \ |
| 171 | src/thrift/parse/t_map.h \ |
| 172 | src/thrift/parse/t_container.h \ |
| 173 | src/thrift/parse/t_base_type.h \ |
| 174 | src/thrift/parse/t_enum.h \ |
| 175 | src/thrift/parse/t_function.h \ |
| 176 | src/thrift/parse/t_type.h \ |
| 177 | src/thrift/parse/t_doc.h \ |
| 178 | src/thrift/parse/t_struct.h |
| 179 | |
| 180 | include_plugindir = $(include_thriftdir)/plugin |
| 181 | include_plugin_HEADERS = src/thrift/plugin/plugin.h \ |
| 182 | src/thrift/plugin/type_util.h \ |
| 183 | src/thrift/plugin/plugin_output.h |
| 184 | |
| 185 | include_windowsdir = $(include_thriftdir)/windows |
Nobuaki Sukegawa | d8c6a84 | 2016-10-02 14:21:55 +0900 | [diff] [blame] | 186 | include_windows_HEADERS = src/thrift/windows/config.h |
Nobuaki Sukegawa | 11da87e | 2016-09-10 14:02:19 +0900 | [diff] [blame] | 187 | endif |
Mark Slee | eb0d024 | 2007-01-25 07:58:55 +0000 | [diff] [blame] | 188 | |
Jake Farrell | e0c5316 | 2011-11-16 12:58:36 +0000 | [diff] [blame] | 189 | WINDOWS_DIST = \ |
| 190 | compiler.sln \ |
| 191 | compiler.vcxproj \ |
Roger Meier | db372ac | 2014-06-16 07:32:12 +0200 | [diff] [blame] | 192 | compiler.vcxproj.filters |
Jake Farrell | e0c5316 | 2011-11-16 12:58:36 +0000 | [diff] [blame] | 193 | |
| 194 | EXTRA_DIST = \ |
jfarrell | f13e431 | 2015-08-25 00:39:29 -0400 | [diff] [blame] | 195 | coding_standards.md \ |
Roger Meier | db372ac | 2014-06-16 07:32:12 +0200 | [diff] [blame] | 196 | README.md \ |
jfarrell | 8fd8c63 | 2014-07-10 09:14:51 -0400 | [diff] [blame] | 197 | CMakeLists.txt \ |
Nobuaki Sukegawa | 59cb666 | 2016-10-19 12:02:39 +0900 | [diff] [blame] | 198 | test \ |
Jake Farrell | e0c5316 | 2011-11-16 12:58:36 +0000 | [diff] [blame] | 199 | $(WINDOWS_DIST) |
David Reiss | b72d19f | 2007-09-18 19:46:00 +0000 | [diff] [blame] | 200 | |
Mark Slee | eb0d024 | 2007-01-25 07:58:55 +0000 | [diff] [blame] | 201 | clean-local: |
Nobuaki Sukegawa | d8c6a84 | 2016-10-02 14:21:55 +0900 | [diff] [blame] | 202 | $(RM) version.h $(plugin_gen) |
David Reiss | dd08f6d | 2008-06-30 20:24:24 +0000 | [diff] [blame] | 203 | |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 204 | src/thrift/main.cc: src/thrift/version.h |
Konrad Grochowski | 16a23a6 | 2014-11-13 15:33:38 +0100 | [diff] [blame] | 205 | |
| 206 | style-local: |
dtmuller | 052abc3 | 2016-07-26 11:58:28 +0200 | [diff] [blame] | 207 | $(CPPSTYLE_CMD) |