blob: 5d424b4e012aa6ae35c325cf6c3b9654634b92ec [file] [log] [blame]
David Reissea2cba82009-03-30 21:35:00 +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#
Todd Lipcon53ae9f32009-12-07 00:42:38 +000019#
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 Reissea2cba82009-03-30 21:35:00 +000023
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +090024AUTOMAKE_OPTIONS = subdir-objects
25
dtmuller052abc32016-07-26 11:58:28 +020026# Note on why we have src/thrift and src/thrift/plugin directories:
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +090027# 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
dtmuller052abc32016-07-26 11:58:28 +020031SUBDIRS = src src/thrift/plugin .
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +090032if WITH_TESTS
33SUBDIRS += test
34endif
Mark Sleeeb0d0242007-01-25 07:58:55 +000035
36bin_PROGRAMS = thrift
37
38thrift_OBJDIR = obj
39
dtmuller052abc32016-07-26 11:58:28 +020040plugin_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 Sukegawa11da87e2016-09-10 14:02:19 +090044
dtmuller052abc32016-07-26 11:58:28 +020045compiler_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 \
Nobuaki Sukegawad8c6a842016-10-02 14:21:55 +090074 src/thrift/generate/t_html_generator.h
iproctor9a41a0c2007-07-16 21:59:24 +000075
dtmuller052abc32016-07-26 11:58:28 +020076thrift_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 Sukegawa11da87e2016-09-10 14:02:19 +090080
Jake Farrelldec8c542011-09-21 00:15:27 +000081# Specific client generator source
dtmuller052abc32016-07-26 11:58:28 +020082thrift_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 Gotrab587a122016-09-14 19:18:48 -050090 src/thrift/generate/t_netcore_generator.cc \
dtmuller052abc32016-07-26 11:58:28 +020091 src/thrift/generate/t_py_generator.cc \
92 src/thrift/generate/t_rb_generator.cc \
93 src/thrift/generate/t_perl_generator.cc \
94 src/thrift/generate/t_php_generator.cc \
95 src/thrift/generate/t_erl_generator.cc \
96 src/thrift/generate/t_cocoa_generator.cc \
97 src/thrift/generate/t_swift_generator.cc \
98 src/thrift/generate/t_st_generator.cc \
99 src/thrift/generate/t_ocaml_generator.cc \
100 src/thrift/generate/t_hs_generator.cc \
101 src/thrift/generate/t_xsd_generator.cc \
102 src/thrift/generate/t_xml_generator.cc \
103 src/thrift/generate/t_html_generator.cc \
104 src/thrift/generate/t_js_generator.cc \
105 src/thrift/generate/t_javame_generator.cc \
106 src/thrift/generate/t_delphi_generator.cc \
107 src/thrift/generate/t_go_generator.cc \
108 src/thrift/generate/t_gv_generator.cc \
109 src/thrift/generate/t_d_generator.cc \
110 src/thrift/generate/t_lua_generator.cc
David Reiss22585732008-02-27 01:55:33 +0000111
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000112thrift_CPPFLAGS = -I$(srcdir)/src
Roger Meierec300e32014-10-13 02:13:35 +0200113thrift_CXXFLAGS = -Wall -Wextra -pedantic
dtmuller052abc32016-07-26 11:58:28 +0200114thrift_LDADD = @LEXLIB@ src/thrift/libparse.a
Mark Sleeeb0d0242007-01-25 07:58:55 +0000115
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +0900116if !WITH_PLUGIN
117thrift_SOURCES += $(compiler_core)
118else
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000119
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +0900120lib_LTLIBRARIES = libthriftc.la
121
122thrift_CPPFLAGS += -DTHRIFT_ENABLE_PLUGIN=1
123thrift_LDADD += libthriftc.la
124
125nodist_libthriftc_la_SOURCES = $(plugin_gen)
126libthriftc_la_SOURCES = $(compiler_core) \
dtmuller052abc32016-07-26 11:58:28 +0200127 src/thrift/plugin/type_util.h \
128 src/thrift/plugin/plugin.h \
129 src/thrift/plugin/plugin.cc \
130 src/thrift/plugin/plugin_output.h \
131 src/thrift/plugin/plugin_output.cc \
132 src/thrift/plugin/plugin.thrift \
133 src/thrift/logging.cc
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +0900134
135
136libthriftc_la_CPPFLAGS = -I$(srcdir)/src -Isrc -I$(top_builddir)/lib/cpp/src -DTHRIFT_ENABLE_PLUGIN=1
137libthriftc_la_CXXFLAGS = -Wall -Wextra -pedantic
138libthriftc_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
dtmuller052abc32016-07-26 11:58:28 +0200139
140include_thriftdir = $(includedir)/thrift
141include_thrift_HEADERS = src/thrift/common.h \
142 src/thrift/globals.h \
143 src/thrift/logging.h \
144 src/thrift/main.h \
145 src/thrift/platform.h \
146 src/thrift/version.h
147
148include_auditdir = $(include_thriftdir)/windows
149include_audit_HEADERS = src/thrift/audit/t_audit.h
150
151include_generatedir = $(include_thriftdir)/generate
152include_generate_HEADERS = src/thrift/generate/t_generator.h \
153 src/thrift/generate/t_generator_registry.h \
154 src/thrift/generate/t_oop_generator.h \
155 src/thrift/generate/t_html_generator.h
156
157include_parsedir = $(include_thriftdir)/parse
158include_parse_HEADERS = src/thrift/parse/t_service.h \
159 src/thrift/parse/t_program.h \
160 src/thrift/parse/t_field.h \
161 src/thrift/parse/t_scope.h \
162 src/thrift/parse/t_typedef.h \
163 src/thrift/parse/t_set.h \
164 src/thrift/parse/t_const_value.h \
165 src/thrift/parse/t_enum_value.h \
166 src/thrift/parse/t_const.h \
167 src/thrift/parse/t_list.h \
168 src/thrift/parse/t_map.h \
169 src/thrift/parse/t_container.h \
170 src/thrift/parse/t_base_type.h \
171 src/thrift/parse/t_enum.h \
172 src/thrift/parse/t_function.h \
173 src/thrift/parse/t_type.h \
174 src/thrift/parse/t_doc.h \
175 src/thrift/parse/t_struct.h
176
177include_plugindir = $(include_thriftdir)/plugin
178include_plugin_HEADERS = src/thrift/plugin/plugin.h \
179 src/thrift/plugin/type_util.h \
180 src/thrift/plugin/plugin_output.h
181
182include_windowsdir = $(include_thriftdir)/windows
Nobuaki Sukegawad8c6a842016-10-02 14:21:55 +0900183include_windows_HEADERS = src/thrift/windows/config.h
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +0900184endif
Mark Sleeeb0d0242007-01-25 07:58:55 +0000185
Jake Farrelle0c53162011-11-16 12:58:36 +0000186WINDOWS_DIST = \
187 compiler.sln \
188 compiler.vcxproj \
Roger Meierdb372ac2014-06-16 07:32:12 +0200189 compiler.vcxproj.filters
Jake Farrelle0c53162011-11-16 12:58:36 +0000190
191EXTRA_DIST = \
jfarrellf13e4312015-08-25 00:39:29 -0400192 coding_standards.md \
Roger Meierdb372ac2014-06-16 07:32:12 +0200193 README.md \
jfarrell8fd8c632014-07-10 09:14:51 -0400194 CMakeLists.txt \
Nobuaki Sukegawa59cb6662016-10-19 12:02:39 +0900195 test \
Jake Farrelle0c53162011-11-16 12:58:36 +0000196 $(WINDOWS_DIST)
David Reissb72d19f2007-09-18 19:46:00 +0000197
Mark Sleeeb0d0242007-01-25 07:58:55 +0000198clean-local:
Nobuaki Sukegawad8c6a842016-10-02 14:21:55 +0900199 $(RM) version.h $(plugin_gen)
David Reissdd08f6d2008-06-30 20:24:24 +0000200
dtmuller052abc32016-07-26 11:58:28 +0200201src/thrift/main.cc: src/thrift/version.h
Konrad Grochowski16a23a62014-11-13 15:33:38 +0100202
203style-local:
dtmuller052abc32016-07-26 11:58:28 +0200204 $(CPPSTYLE_CMD)