1 |
root |
1.1 |
# |
2 |
|
|
# Makefile for crossfire 0.95.0 and beyond |
3 |
|
|
# |
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 |
root |
1.17 |
# The authors can be reached via e-mail to crossfire@schmorp.de |
25 |
root |
1.1 |
|
26 |
|
|
pkgstatedir = @pkgstatedir@ |
27 |
|
|
pkgconfdir = @pkgconfdir@ |
28 |
|
|
|
29 |
|
|
dist_noinst_SCRIPTS = collect.pl util.pl checkarch.pl |
30 |
pippijn |
1.9 |
dist_pkgdata_DATA = artifacts def_help formulae messages races \ |
31 |
root |
1.1 |
animations archetypes bmaps bmaps.paths crossfire.0 \ |
32 |
root |
1.21 |
faces attackmess image_info smooth materials cf.pm jeweler.yaml |
33 |
root |
1.1 |
|
34 |
pippijn |
1.19 |
CONF_FILES = settings motd dm_file forbid ban_file exp_table news rules config |
35 |
root |
1.1 |
VAR_FILES = highscore banish_file bookarch temp.maps clockdata |
36 |
root |
1.20 |
EXTRA_DIST = README .collect-stamp $(CONF_FILES) treasures.bld world.png |
37 |
root |
1.1 |
|
38 |
|
|
admdir=$(pkgdatadir)/adm |
39 |
|
|
dist_adm_SCRIPTS = \ |
40 |
|
|
adm/map_info adm/map_expand.pl adm/mapslitter.pl adm/archsearch.pl \ |
41 |
|
|
adm/collect_images.pl |
42 |
|
|
|
43 |
pippijn |
1.10 |
MAINTAINERCLEANFILES = animations archetypes bmaps bmaps.paths crossfire.0 faces treasures.bld smooth .collect-stamp Makefile.in |
44 |
root |
1.1 |
|
45 |
|
|
PERL = @PERL@ |
46 |
|
|
|
47 |
|
|
crossfire.0: bmaps.paths |
48 |
|
|
$(PERL) $(srcdir)/adm/collect_images.pl -png |
49 |
|
|
|
50 |
|
|
.collect-stamp: |
51 |
|
|
touch .collect-stamp |
52 |
|
|
|
53 |
|
|
collect: |
54 |
|
|
$(PERL) -I$(srcdir) collect.pl $(srcdir)/arch |
55 |
|
|
$(PERL) $(srcdir)/adm/collect_images.pl -png |
56 |
|
|
|
57 |
|
|
archonly: |
58 |
|
|
$(PERL) -I$(srcdir) collect.pl $(srcdir)/arch ARCHONLY |
59 |
|
|
|
60 |
|
|
archetypes: .collect-stamp |
61 |
|
|
make collect |
62 |
|
|
|
63 |
|
|
faces: .collect-stamp |
64 |
|
|
make collect |
65 |
|
|
|
66 |
|
|
animations: .collect-stamp |
67 |
|
|
make collect |
68 |
|
|
|
69 |
|
|
bmaps.paths bmaps: .collect-stamp |
70 |
|
|
make collect |
71 |
|
|
|
72 |
pippijn |
1.5 |
smooth: .collect-stamp |
73 |
|
|
make collect |
74 |
|
|
|
75 |
elmex |
1.14 |
install-data-local: archetypes crossfire.0 faces animations collect.pl util.pl jeweler.yaml |
76 |
root |
1.1 |
@$(NORMAL_INSTALL) |
77 |
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgconfdir) |
78 |
|
|
for i in $(CONF_FILES); do \ |
79 |
|
|
if [ ! -f $(DESTDIR)$(pkgconfdir)/$$i ]; then \ |
80 |
|
|
echo "Installing $$i"; \ |
81 |
|
|
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgconfdir); \ |
82 |
|
|
fi \ |
83 |
|
|
done |
84 |
|
|
|
85 |
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgstatedir) |
86 |
|
|
for i in $(VAR_FILES) ; do \ |
87 |
|
|
touch $(DESTDIR)$(pkgstatedir)/$$i ; \ |
88 |
|
|
done |
89 |
|
|
|
90 |
|
|
@for i in datafiles players unique-items template-maps maps; do \ |
91 |
|
|
if [ ! -d $(DESTDIR)$(pkgstatedir)/$$i ]; then \ |
92 |
|
|
echo "Creating directory $(pkgstatedir)/$$i"; \ |
93 |
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgstatedir)/$$i; \ |
94 |
|
|
fi; \ |
95 |
|
|
done |
96 |
|
|
# Special case above because the name we install to is different |
97 |
|
|
# than the name of the file |
98 |
|
|
if [ ! -d $(DESTDIR)$(pkgdatadir)/$$i ]; then \ |
99 |
|
|
echo "Creating directory $(pkgdatadir)/$$i"; \ |
100 |
|
|
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$$i; \ |
101 |
|
|
fi; \ |
102 |
|
|
$(INSTALL_DATA) $(srcdir)/treasures.bld $(DESTDIR)$(pkgdatadir)/treasures |
103 |
|
|
|
104 |
|
|
|
105 |
|
|
# Uninstall unchanged config/var files so make distcheck is happy |
106 |
|
|
# but leave changed file, so no configuration/game state is lost |
107 |
|
|
uninstall-local: |
108 |
|
|
-for i in $(CONF_FILES); do \ |
109 |
|
|
if test ! -f $(DESTDIR)$(pkgconfdir)/$$i ; then \ |
110 |
|
|
continue ; \ |
111 |
|
|
fi ; \ |
112 |
|
|
if diff -q $(srcdir)/$$i $(DESTDIR)$(pkgconfdir)/$$i ; then \ |
113 |
|
|
rm -f $(DESTDIR)$(pkgconfdir)/$$i ; \ |
114 |
|
|
fi ; \ |
115 |
|
|
done |
116 |
|
|
-for i in $(VAR_FILES) ; do \ |
117 |
|
|
if test ! -f $(DESTDIR)$(pkgstatedir)/$$i ; then \ |
118 |
|
|
continue ;\ |
119 |
|
|
fi ; \ |
120 |
root |
1.18 |
if ! [ -s "$(DESTDIR)$(pkgstatedir)/$$i" ] ; then \ |
121 |
root |
1.1 |
rm -f $(DESTDIR)$(pkgstatedir)/$$i ; \ |
122 |
|
|
fi ; \ |
123 |
|
|
done |
124 |
|
|
|
125 |
|
|
|
126 |
|
|
# This block makes the archive of the arch directory. |
127 |
|
|
archive:: |
128 |
|
|
$(AMTAR) -cvh --exclude=dev --exclude=CVS -f $(PACKAGE)-$(VERSION)-arch.tar arch |
129 |
|
|
$(GZIP) -cv9 $(PACKAGE)-$(VERSION)-arch.tar > ../$(PACKAGE)-$(VERSION)-arch.tar.gz |
130 |
|
|
$(BZIP) -cv --repetitive-best $(PACKAGE)-$(VERSION)-arch.tar > ../$(PACKAGE)-$(VERSION)-arch.tar.bz2 |
131 |
|
|
$(RM) $(PACKAGE)-$(VERSION)-arch.tar |
132 |
|
|
|
133 |
|
|
libArch: |
134 |
|
|
tar cvf A`perl puredate.pl`.tar arch treasures |
135 |
|
|
gzip A`perl puredate.pl`.tar |