When mixer is not available, recommend SDL2_mixer instead of SDL1.2 mixer
[freeciv.git] / client / Makefile.am
blob0c229fe5fa54f31832edc5b87cb7bec54097ba8f
1 ## Process this file with automake to produce Makefile.in
3 ## Must be set before adding anything
4 GUI_SUBDIRS =
6 desktopfiledir = @DESKTOPDIR@
7 appdatafiledir = @APPDATADIR@
9 desktopfile_DATA =
10 appdatafile_DATA =
12 if CLIENT_GUI_SDL
13 GUI_SUBDIRS += gui-sdl
14 desktopfile_DATA += \
15         freeciv-sdl.desktop
16 appdatafile_DATA += \
17         freeciv-sdl.appdata.xml
18 endif
19 if CLIENT_GUI_SDL2
20 GUI_SUBDIRS += gui-sdl2
21 desktopfile_DATA += \
22         freeciv-sdl2.desktop
23 appdatafile_DATA += \
24         freeciv-sdl2.appdata.xml
25 endif
26 if CLIENT_GUI_GTK_2_0
27 GUI_SUBDIRS += gui-gtk-2.0
28 desktopfile_DATA += \
29         freeciv-gtk2.desktop
30 appdatafile_DATA += \
31         freeciv-gtk2.appdata.xml
32 endif
33 if CLIENT_GUI_GTK_3_22
34 GUI_SUBDIRS += gui-gtk-3.22
35 desktopfile_DATA += \
36         freeciv.desktop
37 appdatafile_DATA += \
38         freeciv-gtk3.appdata.xml
39 endif
40 if CLIENT_GUI_GTK_3_0
41 GUI_SUBDIRS += gui-gtk-3.0
42 desktopfile_DATA += \
43         freeciv.desktop
44 appdatafile_DATA += \
45         freeciv-gtk3.appdata.xml
46 endif
47 if CLIENT_GUI_XAW
48 GUI_SUBDIRS += gui-xaw
49 endif
50 if CLIENT_GUI_QT
51 GUI_SUBDIRS += gui-qt
52 desktopfile_DATA += \
53         freeciv-qt.desktop
54 appdatafile_DATA += \
55         freeciv-qt.appdata.xml
56 endif
57 if CLIENT_GUI_STUB
58 GUI_SUBDIRS += gui-stub
59 endif
61 ALL_AUDIO_SDL_FILES=audio_sdl.c audio_sdl.h
63 if AUDIO_SDL
64 AUDIO_SDL_FILES=$(ALL_AUDIO_SDL_FILES)
65 endif
67 if MINGW
68 CLIENTICON=../win32/clienticon.o
69 endif
71 EXTRA_DIST= $(ALL_AUDIO_SDL_FILES)
73 ## This is usually false, so "include" is not recursed into 
74 ## by 'make', but it can be enabled in configure, and it is
75 ## necessary to have something like this so that the include 
76 ## directory is included for 'make dist'.
77 if MAKE_CLIENT_INCLUDE
78 CLI_INCLUDE = include
79 else
80 CLI_INCLUDE = 
81 endif
83 SUBDIRS = $(GUI_SUBDIRS) $(CLI_INCLUDE) agents luascript
85 AM_CPPFLAGS = \
86         -I$(top_srcdir)/utility -I$(srcdir)/include \
87         -I$(top_srcdir)/common -I$(top_srcdir)/common/aicore \
88         -I$(top_srcdir)/common/scriptcore \
89         -I$(srcdir)/luascript -I$(srcdir)/agents \
90         $(CLIENT_CFLAGS) $(SOUND_CFLAGS) \
91         -I$(top_srcdir)/dependencies/cvercmp
93 AM_LIBTOOLFLAGS = --preserve-dup-deps
95 # Build client common functionality in to library
96 # instead linking them directly to the client. This is necessary
97 # for static linking.
98 freeciv_client_src = $(AUDIO_SDL_FILES) \
99         attribute.h     \
100         attribute.c     \
101         citydlg_common.c \
102         citydlg_common.h \
103         cityrepdata.c   \
104         cityrepdata.h   \
105         client_main.c   \
106         client_main.h   \
107         chatline_common.c \
108         chatline_common.h \
109         connectdlg_common.c \
110         connectdlg_common.h \
111         climisc.c       \
112         climisc.h       \
113         climap.c        \
114         climap.h        \
115         clinet.c        \
116         clinet.h        \
117         colors_common.c         \
118         colors_common.h         \
119         control.c       \
120         control.h       \
121         editor.c                \
122         editor.h                \
123         global_worklist.c       \
124         global_worklist.h       \
125         goto.c          \
126         goto.h          \
127         helpdata.c      \
128         helpdata.h      \
129         luaconsole_common.c     \
130         luaconsole_common.h     \
131         mapctrl_common.c \
132         mapctrl_common.h \
133         mapview_common.c \
134         mapview_common.h \
135         messagewin_common.c \
136         messagewin_common.h \
137         music.c         \
138         music.h         \
139         overview_common.c       \
140         overview_common.h       \
141         packhand.c      \
142         packhand.h      \
143         packhand_gen.h  \
144         packhand_gen.c  \
145         plrdlg_common.c \
146         plrdlg_common.h \
147         options.c       \
148         options.h       \
149         repodlgs_common.c \
150         repodlgs_common.h \
151         reqtree.c \
152         reqtree.h \
153         servers.c               \
154         servers.h               \
155         text.c  \
156         text.h  \
157         themes_common.c \
158         themes_common.h \
159         tilespec.c      \
160         tilespec.h      \
161         unitselect_common.c     \
162         unitselect_common.h     \
163         update_queue.c  \
164         update_queue.h  \
165         voteinfo.c      \
166         voteinfo.h      \
167         zoom.c          \
168         zoom.h          \
169         audio.c         \
170         audio.h         \
171         audio_none.c    \
172         audio_none.h
174 gui_interface_src = \
175         gui_interface.c \
176         gui_interface.h
178 gui_cbs_src = \
179         gui_cbsetter.c \
180         gui_cbsetter.h
182 # packhand_gen.c & packhand_gen.h are generated files, but as they are
183 # generated outside this directory (when building common) there's no point in
184 # setting them to BUILT_SOURCES.
186 # These files are not generated to builddir, but to srcdir */
187 MAINTAINERCLEANFILES = $(srcdir)/packhand_gen.c $(srcdir)/packhand_gen.h
189 bin_PROGRAMS =
190 noinst_LTLIBRARIES =
192 clientlibs = \
193  $(top_builddir)/common/scriptcore/libscriptcore.la \
194  $(top_builddir)/client/agents/libagents.la \
195  $(top_builddir)/client/luascript/libscripting_client.la \
196  $(top_builddir)/dependencies/cvercmp/libcvercmp.la
198 if CLIENT_GUI_GTK_2_0
199 bin_PROGRAMS += freeciv-gtk2
200 noinst_LTLIBRARIES += libfcgui-gtk2.la
201 libfcgui_gtk2_la_SOURCES = $(freeciv_client_src)
202 libfcgui_gtk2_la_LIBADD = gui-gtk-2.0/libgui-gtk2.la $(clientlibs)
203 freeciv_gtk2_SOURCES = dummy.c
204 freeciv_gtk2_LDFLAGS = $(gui_gtk2_ldflags)
205 freeciv_gtk2_LDADD = \
206  $(SOUND_LIBS) \
207  libfcgui-gtk2.la \
208  $(top_builddir)/common/libfreeciv.la \
209  $(INTLLIBS) $(CLIENT_LIBS) $(SOUND_LIBS) $(CLIENTICON) \
210  $(MAPIMG_WAND_LIBS) \
211  $(gui_gtk2_libs)
212 endif
214 if CLIENT_GUI_GTK_3_22
215 bin_PROGRAMS += freeciv-gtk3.22
216 noinst_LTLIBRARIES += libfcgui-gtk3_22.la
217 libfcgui_gtk3_22_la_SOURCES = $(freeciv_client_src)
218 libfcgui_gtk3_22_la_LIBADD = gui-gtk-3.22/libgui-gtk3_22.la $(clientlibs)
219 freeciv_gtk3_22_SOURCES = dummy.c
220 freeciv_gtk3_22_LDFLAGS = $(gui_gtk3_22_ldflags)
221 freeciv_gtk3_22_LDADD = \
222  $(SOUND_LIBS) \
223  libfcgui-gtk3_22.la \
224  $(top_builddir)/common/libfreeciv.la \
225  $(INTLLIBS) $(CLIENT_LIBS) $(SOUND_LIBS) $(CLIENTICON) \
226  $(MAPIMG_WAND_LIBS) \
227  $(gui_gtk3_22_libs)
228 endif
230 if CLIENT_GUI_GTK_3_0
231 bin_PROGRAMS += freeciv-gtk3
232 noinst_LTLIBRARIES += libfcgui-gtk3.la
233 libfcgui_gtk3_la_SOURCES = $(freeciv_client_src)
234 libfcgui_gtk3_la_LIBADD = gui-gtk-3.0/libgui-gtk3.la $(clientlibs)
235 freeciv_gtk3_SOURCES = dummy.c
236 freeciv_gtk3_LDFLAGS = $(gui_gtk3_ldflags)
237 freeciv_gtk3_LDADD = \
238  $(SOUND_LIBS) \
239  libfcgui-gtk3.la \
240  $(top_builddir)/common/libfreeciv.la \
241  $(INTLLIBS) $(CLIENT_LIBS) $(SOUND_LIBS) $(CLIENTICON) \
242  $(MAPIMG_WAND_LIBS) \
243  $(gui_gtk3_libs)
244 endif
246 if CLIENT_GUI_SDL
247 bin_PROGRAMS += freeciv-sdl
248 noinst_LTLIBRARIES += libfcgui-sdl.la
249 libfcgui_sdl_la_SOURCES = $(freeciv_client_src)
250 libfcgui_sdl_la_LIBADD = gui-sdl/libgui-sdl.la $(clientlibs)
251 freeciv_sdl_SOURCES = dummy.c
252 freeciv_sdl_LDFLAGS = $(gui_sdl_ldflags)
253 freeciv_sdl_LDADD = \
254  $(gui_sdl_libs) \
255  libfcgui-sdl.la \
256  $(top_builddir)/common/libfreeciv.la \
257  $(INTLLIBS) $(CLIENT_LIBS) $(SOUND_LIBS) $(CLIENTICON) \
258  $(MAPIMG_WAND_LIBS) \
259  $(gui_sdl_libs)
260 endif
262 if CLIENT_GUI_SDL2
263 bin_PROGRAMS += freeciv-sdl2
264 noinst_LTLIBRARIES += libfcgui-sdl2.la
265 libfcgui_sdl2_la_SOURCES = $(freeciv_client_src)
266 libfcgui_sdl2_la_LIBADD = gui-sdl2/libgui-sdl2.la $(clientlibs)
267 freeciv_sdl2_SOURCES = dummy.c
268 freeciv_sdl2_LDFLAGS = $(gui_sdl2_ldflags)
269 freeciv_sdl2_LDADD = \
270  $(gui_sdl2_libs) \
271  libfcgui-sdl2.la \
272  $(top_builddir)/common/libfreeciv.la \
273  $(INTLLIBS) $(CLIENT_LIBS) $(SOUND_LIBS) $(CLIENTICON) \
274  $(MAPIMG_WAND_LIBS) \
275  $(gui_sdl2_libs)
276 endif
278 if CLIENT_GUI_XAW
279 bin_PROGRAMS += freeciv-xaw
280 noinst_LTLIBRARIES += libfcgui-xaw.la
281 libfcgui_xaw_la_SOURCES = $(freeciv_client_src)
282 libfcgui_xaw_la_LIBADD = gui-xaw/libgui-xaw.la $(clientlibs)
283 freeciv_xaw_SOURCES = dummy.c
284 freeciv_xaw_LDFLAGS = $(gui_xaw_ldflags)
285 freeciv_xaw_LDADD = \
286  libfcgui-xaw.la \
287  $(top_builddir)/common/libfreeciv.la \
288  $(INTLLIBS) $(CLIENT_LIBS) $(SOUND_LIBS) $(CLIENTICON) \
289  $(MAPIMG_WAND_LIBS) \
290  $(gui_xaw_libs)
291 endif
293 if CLIENT_GUI_QT
294 bin_PROGRAMS += freeciv-qt
295 noinst_LTLIBRARIES += libfcgui-qt.la
296 libfcgui_qt_la_SOURCES = $(freeciv_client_src)
297 libfcgui_qt_la_LIBADD = gui-qt/libgui-qt.la $(clientlibs)
298 freeciv_qt_SOURCES = dummycxx.cpp $(gui_interface_src)
299 freeciv_qt_LDFLAGS = $(gui_qt_ldflags)
300 freeciv_qt_LDADD = \
301  $(SOUND_LIBS) \
302  libfcgui-qt.la \
303  $(top_builddir)/common/libfreeciv.la \
304  $(INTLLIBS) $(CLIENT_LIBS) $(SOUND_LIBS) $(CLIENTICON) \
305  $(MAPIMG_WAND_LIBS) \
306  $(gui_qt_libs)
307 endif
309 if CLIENT_GUI_STUB
310 bin_PROGRAMS += freeciv-stub
311 noinst_LTLIBRARIES += libfcgui-stub.la
312 libfcgui_stub_la_SOURCES = $(freeciv_client_src)
313 libfcgui_stub_la_LIBADD = gui-stub/libgui-stub.la $(clientlibs)
314 freeciv_stub_SOURCES = $(gui_interface_src) $(gui_cbs_src)
315 freeciv_stub_LDFLAGS = $(gui_stub_ldflags)
316 freeciv_stub_LDADD = \
317  libfcgui-stub.la \
318  $(top_builddir)/common/libfreeciv.la \
319  $(INTLLIBS) $(CLIENT_LIBS) $(SOUND_LIBS) $(CLIENTICON) \
320  $(MAPIMG_WAND_LIBS) \
321  $(gui_stub_libs)
322 endif