1 | # Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> |
---|
2 | # |
---|
3 | # Copyright (C) 2008 Trinity <http://www.trinitycore.org/> |
---|
4 | # |
---|
5 | # This program is free software; you can redistribute it and/or modify |
---|
6 | # it under the terms of the GNU General Public License as published by |
---|
7 | # the Free Software Foundation; either version 2 of the License, or |
---|
8 | # (at your option) any later version. |
---|
9 | # |
---|
10 | # This program is distributed in the hope that it will be useful, |
---|
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | # GNU General Public License for more details. |
---|
14 | # |
---|
15 | # You should have received a copy of the GNU General Public License |
---|
16 | # along with this program; if not, write to the Free Software |
---|
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
18 | |
---|
19 | ## Process this file with automake to produce Makefile.in |
---|
20 | |
---|
21 | ## Build world list daemon as standalone program |
---|
22 | bin_PROGRAMS = trinity-core |
---|
23 | |
---|
24 | ## Preprocessor flags |
---|
25 | trinity_core_CPPFLAGS = \ |
---|
26 | $(MYSQL_INCLUDES) \ |
---|
27 | $(POSTGRE_INCLUDES) \ |
---|
28 | $(TRINI_INCLUDES) \ |
---|
29 | -I$(top_srcdir)/dep/include \ |
---|
30 | -I$(top_srcdir)/src/shared \ |
---|
31 | -I$(top_srcdir)/src/framework \ |
---|
32 | -I$(top_srcdir)/src/game \ |
---|
33 | -D_TRINITY_CORE_CONFIG='"$(sysconfdir)/trinitycore.conf"' |
---|
34 | |
---|
35 | ## Sources |
---|
36 | trinity_core_SOURCES = \ |
---|
37 | $(srcdir)/CliRunnable.cpp \ |
---|
38 | $(srcdir)/CliRunnable.h \ |
---|
39 | $(srcdir)/Main.cpp \ |
---|
40 | $(srcdir)/Master.cpp \ |
---|
41 | $(srcdir)/Master.h \ |
---|
42 | $(srcdir)/RASocket.cpp \ |
---|
43 | $(srcdir)/RASocket.h \ |
---|
44 | $(srcdir)/WorldRunnable.cpp \ |
---|
45 | $(srcdir)/WorldRunnable.h |
---|
46 | |
---|
47 | ## Convenience libs to add |
---|
48 | trinity_core_LDADD = \ |
---|
49 | $(top_builddir)/src/game/libgame.a \ |
---|
50 | $(top_builddir)/src/shared/libshared.a \ |
---|
51 | $(top_builddir)/src/shared/vmap/libvmaps.a \ |
---|
52 | $(top_builddir)/src/framework/libmangosframework.a \ |
---|
53 | $(top_builddir)/dep/src/sockets/libmangossockets.a \ |
---|
54 | $(top_builddir)/dep/src/zthread/libZThread.la \ |
---|
55 | $(top_builddir)/dep/src/g3dlite/libg3dlite.a |
---|
56 | |
---|
57 | if USE_TSCRIPTS |
---|
58 | trinity_core_LDADD += $(top_builddir)/src/bindings/scripts/libtrinityscript.la |
---|
59 | else |
---|
60 | trinity_core_LDADD += $(top_builddir)/src/bindings/interface/libtrinityscript.la |
---|
61 | endif |
---|
62 | |
---|
63 | ## Linker flags |
---|
64 | trinity_core_LDFLAGS = $(MYSQL_LIBS) $(POSTGRE_LIBS) $(ZLIB) $(COMPATLIB) $(SSLLIB) $(TRINI_LIBS) -export-dynamic |
---|
65 | |
---|
66 | ## Additional files to install |
---|
67 | sysconf_DATA = \ |
---|
68 | trinitycore.conf.dist |
---|
69 | |
---|
70 | EXTRA_DIST = \ |
---|
71 | trinitycore.conf.dist |
---|
72 | |
---|
73 | ## Prevend overwrite of the config file, if its already installed |
---|
74 | install-data-hook: |
---|
75 | @list='$(sysconf_DATA)'; for p in $$list; do \ |
---|
76 | dest=`echo $$p | sed -e s/.dist//`; \ |
---|
77 | if test -f $(DESTDIR)$(sysconfdir)/$$dest; then \ |
---|
78 | echo "$@ will not overwrite existing $(DESTDIR)$(sysconfdir)/$$dest"; \ |
---|
79 | else \ |
---|
80 | echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$dest"; \ |
---|
81 | $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(sysconfdir)/$$dest; \ |
---|
82 | fi; \ |
---|
83 | done |
---|
84 | |
---|
85 | |
---|