webperimental: killstack decides stack protects.
[freeciv.git] / server / Makefile.am
blob2379a34f46d499da4e39710dcedf2491d8396103
1 ## Process this file with automake to produce Makefile.in
3 SUBDIRS = advisors generator scripting
5 if FREECIV_WEB
6 srvbin = freeciv-web
7 else
8 srvbin = freeciv-server
9 endif
11 if SERVER
12 bin_PROGRAMS = $(srvbin)
13 endif
15 lib_LTLIBRARIES = libfreeciv-srv.la
16 AM_CPPFLAGS = \
17         -I$(top_srcdir)/ai \
18         -I$(top_srcdir)/ai/classic \
19         -I$(top_srcdir)/common \
20         -I$(top_srcdir)/common/aicore \
21         -I$(top_srcdir)/common/networking \
22         -I$(top_srcdir)/common/scriptcore \
23         -I$(top_srcdir)/utility \
24         -I$(srcdir)/advisors \
25         -I$(srcdir)/generator \
26         -I$(srcdir)/scripting \
27         -I$(top_srcdir)/dependencies/tinycthread \
28         $(FCDB_MYSQL_CFLAGS) $(FCDB_POSTGRES_CFLAGS) $(FCDB_SQLITE3_CFLAGS)
30 if MINGW
31 SERVERICON=../windows/servericon.o
32 endif
34 exe_sources = \
35                 civserver.c
37 libfreeciv_srv_la_SOURCES = \
38                 actiontools.c   \
39                 actiontools.h   \
40                 aiiface.c       \
41                 aiiface.h       \
42                 animals.c       \
43                 animals.h       \
44                 auth.c          \
45                 auth.h          \
46                 barbarian.c     \
47                 barbarian.h     \
48                 citizenshand.c  \
49                 citizenshand.h  \
50                 cityhand.c      \
51                 cityhand.h      \
52                 citytools.c     \
53                 citytools.h     \
54                 cityturn.c      \
55                 cityturn.h      \
56                 commands.c      \
57                 commands.h      \
58                 connecthand.c   \
59                 connecthand.h   \
60                 console.c       \
61                 console.h       \
62                 diplhand.c      \
63                 diplhand.h      \
64                 diplomats.c     \
65                 diplomats.h     \
66                 edithand.c      \
67                 edithand.h      \
68                 fcdb.c          \
69                 fcdb.h          \
70                 gamehand.c      \
71                 gamehand.h      \
72                 handchat.c      \
73                 handchat.h      \
74                 hand_gen.c      \
75                 hand_gen.h      \
76                 maphand.c       \
77                 maphand.h       \
78                 meta.c          \
79                 meta.h          \
80                 mood.c          \
81                 mood.h          \
82                 notify.c        \
83                 notify.h        \
84                 plrhand.c       \
85                 plrhand.h       \
86                 report.c        \
87                 report.h        \
88                 rscompat.c      \
89                 rscompat.h      \
90                 rssanity.c      \
91                 rssanity.h      \
92                 ruleset.c       \
93                 ruleset.h       \
94                 sanitycheck.c   \
95                 sanitycheck.h   \
96                 savecompat.c    \
97                 savecompat.h    \
98                 savegame.c      \
99                 savegame.h      \
100                 savegame2.c     \
101                 savegame2.h     \
102                 savegame3.c     \
103                 savegame3.h     \
104                 score.c         \
105                 score.h         \
106                 sernet.c        \
107                 sernet.h        \
108                 settings.c      \
109                 settings.h      \
110                 spacerace.c     \
111                 spacerace.h     \
112                 srv_log.c       \
113                 srv_log.h       \
114                 srv_main.c      \
115                 srv_main.h      \
116                 stdinhand.c     \
117                 stdinhand.h     \
118                 techtools.h     \
119                 techtools.c     \
120                 unithand.c      \
121                 unithand.h      \
122                 unittools.c     \
123                 unittools.h     \
124                 voting.c        \
125                 voting.h
127 # hand_gen.c & hand_gen.h are generated files, but as they are generated
128 # outside this directory (when building common) there's no point in
129 # setting them to BUILT_SOURCES.
131 da_libs = 
133 if AI_MOD_DEFAULT_NEEDED
134 da_libs += $(top_builddir)/ai/default/libdefaultai.la
135 endif
137 if AI_MOD_STATIC_CLASSIC
138 da_libs += $(top_builddir)/ai/classic/libclassicai.la
139 endif
140 if AI_MOD_STATIC_THREADED
141 da_libs += $(top_builddir)/ai/threaded/libthreadedai.la
142 endif
143 if AI_MOD_STATIC_TEX
144 da_libs += $(top_builddir)/ai/tex/libtexai.la
145 endif
146 if AI_MOD_STATIC_STUB
147 da_libs += $(top_builddir)/ai/stub/libstubai.la
148 endif
150 # These files are not generated to builddir, but to srcdir */
151 MAINTAINERCLEANFILES = \
152         $(srcdir)/hand_gen.c \
153         $(srcdir)/hand_gen.h
155 srvlibs = \
156  $(da_libs) \
157  $(top_builddir)/ai/libaicommon.la \
158  $(top_builddir)/server/advisors/libadvisors.la \
159  $(top_builddir)/server/generator/libgenerator.la \
160  $(top_builddir)/server/scripting/libscripting_fcdb.la \
161  $(top_builddir)/server/scripting/libscripting_server.la
163 libfreeciv_srv_la_LIBADD = \
164  $(srvlibs) $(SRV_LIB_LIBS) \
165  $(LUA_LIBS) $(TOLUA_LIBS) $(LUASQL_LIBS)
167 exe_ldflags =
169 exe_ldadd = \
170  ./libfreeciv-srv.la \
171  $(top_builddir)/common/libfreeciv.la \
172  $(INTLLIBS) \
173  $(MAPIMG_WAND_LIBS) \
174  $(TINYCTHR_LIBS) \
175  $(SERVER_LIBS) $(SERVERICON)
177 if FREECIV_WEB
178 freeciv_web_SOURCES = $(exe_sources)
179 freeciv_web_LDFLAGS = $(exe_ldflags)
180 freeciv_web_LDADD = $(exe_ldadd)
181 else
182 freeciv_server_SOURCES = $(exe_sources)
183 freeciv_server_LDFLAGS = $(exe_ldflags)
184 freeciv_server_LDADD = $(exe_ldadd)
185 endif
187 desktopfiledir = @DESKTOPDIR@
188 desktopfile_DATA = \
189         freeciv-server.desktop
191 appdatafiledir = @APPDATADIR@
192 appdatafile_DATA = \
193         freeciv-server.appdata.xml