1 | # |
1 | # |
2 | # Makefile for crossfire 0.95.0 and beyond |
2 | # This file is part of Crossfire TRT, the Multiplayer Online Role Playing Game. |
|
|
3 | # |
|
|
4 | # Copyright (©) 2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team |
|
|
5 | # Copyright (©) 2001,2007 Mark Wedel & Crossfire Development Team |
|
|
6 | # Copyright (©) 1992,2007 Frank Tore Johansen |
|
|
7 | # |
|
|
8 | # Crossfire TRT is free software; you can redistribute it and/or modify it |
|
|
9 | # under the terms of the GNU General Public License as published by the Free |
|
|
10 | # Software Foundation; either version 2 of the License, or (at your option) |
|
|
11 | # any later version. |
|
|
12 | # |
|
|
13 | # This program is distributed in the hope that it will be useful, but |
|
|
14 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
|
|
15 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
|
16 | # for more details. |
|
|
17 | # |
|
|
18 | # You should have received a copy of the GNU General Public License along |
|
|
19 | # with Crossfire TRT; if not, write to the Free Software Foundation, Inc. 51 |
|
|
20 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
|
21 | # |
|
|
22 | # The authors can be reached via e-mail to <crossfire@schmorp.de> |
3 | # |
23 | # |
4 | # This file will eventually be replaced by a configure script. But for |
|
|
5 | # now, this simple makefile should do the job. |
|
|
6 | # |
|
|
7 | # Copyright (C) 2001 Mark Wedel & Crossfire Development Team |
|
|
8 | # Copyright (C) 1992 Frank Tore Johansen |
|
|
9 | # |
|
|
10 | # This program is free software; you can redistribute it and/or modify |
|
|
11 | # it under the terms of the GNU General Public License as published by |
|
|
12 | # the Free Software Foundation; either version 2 of the License, or |
|
|
13 | # (at your option) any later version. |
|
|
14 | # |
|
|
15 | # This program is distributed in the hope that it will be useful, |
|
|
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
18 | # GNU General Public License for more details. |
|
|
19 | # |
|
|
20 | # You should have received a copy of the GNU General Public License |
|
|
21 | # along with this program; if not, write to the Free Software |
|
|
22 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|
|
23 | # |
|
|
24 | # The authors can be reached via e-mail to crossfire-devel@real-time.com |
|
|
25 | |
24 | |
26 | pkgstatedir = @pkgstatedir@ |
25 | pkgstatedir = @pkgstatedir@ |
27 | pkgconfdir = @pkgconfdir@ |
26 | pkgconfdir = @pkgconfdir@ |
28 | |
27 | |
29 | dist_noinst_SCRIPTS = collect.pl util.pl checkarch.pl |
|
|
30 | dist_pkgdata_DATA = artifacts def_help formulae messages races \ |
28 | nobase_dist_pkgdata_DATA = artifacts def_help formulae races \ |
31 | animations archetypes bmaps bmaps.paths crossfire.0 \ |
|
|
32 | faces attackmess image_info smooth materials cf.pm jeweler.yaml |
29 | attackmess materials cf.pm jeweler.yaml |
33 | |
30 | |
34 | CONF_FILES = settings motd dm_file forbid ban_file exp_table news rules |
31 | pmdir = $(pkgdatadir)/cf |
35 | VAR_FILES = highscore banish_file bookarch temp.maps clockdata |
32 | dist_pm_DATA = cf/pod.pm |
36 | EXTRA_DIST = README .collect-stamp $(CONF_FILES) treasures.bld |
|
|
37 | |
33 | |
38 | wizhelpdir=$(pkgdatadir)/wizhelp |
34 | admdir = $(pkgdatadir)/adm |
39 | dist_wizhelp_DATA = wizhelp/abil wizhelp/addexp \ |
35 | dist_adm_DATA = adm/map_info adm/map_expand.pl adm/mapslitter.pl adm/archsearch.pl adm/collect_images.pl |
40 | wizhelp/banish \ |
|
|
41 | wizhelp/create wizhelp/debug \ |
|
|
42 | wizhelp/dump wizhelp/dumpallarchtypes \ |
|
|
43 | wizhelp/dumpallmaps wizhelp/dumpallobjects \ |
|
|
44 | wizhelp/dumpbelow wizhelp/dumpfriendlyobjects \ |
|
|
45 | wizhelp/forget_spell wizhelp/free \ |
|
|
46 | wizhelp/goto wizhelp/hide wizhelp/insert_into \ |
|
|
47 | wizhelp/invisible \ |
|
|
48 | wizhelp/kick wizhelp/learn_special_prayer \ |
|
|
49 | wizhelp/learn_spell wizhelp/mon_aggr \ |
|
|
50 | wizhelp/nodm \ |
|
|
51 | wizhelp/nowiz wizhelp/overlay_save \ |
|
|
52 | wizhelp/patch wizhelp/plugin \ |
|
|
53 | wizhelp/pluglist wizhelp/plugout \ |
|
|
54 | wizhelp/possess \ |
|
|
55 | wizhelp/printlos wizhelp/remove \ |
|
|
56 | wizhelp/reset wizhelp/set_god \ |
|
|
57 | wizhelp/shutdown wizhelp/server_speed \ |
|
|
58 | wizhelp/spellreset wizhelp/ssdumptable wizhelp/stats \ |
|
|
59 | wizhelp/style_info wizhelp/summon \ |
|
|
60 | wizhelp/teleport wizhelp/time \ |
|
|
61 | wizhelp/toggle_shout \ |
|
|
62 | wizhelp/who wizhelp/wizcast wizhelp/wizhelp \ |
|
|
63 | wizhelp/wizpass |
|
|
64 | |
36 | |
65 | admdir=$(pkgdatadir)/adm |
37 | CONF_FILES = settings motd dm_file forbid exp_table news rules config |
66 | dist_adm_SCRIPTS = \ |
38 | VAR_FILES = highscore bookarch temp.maps |
67 | adm/map_info adm/map_expand.pl adm/mapslitter.pl adm/archsearch.pl \ |
39 | EXTRA_DIST = README $(CONF_FILES) |
68 | adm/collect_images.pl |
|
|
69 | |
40 | |
70 | MAINTAINERCLEANFILES = animations archetypes bmaps bmaps.paths crossfire.0 faces treasures.bld smooth .collect-stamp Makefile.in |
41 | MAINTAINERCLEANFILES = Makefile.in |
71 | |
42 | |
72 | PERL = @PERL@ |
43 | PERL = @PERL@ |
73 | |
44 | |
74 | crossfire.0: bmaps.paths |
45 | install-data-local: jeweler.yaml |
75 | $(PERL) $(srcdir)/adm/collect_images.pl -png |
|
|
76 | |
|
|
77 | .collect-stamp: |
|
|
78 | touch .collect-stamp |
|
|
79 | |
|
|
80 | collect: |
|
|
81 | $(PERL) -I$(srcdir) collect.pl $(srcdir)/arch |
|
|
82 | $(PERL) $(srcdir)/adm/collect_images.pl -png |
|
|
83 | |
|
|
84 | archonly: |
|
|
85 | $(PERL) -I$(srcdir) collect.pl $(srcdir)/arch ARCHONLY |
|
|
86 | |
|
|
87 | archetypes: .collect-stamp |
|
|
88 | make collect |
|
|
89 | |
|
|
90 | faces: .collect-stamp |
|
|
91 | make collect |
|
|
92 | |
|
|
93 | animations: .collect-stamp |
|
|
94 | make collect |
|
|
95 | |
|
|
96 | bmaps.paths bmaps: .collect-stamp |
|
|
97 | make collect |
|
|
98 | |
|
|
99 | smooth: .collect-stamp |
|
|
100 | make collect |
|
|
101 | |
|
|
102 | install-data-local: archetypes crossfire.0 faces animations collect.pl util.pl jeweler.yaml |
|
|
103 | @$(NORMAL_INSTALL) |
46 | @$(NORMAL_INSTALL) |
|
|
47 | $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgdatadir)/maps |
104 | $(mkinstalldirs) $(DESTDIR)$(pkgconfdir) |
48 | $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgconfdir) |
105 | for i in $(CONF_FILES); do \ |
49 | for i in $(CONF_FILES); do \ |
106 | if [ ! -f $(DESTDIR)$(pkgconfdir)/$$i ]; then \ |
50 | if [ ! -f $(DESTDIR)$(pkgconfdir)/$$i ]; then \ |
107 | echo "Installing $$i"; \ |
51 | echo "Installing $$i"; \ |
108 | $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgconfdir); \ |
52 | $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgconfdir); \ |
109 | fi \ |
53 | fi \ |
110 | done |
54 | done |
111 | |
|
|
112 | $(mkinstalldirs) $(DESTDIR)$(pkgstatedir) |
55 | $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgstatedir) |
113 | for i in $(VAR_FILES) ; do \ |
56 | for i in $(VAR_FILES) ; do \ |
114 | touch $(DESTDIR)$(pkgstatedir)/$$i ; \ |
57 | touch $(DESTDIR)$(pkgstatedir)/$$i ; \ |
115 | done |
58 | done |
116 | |
|
|
117 | @for i in datafiles players unique-items template-maps maps; do \ |
59 | @for i in datafiles players unique-items template-maps maps random db tmp; do \ |
118 | if [ ! -d $(DESTDIR)$(pkgstatedir)/$$i ]; then \ |
60 | if [ ! -d $(DESTDIR)$(pkgstatedir)/$$i ]; then \ |
119 | echo "Creating directory $(pkgstatedir)/$$i"; \ |
61 | echo "Creating directory $(pkgstatedir)/$$i"; \ |
120 | $(mkinstalldirs) $(DESTDIR)$(pkgstatedir)/$$i; \ |
62 | $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgstatedir)/$$i; \ |
121 | fi; \ |
63 | fi; \ |
122 | done |
64 | done |
123 | # Special case above because the name we install to is different |
|
|
124 | # than the name of the file |
|
|
125 | if [ ! -d $(DESTDIR)$(pkgdatadir)/$$i ]; then \ |
|
|
126 | echo "Creating directory $(pkgdatadir)/$$i"; \ |
|
|
127 | $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$$i; \ |
|
|
128 | fi; \ |
|
|
129 | $(INSTALL_DATA) $(srcdir)/treasures.bld $(DESTDIR)$(pkgdatadir)/treasures |
|
|
130 | |
|
|
131 | |
65 | |
132 | # Uninstall unchanged config/var files so make distcheck is happy |
66 | # Uninstall unchanged config/var files so make distcheck is happy |
133 | # but leave changed file, so no configuration/game state is lost |
67 | # but leave changed file, so no configuration/game state is lost |
134 | uninstall-local: |
68 | uninstall-local: |
135 | -for i in $(CONF_FILES); do \ |
69 | -for i in $(CONF_FILES); do \ |
… | |
… | |
142 | done |
76 | done |
143 | -for i in $(VAR_FILES) ; do \ |
77 | -for i in $(VAR_FILES) ; do \ |
144 | if test ! -f $(DESTDIR)$(pkgstatedir)/$$i ; then \ |
78 | if test ! -f $(DESTDIR)$(pkgstatedir)/$$i ; then \ |
145 | continue ;\ |
79 | continue ;\ |
146 | fi ; \ |
80 | fi ; \ |
147 | if test `wc -c $(DESTDIR)$(pkgstatedir)/$$i|$(AWK) '{ print $$1 }'` -eq "0" ; then \ |
81 | if ! [ -s "$(DESTDIR)$(pkgstatedir)/$$i" ] ; then \ |
148 | rm -f $(DESTDIR)$(pkgstatedir)/$$i ; \ |
82 | rm -f $(DESTDIR)$(pkgstatedir)/$$i ; \ |
149 | fi ; \ |
83 | fi ; \ |
150 | done |
84 | done |
151 | |
85 | |
152 | |
86 | |
153 | # This block makes the archive of the arch directory. |
|
|
154 | archive:: |
|
|
155 | $(AMTAR) -cvh --exclude=dev --exclude=CVS -f $(PACKAGE)-$(VERSION)-arch.tar arch |
|
|
156 | $(GZIP) -cv9 $(PACKAGE)-$(VERSION)-arch.tar > ../$(PACKAGE)-$(VERSION)-arch.tar.gz |
|
|
157 | $(BZIP) -cv --repetitive-best $(PACKAGE)-$(VERSION)-arch.tar > ../$(PACKAGE)-$(VERSION)-arch.tar.bz2 |
|
|
158 | $(RM) $(PACKAGE)-$(VERSION)-arch.tar |
|
|
159 | |
|
|
160 | libArch: |
|
|
161 | tar cvf A`perl puredate.pl`.tar arch treasures |
|
|
162 | gzip A`perl puredate.pl`.tar |
|
|