1## Process this file with automake to produce Makefile.in
2
3noinst_LTLIBRARIES = \
4	libscripting_fcdb.la \
5	libscripting_server.la
6
7AM_CPPFLAGS = \
8	-I$(top_srcdir)/utility \
9	-I$(top_srcdir)/common \
10	-I$(top_srcdir)/common/scriptcore \
11	-I$(top_srcdir)/server \
12	-I$(top_srcdir)/ai \
13	$(FCDB_MYSQL_CFLAGS) $(FCDB_POSTGRES_CFLAGS) $(FCDB_SQLITE_CFLAGS) \
14	$(LUA_CFLAGS) $(LUASQL_CFLAGS) $(TOLUA_CFLAGS)
15
16# tolua_[fcdb|server]_gen.[ch] are now distributed to aid in cross-compiling.
17# See PR#13571.
18dist_libscripting_server_la_SOURCES = \
19	api_server_base.c	\
20	api_server_base.h	\
21	api_server_edit.c	\
22	api_server_edit.h	\
23	api_server_game_methods.c	\
24	api_server_game_methods.h	\
25	api_server_notify.c	\
26	api_server_notify.h	\
27	script_server.c		\
28	script_server.h		\
29	tolua_server_gen.c	\
30	tolua_server_gen.h
31
32dist_libscripting_fcdb_la_SOURCES = \
33	api_fcdb_auth.c		\
34	api_fcdb_auth.h		\
35	api_fcdb_base.c		\
36	api_fcdb_base.h		\
37	script_fcdb.c		\
38	script_fcdb.h		\
39	tolua_fcdb_gen.c	\
40	tolua_fcdb_gen.h
41
42EXTRA_DIST = \
43	tolua_fcdb.pkg		\
44	tolua_server.pkg
45
46BUILT_SOURCES = \
47	tolua_fcdb_gen.c	\
48	tolua_fcdb_gen.h	\
49	tolua_server_gen.c	\
50	tolua_server_gen.h
51
52# LUA_LIBS & co are not LIBADDedded to the library since having them
53# both from shared libfreeciv.so (common/scriptcore) and static library
54# here would break build when libfreeciv.so is shared library. Here we
55# can only rely on them getting included via libfreeciv.so.
56
57tolua_fcdb_gen.c tolua_fcdb_gen.h: tolua_fcdb.pkg
58	$(TOLUA) -n fcdb -o $(srcdir)/tolua_fcdb_gen.c \
59	-H $(srcdir)/tolua_fcdb_gen.h $(srcdir)/tolua_fcdb.pkg
60
61tolua_server_gen.c tolua_server_gen.h: tolua_server.pkg
62	$(TOLUA) -n server -o $(srcdir)/tolua_server_gen.c \
63	-H $(srcdir)/tolua_server_gen.h $(srcdir)/tolua_server.pkg
64
65# These files are not generated to builddir, but to srcdir */
66MAINTAINERCLEANFILES = \
67	$(srcdir)/tolua_fcdb_gen.c \
68	$(srcdir)/tolua_fcdb_gen.h \
69	$(srcdir)/tolua_server_gen.c \
70	$(srcdir)/tolua_server_gen.h
71