Fix "Manual Turn Done in AI mode"
[freeciv.git] / tools / Makefile.am
blob53948e2bfb65c82cca3119570e0fe2faa7a67dbf
1 ## Process this file with automake to produce Makefile.in
3 if RULEDIT
4 SUBDIRS = ruledit
5 endif
7 MOCCMD=@MOCCMD@
9 include $(top_srcdir)/bootstrap/Makerules.mk
11 bin_PROGRAMS = 
13 if SERVER
14 if CLIENT
15 if FCMANUAL
16 bin_PROGRAMS += freeciv-manual
17 endif
18 endif
19 endif
21 if MODINST_CLI
22 bin_PROGRAMS += freeciv-mp-cli
23 endif
24 if MODINST_GTK2
25 bin_PROGRAMS += freeciv-mp-gtk2
26 endif
27 if MODINST_GTK3
28 bin_PROGRAMS += freeciv-mp-gtk3
29 endif
30 if MODINST_QT
31 bin_PROGRAMS += freeciv-mp-qt
32 endif
34 if MODINST
35 noinst_LTLIBRARIES = libfcmp.la
36 endif
38 common_cppflags = \
39         -I$(top_srcdir)/dependencies/cvercmp \
40         -I$(top_srcdir)/utility \
41         -I$(top_srcdir)/common \
42         -I$(top_srcdir)/server \
43         -I$(top_srcdir)/client \
44         -I$(top_srcdir)/client/include
46 AM_CPPFLAGS = $(common_cppflags)
48 if MINGW
49 MPICON = $(top_builddir)/win32/mpicon.o
50 else
51 desktopfiledir = @DESKTOPDIR@
52 desktopfile_DATA =
54 appdatafiledir = @APPDATADIR@
55 appdatafile_DATA =
57 if MODINST_GTK2
58 desktopfile_DATA += \
59         freeciv-mp-gtk2.desktop
60 appdatafile_DATA += \
61         freeciv-mp-gtk2.appdata.xml
62 endif
64 if MODINST_GTK3
65 desktopfile_DATA += \
66         freeciv-mp-gtk3.desktop
67 appdatafile_DATA += \
68         freeciv-mp-gtk3.appdata.xml
69 endif
71 if MODINST_QT
72 desktopfile_DATA += \
73         freeciv-mp-qt.desktop
74 appdatafile_DATA += \
75         freeciv-mp-qt.appdata.xml
76 endif
78 endif
80 if FCMANUAL
81 freeciv_manual_SOURCES = \
82                 civmanual.c
84 freeciv_manual_LDFLAGS = $(GGZDMOD_LDFLAGS)
86 # This is a bit of a hack.  The program links in with the server lib
87 # but also uses some files from the client.
88 freeciv_manual_LDADD = \
89  $(top_builddir)/server/libfreeciv-srv.la \
90  ../client/helpdata.lo \
91  $(top_builddir)/common/libfreeciv.la \
92  $(INTLLIBS)  $(MAPIMG_WAND_LIBS) \
93  $(SERVER_LIBS) $(LIB_GGZDMOD)
94 endif
96 libfcmp_la_SOURCES = \
97                 download.c      \
98                 download.h      \
99                 modinst.c       \
100                 modinst.h       \
101                 mpcmdline.c     \
102                 mpcmdline.h     \
103                 mpdb.c          \
104                 mpdb.h
106 if MODINST_CLI
107 freeciv_mp_cli_CPPFLAGS = $(common_cppflags) $(mp_cli_cflags)
109 freeciv_mp_cli_SOURCES = mpcli.c
111 freeciv_mp_cli_LDFLAGS = $(mp_cli_ldflags)
113 freeciv_mp_cli_LDADD = \
114                 libfcmp.la \
115                 $(top_builddir)/dependencies/cvercmp/libcvercmp.la \
116                 $(top_builddir)/common/libfreeciv.la \
117                 $(MAPIMG_WAND_LIBS) \
118                 $(mp_cli_libs)
119 endif
121 if MODINST_GTK2
122 freeciv_mp_gtk2_CPPFLAGS = $(common_cppflags) $(mp_gtk2_cflags)
124 freeciv_mp_gtk2_SOURCES = mpgui_gtk2.c
126 freeciv_mp_gtk2_LDFLAGS = $(mp_gtk2_ldflags)
128 freeciv_mp_gtk2_LDADD = \
129                 libfcmp.la \
130                 $(top_builddir)/dependencies/cvercmp/libcvercmp.la \
131                 $(top_builddir)/common/libfreeciv.la \
132                 $(MAPIMG_WAND_LIBS) \
133                 $(mp_gtk2_libs) \
134                 $(MPICON)
135 endif
137 if MODINST_GTK3
138 freeciv_mp_gtk3_CPPFLAGS = $(common_cppflags) $(mp_gtk3_cflags)
140 freeciv_mp_gtk3_SOURCES = mpgui_gtk3.c
142 freeciv_mp_gtk3_LDFLAGS = $(mp_gtk3_ldflags)
144 freeciv_mp_gtk3_LDADD = \
145                 libfcmp.la \
146                 $(top_builddir)/dependencies/cvercmp/libcvercmp.la \
147                 $(top_builddir)/common/libfreeciv.la \
148                 $(MAPIMG_WAND_LIBS) \
149                 $(mp_gtk3_libs) \
150                 $(MPICON)
151 endif
153 if MODINST_QT
155 MOC_FILES = \
156         meta_mpgui_qt.cpp \
157         meta_mpgui_qt_worker.cpp
159 freeciv_mp_qt_CPPFLAGS = $(common_cppflags) $(mp_qt_cppflags)
160 freeciv_mp_qt_CXXFLAGS = $(mp_qt_cxxflags)
162 freeciv_mp_qt_SOURCES = \
163         mpgui_qt.cpp    \
164         mpgui_qt.h      \
165         mpgui_qt_worker.cpp \
166         mpgui_qt_worker.h
168 nodist_freeciv_mp_qt_SOURCES = $(MOC_FILES)
170 CLEANFILES = $(MOC_FILES)
172 freeciv_mp_qt_LDADD = \
173                 libfcmp.la \
174                 $(top_builddir)/dependencies/cvercmp/libcvercmp.la \
175                 $(top_builddir)/common/libfreeciv.la \
176                 $(MAPIMG_WAND_LIBS) \
177                 $(mp_qt_libs) \
178                 $(MPICON)
179 endif