blob: f7a717165ec793e9e442506a8b959045f39f071b [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
26# Note on why we have src and src/plugin directories:
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
31SUBDIRS = src src/plugin .
32if WITH_TESTS
33SUBDIRS += test
34endif
Mark Sleeeb0d0242007-01-25 07:58:55 +000035
36bin_PROGRAMS = thrift
37
38thrift_OBJDIR = obj
39
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +090040plugin_gen = src/plugin/plugin_types.h \
41 src/plugin/plugin_types.cpp \
42 src/plugin/plugin_constants.h \
43 src/plugin/plugin_constants.cpp
44
45compiler_core = src/common.h \
46 src/common.cc \
Mark Sleeeb0d0242007-01-25 07:58:55 +000047 src/generate/t_generator.cc \
Bryan Duxburyc412a2f2010-08-04 18:51:57 +000048 src/generate/t_generator_registry.h \
Mark Sleeefd37f12007-11-20 05:13:09 +000049 src/globals.h \
David Reiss204420f2008-01-11 20:59:03 +000050 src/platform.h \
jfarrell8fd8c632014-07-10 09:14:51 -040051 src/logging.h \
Mark Sleeefd37f12007-11-20 05:13:09 +000052 src/parse/t_doc.h \
53 src/parse/t_type.h \
54 src/parse/t_base_type.h \
55 src/parse/t_enum.h \
56 src/parse/t_enum_value.h \
57 src/parse/t_typedef.h \
jfarrelle0e83162014-04-08 22:45:01 -040058 src/parse/t_typedef.cc \
Mark Sleeefd37f12007-11-20 05:13:09 +000059 src/parse/t_container.h \
60 src/parse/t_list.h \
61 src/parse/t_set.h \
62 src/parse/t_map.h \
63 src/parse/t_struct.h \
64 src/parse/t_field.h \
65 src/parse/t_service.h \
66 src/parse/t_function.h \
67 src/parse/t_program.h \
68 src/parse/t_scope.h \
69 src/parse/t_const.h \
70 src/parse/t_const_value.h \
David Reiss9e7ba8c2010-10-05 16:39:27 +000071 src/parse/parse.cc \
Mark Sleeefd37f12007-11-20 05:13:09 +000072 src/generate/t_generator.h \
Jake Farrelle0c53162011-11-16 12:58:36 +000073 src/generate/t_oop_generator.h \
Jake Farrell7c7a5e02012-10-11 00:29:11 +000074 src/generate/t_html_generator.h \
Jake Farrelle0c53162011-11-16 12:58:36 +000075 src/windows/config.h \
76 src/windows/version.h
iproctor9a41a0c2007-07-16 21:59:24 +000077
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +090078thrift_SOURCES = src/main.h \
79 src/main.cc \
80 src/audit/t_audit.cpp \
81 src/audit/t_audit.h
82
Jake Farrelldec8c542011-09-21 00:15:27 +000083# Specific client generator source
84thrift_SOURCES += src/generate/t_c_glib_generator.cc \
85 src/generate/t_cpp_generator.cc \
86 src/generate/t_java_generator.cc \
Roger Meier1a74d9c2014-10-12 23:35:43 +020087 src/generate/t_json_generator.cc \
Jake Farrelldec8c542011-09-21 00:15:27 +000088 src/generate/t_as3_generator.cc \
Mark Erickson932c4702015-08-29 10:46:51 -050089 src/generate/t_dart_generator.cc \
Jens Geyerbd52f1a2014-07-28 01:25:30 +020090 src/generate/t_haxe_generator.cc \
Jake Farrelldec8c542011-09-21 00:15:27 +000091 src/generate/t_csharp_generator.cc \
92 src/generate/t_py_generator.cc \
93 src/generate/t_rb_generator.cc \
94 src/generate/t_perl_generator.cc \
95 src/generate/t_php_generator.cc \
96 src/generate/t_erl_generator.cc \
97 src/generate/t_cocoa_generator.cc \
Jens Geyer56e5b9b2015-10-09 22:01:55 +020098 src/generate/t_swift_generator.cc \
Jake Farrelldec8c542011-09-21 00:15:27 +000099 src/generate/t_st_generator.cc \
100 src/generate/t_ocaml_generator.cc \
101 src/generate/t_hs_generator.cc \
102 src/generate/t_xsd_generator.cc \
BCGde0b4b52015-12-28 01:15:00 -0500103 src/generate/t_xml_generator.cc \
Jake Farrelldec8c542011-09-21 00:15:27 +0000104 src/generate/t_html_generator.cc \
105 src/generate/t_js_generator.cc \
106 src/generate/t_javame_generator.cc \
Jake Farrell7ae13e12011-10-18 14:35:26 +0000107 src/generate/t_delphi_generator.cc \
Jake Farrellb95b0ff2012-03-22 21:49:10 +0000108 src/generate/t_go_generator.cc \
Jens Geyerd7b45792013-05-13 22:11:46 +0200109 src/generate/t_gv_generator.cc \
Roger Meier6cf0ffc2014-04-05 00:45:42 +0200110 src/generate/t_d_generator.cc \
111 src/generate/t_lua_generator.cc
David Reiss22585732008-02-27 01:55:33 +0000112
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000113thrift_CPPFLAGS = -I$(srcdir)/src
Roger Meierec300e32014-10-13 02:13:35 +0200114thrift_CXXFLAGS = -Wall -Wextra -pedantic
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +0900115thrift_LDADD = @LEXLIB@ src/libparse.a
Mark Sleeeb0d0242007-01-25 07:58:55 +0000116
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +0900117if !WITH_PLUGIN
118thrift_SOURCES += $(compiler_core)
119else
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000120
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +0900121lib_LTLIBRARIES = libthriftc.la
122
123thrift_CPPFLAGS += -DTHRIFT_ENABLE_PLUGIN=1
124thrift_LDADD += libthriftc.la
125
126nodist_libthriftc_la_SOURCES = $(plugin_gen)
127libthriftc_la_SOURCES = $(compiler_core) \
128 src/plugin/type_util.h \
129 src/plugin/plugin.h \
130 src/plugin/plugin.cc \
131 src/plugin/plugin_output.h \
132 src/plugin/plugin_output.cc \
133 src/plugin/plugin.thrift \
134 src/logging.cc
135
136
137libthriftc_la_CPPFLAGS = -I$(srcdir)/src -Isrc -I$(top_builddir)/lib/cpp/src -DTHRIFT_ENABLE_PLUGIN=1
138libthriftc_la_CXXFLAGS = -Wall -Wextra -pedantic
139libthriftc_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
140endif
Mark Sleeeb0d0242007-01-25 07:58:55 +0000141
Jake Farrelle0c53162011-11-16 12:58:36 +0000142WINDOWS_DIST = \
143 compiler.sln \
144 compiler.vcxproj \
Roger Meierdb372ac2014-06-16 07:32:12 +0200145 compiler.vcxproj.filters
Jake Farrelle0c53162011-11-16 12:58:36 +0000146
147EXTRA_DIST = \
jfarrellf13e4312015-08-25 00:39:29 -0400148 coding_standards.md \
Roger Meierdb372ac2014-06-16 07:32:12 +0200149 README.md \
jfarrell8fd8c632014-07-10 09:14:51 -0400150 CMakeLists.txt \
Jake Farrelle0c53162011-11-16 12:58:36 +0000151 $(WINDOWS_DIST)
David Reissb72d19f2007-09-18 19:46:00 +0000152
Mark Sleeeb0d0242007-01-25 07:58:55 +0000153clean-local:
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +0900154 $(RM) version.h windows/version.h $(plugin_gen)
David Reissdd08f6d2008-06-30 20:24:24 +0000155
Nobuaki Sukegawa11da87e2016-09-10 14:02:19 +0900156src/main.cc: src/version.h
Konrad Grochowski16a23a62014-11-13 15:33:38 +0100157
158style-local:
159 $(CPPSTYLE_CMD)