Remove do-nothing command and add warning about it
[amule.git] / src / Makefile.am
blobcfde5b4f8fd81b49667301d7cd47233832669f28
1 AM_CPPFLAGS = $(MULECPPFLAGS)
2 AM_CFLAGS = $(MULECFLAGS)
3 AM_CXXFLAGS = $(MULECXXFLAGS)
4 AM_LDFLAGS = $(MULELDFLAGS)
6 SUBDIRS = libs utils pixmaps
8 if WEB
9 # build webserver after current
10 SUBDIRS += . webserver
11 endif
13 if INSTALL_SKINS
14 SUBDIRS += skins
15 endif
17 EXTRA_DIST = \
18         aMule.xpm \
19         LibSocketAsio.cpp \
20         LibSocketWX.cpp \
21         Parser.y \
22         Scanner.l \
23         IPFilterScanner.l \
24         muuli.wdr
26 bin_PROGRAMS =
28 if MONOLITHIC
29 bin_PROGRAMS += amule
30 endif
32 if COMPILE_CMD
33 bin_PROGRAMS += amulecmd
34 endif
36 if ED2K
37 bin_PROGRAMS += ed2k
38 endif
40 if AMULE_GUI
41 bin_PROGRAMS += amulegui
42 endif
44 if AMULE_DAEMON
45 bin_PROGRAMS += amuled
46 endif
48 # Sources
49 noinst_LIBRARIES = libmulesocket.a
50 if MONOLITHIC
51 noinst_LIBRARIES += libmuleappcore.a libmuleappgui.a libmuleappcommon.a
52 else
53 if AMULE_DAEMON
54 noinst_LIBRARIES += libmuleappcore.a libmuleappcommon.a
55 else
56 if AMULE_GUI
57 noinst_LIBRARIES += libmuleappgui.a libmuleappcommon.a
58 endif
59 endif
60 endif
63 # Socket lib (WX or Asio)
65 libmulesocket_a_SOURCES = LibSocket.cpp
66 libmulesocket_a_CPPFLAGS = $(AM_CPPFLAGS) $(WXBASE_CPPFLAGS) $(BOOST_CPPFLAGS) -I$(srcdir)/libs -I$(srcdir)/include
69 # Common to core/gui/monolithic
71 libmuleappcommon_a_SOURCES = \
72         CFile.cpp \
73         ClientCredits.cpp \
74         DataToText.cpp \
75         ED2KLink.cpp \
76         Friend.cpp \
77         GapList.cpp \
78         MagnetURI.cpp \
79         MemFile.cpp \
80         NetworkFunctions.cpp \
81         OtherFunctions.cpp \
82         Packet.cpp \
83         RLE.cpp \
84         SafeFile.cpp \
85         SHA.cpp \
86         Tag.cpp \
87         TerminationProcess.cpp \
88         Timer.cpp \
89         kademlia/utils/UInt128.cpp
91 libmuleappcommon_a_CPPFLAGS = $(AM_CPPFLAGS) $(WXBASE_CPPFLAGS) -I$(srcdir)/libs -I$(srcdir)/include $(CRYPTOPP_CPPFLAGS) $(LIBUPNP_CPPFLAGS)
94 # Common to core/monolithic
96 libmuleappcore_a_SOURCES = \
97         AsyncDNS.cpp \
98         CanceledFileList.cpp \
99         DeadSourceList.cpp \
100         FileArea.cpp \
101         FileAutoClose.cpp \
102         IPFilterScanner.cpp \
103         Scanner.cpp \
104         Parser.cpp \
105         PlatformSpecific.cpp \
106         RandomFunctions.cpp \
107         RC4Encrypt.cpp \
108         StateMachine.cpp \
109         TerminationProcessAmuleweb.cpp \
110         ThreadScheduler.cpp \
111         UPnPBase.cpp \
112         kademlia/kademlia/Entry.cpp \
113         kademlia/kademlia/Indexed.cpp \
114         kademlia/kademlia/SearchManager.cpp \
115         kademlia/routing/RoutingBin.cpp
117 libmuleappcore_a_CPPFLAGS = $(AM_CPPFLAGS) $(WXBASE_CPPFLAGS) -I$(srcdir)/libs -I$(srcdir)/include $(CRYPTOPP_CPPFLAGS) $(LIBUPNP_CPPFLAGS)
120 # Common to gui/monolithic
122 libmuleappgui_a_SOURCES = \
123         BarShader.cpp \
124         ColorFrameCtrl.cpp \
125         EditServerListDlg.cpp \
126         extern/wxWidgets/listctrl.cpp \
127         FileDetailListCtrl.cpp \
128         IP2Country.cpp \
129         MuleColour.cpp \
130         MuleGifCtrl.cpp \
131         MuleListCtrl.cpp \
132         MuleNotebook.cpp \
133         MuleTextCtrl.cpp \
134         MuleCollection.cpp \
135         muuli_wdr.cpp
137 libmuleappgui_a_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CPPFLAGS) -I$(srcdir)/libs -I$(srcdir)/include $(LIBUPNP_CPPFLAGS) $(GEOIP_CPPFLAGS)
139 core_sources = \
140         amule.cpp \
141         BaseClient.cpp \
142         ClientList.cpp \
143         ClientCreditsList.cpp \
144         ClientTCPSocket.cpp \
145         ClientUDPSocket.cpp \
146         CorruptionBlackBox.cpp \
147         DownloadClient.cpp \
148         DownloadQueue.cpp \
149         ECSpecialCoreTags.cpp \
150         EMSocket.cpp \
151         EncryptedStreamSocket.cpp \
152         EncryptedDatagramSocket.cpp \
153         ExternalConn.cpp \
154         FriendList.cpp \
155         IPFilter.cpp \
156         KnownFileList.cpp \
157         ListenSocket.cpp \
158         MuleUDPSocket.cpp \
159         SearchFile.cpp \
160         SearchList.cpp \
161         ServerConnect.cpp \
162         ServerList.cpp \
163         ServerSocket.cpp \
164         ServerUDPSocket.cpp \
165         SHAHashSet.cpp \
166         SharedFileList.cpp \
167         ThreadTasks.cpp \
168         UploadBandwidthThrottler.cpp \
169         UploadClient.cpp \
170         UploadQueue.cpp \
171         kademlia/kademlia/Kademlia.cpp \
172         kademlia/kademlia/Prefs.cpp \
173         kademlia/kademlia/Search.cpp \
174         kademlia/kademlia/UDPFirewallTester.cpp \
175         kademlia/net/KademliaUDPListener.cpp \
176         kademlia/net/PacketTracking.cpp \
177         kademlia/routing/Contact.cpp \
178         kademlia/routing/RoutingZone.cpp
181 gui_sources = \
182         amule-gui.cpp \
183         amuleDlg.cpp \
184         AddFriend.cpp \
185         CatDialog.cpp \
186         ChatSelector.cpp \
187         ChatWnd.cpp \
188         CommentDialog.cpp \
189         CommentDialogLst.cpp \
190         GenericClientListCtrl.cpp \
191         ClientDetailDialog.cpp \
192         DirectoryTreeCtrl.cpp \
193         FileDetailDialog.cpp \
194         KadDlg.cpp \
195         OScopeCtrl.cpp \
196         PrefsUnifiedDlg.cpp \
197         SearchDlg.cpp \
198         ServerWnd.cpp \
199         SharedFilesWnd.cpp \
200         StatisticsDlg.cpp \
201         SearchListCtrl.cpp \
202         DownloadListCtrl.cpp \
203         SourceListCtrl.cpp \
204         SharedFilePeersListCtrl.cpp \
205         FriendListCtrl.cpp \
206         ServerListCtrl.cpp \
207         SharedFilesCtrl.cpp \
208         MuleTrayIcon.cpp \
209         TransferWnd.cpp
212 common_sources = \
213         amuleAppCommon.cpp \
214         ClientRef.cpp \
215         ECSpecialMuleTags.cpp \
216         KnownFile.cpp \
217         GetTickCount.cpp \
218         GuiEvents.cpp \
219         HTTPDownload.cpp \
220         Logger.cpp \
221         PartFile.cpp \
222         Preferences.cpp \
223         Proxy.cpp \
224         Server.cpp \
225         Statistics.cpp \
226         StatTree.cpp \
227         UserEvents.cpp
229 # Libs
231 core_libs = -L. -lmuleappcore $(LIBUPNP_LDFLAGS) $(LIBUPNP_LIBS)
232 gui_libs = -L. -lmuleappgui $(WX_LIBS) $(GEOIP_LDFLAGS) $(GEOIP_LIBS)
233 remote_common_libs = -Llibs/common -Llibs/ec/cpp -lmulecommon -lec $(BFD_LIBS) $(ZLIB_LDFLAGS) $(ZLIB_LIBS) $(RESOLV_LIB)
234 common_libs = -L. -lmuleappcommon $(remote_common_libs) -lmulesocket $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) $(CRYPTOPP_LDFLAGS) $(CRYPTOPP_LIBS)
236 core_deps = libmuleappcore.a
237 gui_deps = libmuleappgui.a
238 remote_common_deps = libs/common/libmulecommon.a libs/ec/cpp/libec.a
239 common_deps = libmuleappcommon.a $(remote_common_deps) libmulesocket.a
241 if SYS_WIN32
242 core_libs += -lshlwapi
243 endif
246 # Flags
248 core_flags = $(BOOST_CPPFLAGS) $(LIBUPNP_CPPFLAGS) $(LIBUPNP_CFLAGS)
249 gui_flags = $(WX_CPPFLAGS) $(GEOIP_CPPFLAGS)
250 common_flags = -I$(srcdir)/libs -Ilibs -I$(srcdir)/include $(CRYPTOPP_CPPFLAGS)
252 # --------- Apps ---------
254 amulegui_SOURCES = \
255         amule-remote-gui.cpp \
256         $(gui_sources) \
257         $(ec_sources) \
258         $(common_sources)
260 amule_SOURCES = \
261         CaptchaDialog.cpp \
262         CaptchaGenerator.cpp \
263         PartFileConvert.cpp \
264         PartFileConvertDlg.cpp \
265         $(core_sources) \
266         $(gui_sources) \
267         $(ec_sources) \
268         $(common_sources)
270 amuled_SOURCES = \
271         amuled.cpp \
272         $(core_sources) \
273         $(ec_sources) \
274         $(common_sources)
276 amule_DEPENDENCIES = $(common_deps) $(core_deps) $(gui_deps)
277 amule_CPPFLAGS = $(AM_CPPFLAGS) $(core_flags) $(gui_flags) $(common_flags)
278 amule_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CFLAGS_ONLY) $(WX_CPPFLAGS_ONLY)
279 amule_LDADD = $(common_libs) $(core_libs) $(gui_libs)
281 amulegui_DEPENDENCIES = $(common_deps) $(gui_deps)
282 amulegui_CPPFLAGS = $(AM_CPPFLAGS) $(gui_flags) $(common_flags) -DCLIENT_GUI
283 amulegui_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CFLAGS_ONLY) $(WX_CXXFLAGS_ONLY)
284 amulegui_LDADD = $(common_libs) $(gui_libs)
286 amuled_DEPENDENCIES = $(core_deps) $(common_deps)
287 amuled_CPPFLAGS = $(AM_CPPFLAGS) $(WXBASE_CPPFLAGS) $(core_flags) $(common_flags) -DAMULE_DAEMON
288 amuled_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CFLAGS_ONLY) $(WX_CXXFLAGS_ONLY)
289 amuled_LDADD = $(common_libs) $(core_libs) $(WXBASE_LIBS)
291 ed2k_SOURCES = \
292         ED2KLinkParser.cpp \
293         MagnetURI.cpp \
294         MuleCollection.cpp
296 ed2k_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_STD_STRING
298 # on Win32
299 if SYS_WIN32
300 ed2k_LDADD = -lshlwapi
301 endif
302 # on Mac
303 if NEED_CORESERVICES
304 ed2k_LDFLAGS = $(AM_LDFLAGS) -framework CoreServices
305 endif
307 amulecmd_SOURCES = \
308         TextClient.cpp \
309         DataToText.cpp \
310         ExternalConnector.cpp \
311         LoggerConsole.cpp \
312         OtherFunctions.cpp \
313         NetworkFunctions.cpp
315 amulecmd_DEPENDENCIES = $(remote_common_deps) libmulesocket.a
316 amulecmd_CPPFLAGS = $(AM_CPPFLAGS) $(WXBASE_CPPFLAGS) $(common_flags)
317 amulecmd_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CFLAGS_ONLY) $(WX_CXXFLAGS_ONLY)
318 #amulecmd_LDADD = $(WXBASE_LIBS) $(READLINE_LIBS) $(remote_common_libs)
319 amulecmd_LDADD = -Llibs/common -Llibs/ec/cpp -L. -lmulecommon -lec -lmulesocket \
320         $(WXBASE_LIBS) $(READLINE_LIBS) $(BFD_LIBS) $(ZLIB_LDFLAGS) $(ZLIB_LIBS) $(RESOLV_LIB) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS)
322 noinst_HEADERS = \
323                 AddFriend.h \
324                 AsyncDNS.h \
325                 amule-remote-gui.h \
326                 amuleDlg.h \
327                 amule.h \
328                 amuleIPV4Address.h \
329                 ArchSpecific.h \
330                 BarShader.h \
331                 BitVector.h \
332                 CanceledFileList.h \
333                 CaptchaDialog.h \
334                 CaptchaGenerator.h \
335                 CatDialog.h \
336                 CFile.h \
337                 ChatSelector.h \
338                 ChatWnd.h \
339                 ClientCredits.h \
340                 ClientCreditsList.h \
341                 ClientDetailDialog.h \
342                 ClientList.h \
343                 ClientRef.h \
344                 ClientTCPSocket.h \
345                 ClientUDPSocket.h \
346                 ColorFrameCtrl.h \
347                 CommentDialog.h \
348                 CommentDialogLst.h \
349                 CompilerSpecific.h \
350                 Constants.h \
351                 CorruptionBlackBox.h \
352                 CryptoPP_Inc.h \
353                 DataToText.h \
354                 DeadSourceList.h \
355                 DirectoryTreeCtrl.h \
356                 DownloadListCtrl.h \
357                 DownloadQueue.h \
358                 ED2KLink.h \
359                 EditServerListDlg.h \
360                 EMSocket.h \
361                 EncryptedDatagramSocket.h \
362                 EncryptedStreamSocket.h \
363                 ExternalConnector.h \
364                 ExternalConn.h \
365                 FileArea.h \
366                 FileAutoClose.h \
367                 FileDetailDialog.h \
368                 FileDetailListCtrl.h \
369                 FileLock.h \
370                 Friend.h \
371                 FriendListCtrl.h \
372                 FriendList.h \
373                 GapList.h \
374                 GetTickCount.h \
375                 GenericClientListCtrl.h \
376                 GuiEvents.h \
377                 HTTPDownload.h \
378                 inetdownload.h \
379                 InternalEvents.h \
380                 IP2Country.h \
381                 IPFilter.h \
382                 IPFilterScanner.h \
383                 KadDlg.h \
384                 KnownFile.h \
385                 KnownFileList.h \
386                 LibSocket.h \
387                 ListenSocket.h \
388                 Logger.h \
389                 MagnetURI.h \
390                 MD4Hash.h \
391                 MemFile.h \
392                 MuleCollection.h \
393                 MuleColour.h \
394                 MuleGifCtrl.h \
395                 MuleListCtrl.h \
396                 MuleNotebook.h \
397                 MuleTextCtrl.h \
398                 MuleThread.h \
399                 MuleTrayIcon.h \
400                 MuleUDPSocket.h \
401                 MuleVersion.h \
402                 muuli_wdr.h \
403                 NetworkFunctions.h \
404                 OScopeCtrl.h \
405                 Observable.h \
406                 ObservableQueue.h \
407                 OtherFunctions.h \
408                 OtherStructs.h \
409                 Packet.h \
410                 Parser.hpp \
411                 PartFileConvert.h \
412                 PartFileConvertDlg.h \
413                 PartFile.h \
414                 PlatformSpecific.h \
415                 Preferences.h \
416                 PrefsUnifiedDlg.h \
417                 Proxy.h \
418                 RangeMap.h \
419                 RC4Encrypt.h \
420                 RLE.h \
421                 RandomFunctions.h \
422                 SafeFile.h \
423                 Scanner.h \
424                 ScopedPtr.h \
425                 SearchDlg.h \
426                 SearchExpr.h \
427                 SearchFile.h \
428                 SearchListCtrl.h \
429                 SearchList.h \
430                 ServerConnect.h \
431                 Server.h \
432                 ServerListCtrl.h \
433                 ServerList.h \
434                 ServerSocket.h \
435                 ServerUDPSocket.h \
436                 ServerWnd.h \
437                 SHA.h \
438                 SHAHashSet.h \
439                 SharedFileList.h \
440                 SharedFilePeersListCtrl.h \
441                 SharedFilesCtrl.h \
442                 SharedFilesWnd.h \
443                 SourceListCtrl.h \
444                 StateMachine.h \
445                 StatisticsDlg.h \
446                 Statistics.h \
447                 StatTree.h \
448                 Tag.h \
449                 TerminationProcess.h \
450                 TerminationProcessAmuleweb.h \
451                 TextClient.h \
452                 ThreadScheduler.h \
453                 ThreadTasks.h \
454                 ThrottledSocket.h \
455                 Timer.h \
456                 TransferWnd.h \
457                 Types.h \
458                 updownclient.h \
459                 UpDownClientEC.h \
460                 UploadBandwidthThrottler.h \
461                 UploadQueue.h \
462                 UPnPBase.h \
463                 UPnPCompatibility.h \
464                 UserEvents.h \
465                 extern/wxWidgets/listctrl.h
467 MAINTAINERCLEANFILES = Makefile.in
470 # Resources
472 if NEED_RC
474 SUFFIXES = .rc
476 .rc.$(OBJEXT):
477         $(RC) $(MULERCFLAGS) -I$(top_srcdir) $(RCFLAGS) -O COFF -i "$<" -o "$@"
479 nodist_amuled_SOURCES = amuled-version.rc
480 nodist_amulecmd_SOURCES = amulecmd-version.rc
481 nodist_ed2k_SOURCES = ed2k-version.rc
482 amule_LDADD += amulerc.$(OBJEXT)
483 amule_DEPENDENCIES += amulerc.$(OBJEXT)
484 amulegui_LDADD += amuleguirc.$(OBJEXT)
485 amulegui_DEPENDENCIES += amuleguirc.$(OBJEXT)
487 amulerc.$(OBJEXT): $(srcdir)/../amule.rc amule-version.rc
488         cat $^ | \
489         ( \
490                 abs_builddir=`pwd` ; \
491                 abs_top_srcdir=`cd $(top_srcdir) ; pwd` ; \
492                 cd $(<D) ; \
493                 $(RC) $(MULERCFLAGS) -I$${abs_top_srcdir} $(RCFLAGS) -O COFF -o "$${abs_builddir}/$@" ; \
494         )
496 amuleguirc.$(OBJEXT): $(srcdir)/../amule.rc amulegui-version.rc
497         cat $^ | \
498         ( \
499                 abs_builddir=`pwd` ; \
500                 abs_top_srcdir=`cd $(top_srcdir) ; pwd` ; \
501                 cd $(<D) ; \
502                 $(RC) $(MULERCFLAGS) -I$${abs_top_srcdir} $(RCFLAGS) -O COFF -o "$${abs_builddir}/$@" ; \
503         )
505 amule-version.rc: $(top_builddir)/version.rc
506         @sed -e 's/VER_FILEDESCRIPTION_STR/"All-Platform P2P Client Based on eMule"/' \
507              -e 's/VER_INTERNALNAME_STR/"amule"/' \
508              -e 's/VER_ORIGINALFILENAME_STR/"amule$(EXEEXT)"/' "$<" > "$@"
510 amuled-version.rc: $(top_builddir)/version.rc
511         @sed -e 's/VER_FILEDESCRIPTION_STR/"aMule Daemon"/' \
512              -e 's/VER_INTERNALNAME_STR/"amuled"/' \
513              -e 's/VER_ORIGINALFILENAME_STR/"amuled$(EXEEXT)"/' "$<" > "$@"
515 amulecmd-version.rc: $(top_builddir)/version.rc
516         @sed -e 's/VER_FILEDESCRIPTION_STR/"aMule Text Client"/' \
517              -e 's/VER_INTERNALNAME_STR/"amulecmd"/' \
518              -e 's/VER_ORIGINALFILENAME_STR/"amulecmd$(EXEEXT)"/' "$<" > "$@"
520 amulegui-version.rc: $(top_builddir)/version.rc
521         @sed -e 's/VER_FILEDESCRIPTION_STR/"aMule Remote GUI (Experimental)"/' \
522              -e 's/VER_INTERNALNAME_STR/"amulegui"/' \
523              -e 's/VER_ORIGINALFILENAME_STR/"amulegui$(EXEEXT)"/' "$<" > "$@"
525 ed2k-version.rc: $(top_builddir)/version.rc
526         @sed -e 's/VER_FILEDESCRIPTION_STR/"ED2K Links Handler"/' \
527              -e 's/VER_INTERNALNAME_STR/"ed2k"/' \
528              -e 's/VER_ORIGINALFILENAME_STR/"ed2k$(EXEEXT)"/' "$<" > "$@"
530 CLEANFILES = *-version.rc
532 endif
535 EXTRA__DIST__SUBDIRS = include kademlia
536 include $(top_srcdir)/automake/dist-hook.am