blob: f37649495f4e2fed8ff539e6260e8ff940332097 [file] [log] [blame]
Roger Meier2814c2e2014-07-29 23:28:46 +02001#
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#
Kevin Wojniaka3925662019-07-01 11:07:45 -070019AUTOMAKE_OPTIONS = subdir-objects serial-tests nostdinc
Roger Meier2814c2e2014-07-29 23:28:46 +020020
Nobuaki Sukegawaef0a8fa2015-05-10 20:21:17 +090021BUILT_SOURCES = \
22 gen-c_glib/calculator.h \
23 gen-c_glib/shared_service.h \
24 gen-c_glib/shared_types.h \
25 gen-c_glib/tutorial_types.h
26
Kevin Wojniaka3925662019-07-01 11:07:45 -070027AM_CFLAGS = -g -Wall -Wextra -pedantic $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) $(OPENSSL_INCLUDES) @GCOV_CFLAGS@ -I$(top_builddir)/lib/c_glib/src/thrift
Roger Meier2814c2e2014-07-29 23:28:46 +020028AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -Igen-c_glib
James E. King, III36628a22017-02-13 15:25:41 -050029AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) @GCOV_LDFLAGS@
Roger Meier2814c2e2014-07-29 23:28:46 +020030
Roger Meier2814c2e2014-07-29 23:28:46 +020031noinst_LTLIBRARIES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020032 libtutorialgencglib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020033
34nodist_libtutorialgencglib_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020035 gen-c_glib/calculator.c \
36 gen-c_glib/calculator.h \
37 gen-c_glib/shared_service.c \
38 gen-c_glib/shared_service.h \
39 gen-c_glib/shared_types.c \
40 gen-c_glib/shared_types.h \
41 gen-c_glib/tutorial_types.c \
42 gen-c_glib/tutorial_types.h
Roger Meier2814c2e2014-07-29 23:28:46 +020043
44libtutorialgencglib_la_LIBADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020045 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020046
Jens Geyerf6eebba2015-07-30 20:48:40 +020047libtutorialgencglib_la_CFLAGS = \
48 $(AM_CFLAGS) -Wno-unused-function
Roger Meier2814c2e2014-07-29 23:28:46 +020049
50noinst_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020051 tutorial_server \
52 tutorial_client
Roger Meier2814c2e2014-07-29 23:28:46 +020053
Roger Meier4606d7d2014-09-29 21:01:58 +020054tutorial_server_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020055 c_glib_server.c
James E. King, III36628a22017-02-13 15:25:41 -050056tutorial_server_LDFLAGS = $(OPENSSL_LIBS)
Roger Meier4606d7d2014-09-29 21:01:58 +020057
58tutorial_server_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020059 libtutorialgencglib.la \
60 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier4606d7d2014-09-29 21:01:58 +020061
Roger Meier2814c2e2014-07-29 23:28:46 +020062tutorial_client_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020063 c_glib_client.c
Roger Meier2814c2e2014-07-29 23:28:46 +020064
65tutorial_client_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020066 libtutorialgencglib.la \
67 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020068
69
Roger Meier4712f8c2014-11-08 23:19:02 +010070gen-c_glib/calculator.c gen-c_glib/calculator.h gen-c_glib/shared_service.c gen-c_glib/shared_service.h gen-c_glib/shared_types.c gen-c_glib/shared_types.h gen-c_glib/tutorial_types.c gen-c_glib/tutorial_types.h: $(top_srcdir)/tutorial/tutorial.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +020071 $(THRIFT) --gen c_glib -r $<
Roger Meier2814c2e2014-07-29 23:28:46 +020072
73clean-local:
Jens Geyer8c5fce92015-07-28 22:59:16 +020074 $(RM) gen-c_glib/*
Roger Meier2814c2e2014-07-29 23:28:46 +020075
Roger Meier4606d7d2014-09-29 21:01:58 +020076tutorialserver: all
Jens Geyer79f988c2014-10-03 20:42:54 +020077 ./tutorial_server
Roger Meier4606d7d2014-09-29 21:01:58 +020078
Roger Meier2814c2e2014-07-29 23:28:46 +020079tutorialclient: all
Jens Geyer79f988c2014-10-03 20:42:54 +020080 ./tutorial_client
Roger Meier2814c2e2014-07-29 23:28:46 +020081
82EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +020083 c_glib_server.c \
84 c_glib_client.c