1 | # |
1 | # |
2 | # Makefile for crossfire 0.95.0 and beyond |
2 | # This file is part of Crossfire TRT, the Roguelike Realtime MORPG. |
|
|
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 |
|
|
9 | # it under the terms of the GNU General Public License as published by |
|
|
10 | # the Free Software Foundation, either version 3 of the License, or |
|
|
11 | # (at your option) any later version. |
|
|
12 | # |
|
|
13 | # This program is distributed in the hope that it will be useful, |
|
|
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
16 | # GNU General Public License for more details. |
|
|
17 | # |
|
|
18 | # You should have received a copy of the GNU General Public License |
|
|
19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
|
20 | # |
|
|
21 | # The authors can be reached via e-mail to <crossfire@schmorp.de> |
3 | # |
22 | # |
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 | |
23 | |
26 | pkgstatedir = @pkgstatedir@ |
24 | pkgstatedir = @pkgstatedir@ |
27 | pkgconfdir = @pkgconfdir@ |
25 | pkgconfdir = @pkgconfdir@ |
28 | |
26 | |
29 | dist_noinst_SCRIPTS = collect.pl util.pl checkarch.pl |
27 | nobase_dist_pkgdata_DATA = artifacts formulae races \ |
30 | dist_pkgdata_DATA = artifacts def_help formulae messages races smooth\ |
28 | attackmess materials cf.pm jeweler.yaml |
31 | animations archetypes bmaps bmaps.paths crossfire.0 \ |
|
|
32 | crossfire.1 faces attackmess image_info smooth materials regions cf.pm |
|
|
33 | |
29 | |
34 | CONF_FILES = settings motd dm_file forbid ban_file exp_table news rules |
30 | pmdir = $(pkgdatadir)/cf |
35 | VAR_FILES = highscore banish_file bookarch temp.maps clockdata |
31 | dist_pm_DATA = cf/pod.pm |
36 | EXTRA_DIST = README .collect-stamp $(CONF_FILES) treasures treasures.bld |
|
|
37 | |
32 | |
38 | helpdir=$(pkgdatadir)/help |
33 | admdir = $(pkgdatadir)/adm |
39 | dist_help_DATA = help/apply help/applymode \ |
34 | dist_adm_DATA = adm/map_info adm/map_expand.pl adm/mapslitter.pl adm/archsearch.pl adm/collect_images.pl |
40 | help/bind help/bowmode help/brace \ |
|
|
41 | help/cast help/drop help/dropall \ |
|
|
42 | help/follow help/golem help/invite \ |
|
|
43 | help/invoke help/keys help/killpets \ |
|
|
44 | help/listen \ |
|
|
45 | help/mark help/melee help/mode \ |
|
|
46 | help/mouse help/move \ |
|
|
47 | help/output \ |
|
|
48 | help/output-count help/output-sync \ |
|
|
49 | help/party help/peaceful \ |
|
|
50 | help/petmode help/pickup help/quests \ |
|
|
51 | help/quit help/range help/rename \ |
|
|
52 | help/save help/shout help/showpets \ |
|
|
53 | help/sort_inventory help/spells \ |
|
|
54 | help/statistics help/take help/traps \ |
|
|
55 | help/unbind help/usekeys \ |
|
|
56 | help/whereabouts |
|
|
57 | |
35 | |
58 | wizhelpdir=$(pkgdatadir)/wizhelp |
36 | CONF_FILES = settings motd dm_file exp_table news rules config |
59 | dist_wizhelp_DATA = wizhelp/abil wizhelp/addexp \ |
37 | VAR_FILES = highscore bookarch temp.maps |
60 | wizhelp/banish \ |
38 | EXTRA_DIST = README $(CONF_FILES) |
61 | wizhelp/create wizhelp/debug \ |
|
|
62 | wizhelp/dump wizhelp/dumpallarchtypes \ |
|
|
63 | wizhelp/dumpallmaps wizhelp/dumpallobjects \ |
|
|
64 | wizhelp/dumpbelow wizhelp/dumpfriendlyobjects \ |
|
|
65 | wizhelp/forget_spell wizhelp/free \ |
|
|
66 | wizhelp/goto wizhelp/hide wizhelp/insert_into \ |
|
|
67 | wizhelp/invisible \ |
|
|
68 | wizhelp/kick wizhelp/learn_special_prayer \ |
|
|
69 | wizhelp/learn_spell wizhelp/mon_aggr \ |
|
|
70 | wizhelp/nodm \ |
|
|
71 | wizhelp/nowiz wizhelp/overlay_save \ |
|
|
72 | wizhelp/patch wizhelp/plugin \ |
|
|
73 | wizhelp/pluglist wizhelp/plugout \ |
|
|
74 | wizhelp/possess \ |
|
|
75 | wizhelp/printlos wizhelp/remove \ |
|
|
76 | wizhelp/reset wizhelp/set_god \ |
|
|
77 | wizhelp/shutdown wizhelp/server_speed \ |
|
|
78 | wizhelp/spellreset wizhelp/ssdumptable wizhelp/stats \ |
|
|
79 | wizhelp/style_info wizhelp/summon \ |
|
|
80 | wizhelp/teleport wizhelp/time \ |
|
|
81 | wizhelp/toggle_shout \ |
|
|
82 | wizhelp/who wizhelp/wizcast wizhelp/wizhelp \ |
|
|
83 | wizhelp/wizpass |
|
|
84 | |
39 | |
85 | admdir=$(pkgdatadir)/adm |
40 | MAINTAINERCLEANFILES = Makefile.in |
86 | dist_adm_SCRIPTS = \ |
|
|
87 | adm/map_info adm/map_expand.pl adm/mapslitter.pl adm/archsearch.pl \ |
|
|
88 | adm/collect_images.pl |
|
|
89 | |
|
|
90 | MAINTAINERCLEANFILES = archetypes bmaps faces smooth .collect-stamp |
|
|
91 | |
41 | |
92 | PERL = @PERL@ |
42 | PERL = @PERL@ |
93 | |
43 | |
94 | crossfire.0: bmaps.paths |
44 | install-data-local: jeweler.yaml |
95 | $(PERL) $(srcdir)/adm/collect_images.pl -png |
|
|
96 | |
|
|
97 | .collect-stamp: |
|
|
98 | touch .collect-stamp |
|
|
99 | |
|
|
100 | collect: |
|
|
101 | $(PERL) -I$(srcdir) collect.pl $(srcdir)/arch |
|
|
102 | $(PERL) $(srcdir)/adm/collect_images.pl -png |
|
|
103 | |
|
|
104 | archonly: |
|
|
105 | $(PERL) -I$(srcdir) collect.pl $(srcdir)/arch ARCHONLY |
|
|
106 | |
|
|
107 | archetypes: .collect-stamp |
|
|
108 | make collect |
|
|
109 | |
|
|
110 | faces: .collect-stamp |
|
|
111 | make collect |
|
|
112 | |
|
|
113 | animations: .collect-stamp |
|
|
114 | make collect |
|
|
115 | |
|
|
116 | bmaps.paths bmaps: .collect-stamp |
|
|
117 | make collect |
|
|
118 | |
|
|
119 | smooth: .collect-stamp |
|
|
120 | make collect |
|
|
121 | |
|
|
122 | install-data-local: archetypes crossfire.0 faces animations collect.pl util.pl |
|
|
123 | @$(NORMAL_INSTALL) |
45 | @$(NORMAL_INSTALL) |
|
|
46 | $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgdatadir)/maps |
124 | $(mkinstalldirs) $(DESTDIR)$(pkgconfdir) |
47 | $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgconfdir) |
125 | for i in $(CONF_FILES); do \ |
48 | for i in $(CONF_FILES); do \ |
126 | if [ ! -f $(DESTDIR)$(pkgconfdir)/$$i ]; then \ |
49 | if [ ! -f $(DESTDIR)$(pkgconfdir)/$$i ]; then \ |
127 | echo "Installing $$i"; \ |
50 | echo "Installing $$i"; \ |
128 | $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgconfdir); \ |
51 | $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgconfdir); \ |
129 | fi \ |
52 | fi \ |
130 | done |
53 | done |
131 | |
|
|
132 | $(mkinstalldirs) $(DESTDIR)$(pkgstatedir) |
54 | $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgstatedir) |
133 | for i in $(VAR_FILES) ; do \ |
55 | for i in $(VAR_FILES) ; do \ |
134 | touch $(DESTDIR)$(pkgstatedir)/$$i ; \ |
56 | touch $(DESTDIR)$(pkgstatedir)/$$i ; \ |
135 | done |
57 | done |
136 | |
|
|
137 | @for i in datafiles players unique-items template-maps maps; do \ |
58 | @for i in datafiles players unique-items template-maps maps random db tmp; do \ |
138 | if [ ! -d $(DESTDIR)$(pkgstatedir)/$$i ]; then \ |
59 | if [ ! -d $(DESTDIR)$(pkgstatedir)/$$i ]; then \ |
139 | echo "Creating directory $(pkgstatedir)/$$i"; \ |
60 | echo "Creating directory $(pkgstatedir)/$$i"; \ |
140 | $(mkinstalldirs) $(DESTDIR)$(pkgstatedir)/$$i; \ |
61 | $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgstatedir)/$$i; \ |
141 | fi; \ |
62 | fi; \ |
142 | done |
63 | done |
143 | # Special case above because the name we install to is different |
|
|
144 | # than the name of the file |
|
|
145 | if [ ! -d $(DESTDIR)$(pkgdatadir)/$$i ]; then \ |
|
|
146 | echo "Creating directory $(pkgdatadir)/$$i"; \ |
|
|
147 | $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$$i; \ |
|
|
148 | fi; \ |
|
|
149 | $(INSTALL_DATA) $(srcdir)/treasures.bld $(DESTDIR)$(pkgdatadir)/treasures |
|
|
150 | |
|
|
151 | |
64 | |
152 | # Uninstall unchanged config/var files so make distcheck is happy |
65 | # Uninstall unchanged config/var files so make distcheck is happy |
153 | # but leave changed file, so no configuration/game state is lost |
66 | # but leave changed file, so no configuration/game state is lost |
154 | uninstall-local: |
67 | uninstall-local: |
155 | -for i in $(CONF_FILES); do \ |
68 | -for i in $(CONF_FILES); do \ |
… | |
… | |
162 | done |
75 | done |
163 | -for i in $(VAR_FILES) ; do \ |
76 | -for i in $(VAR_FILES) ; do \ |
164 | if test ! -f $(DESTDIR)$(pkgstatedir)/$$i ; then \ |
77 | if test ! -f $(DESTDIR)$(pkgstatedir)/$$i ; then \ |
165 | continue ;\ |
78 | continue ;\ |
166 | fi ; \ |
79 | fi ; \ |
167 | if test `wc -c $(DESTDIR)$(pkgstatedir)/$$i|$(AWK) '{ print $$1 }'` -eq "0" ; then \ |
80 | if ! [ -s "$(DESTDIR)$(pkgstatedir)/$$i" ] ; then \ |
168 | rm -f $(DESTDIR)$(pkgstatedir)/$$i ; \ |
81 | rm -f $(DESTDIR)$(pkgstatedir)/$$i ; \ |
169 | fi ; \ |
82 | fi ; \ |
170 | done |
83 | done |
171 | |
84 | |
172 | |
85 | |
173 | # This block makes the archive of the arch directory. |
|
|
174 | archive:: |
|
|
175 | $(AMTAR) -cvh --exclude=dev --exclude=CVS -f $(PACKAGE)-$(VERSION)-arch.tar arch |
|
|
176 | $(GZIP) -cv9 $(PACKAGE)-$(VERSION)-arch.tar > ../$(PACKAGE)-$(VERSION)-arch.tar.gz |
|
|
177 | $(BZIP) -cv --repetitive-best $(PACKAGE)-$(VERSION)-arch.tar > ../$(PACKAGE)-$(VERSION)-arch.tar.bz2 |
|
|
178 | $(RM) $(PACKAGE)-$(VERSION)-arch.tar |
|
|
179 | |
|
|
180 | libArch: |
|
|
181 | tar cvf A`perl puredate.pl`.tar arch treasures |
|
|
182 | gzip A`perl puredate.pl`.tar |
|
|