1 | # |
1 | # Copyright (C) 2007 Marc Alexander Lehmann |
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 |
2 | # Copyright (C) 2001 Mark Wedel & Crossfire Development Team |
8 | # Copyright (C) 1992 Frank Tore Johansen |
3 | # Copyright (C) 1992 Frank Tore Johansen |
9 | # |
4 | # |
10 | # This program is free software; you can redistribute it and/or modify |
5 | # 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 |
6 | # it under the terms of the GNU General Public License as published by |
… | |
… | |
19 | # |
14 | # |
20 | # You should have received a copy of the GNU General Public License |
15 | # You should have received a copy of the GNU General Public License |
21 | # along with this program; if not, write to the Free Software |
16 | # along with this program; if not, write to the Free Software |
22 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
23 | # |
18 | # |
24 | # The authors can be reached via e-mail to crossfire-devel@real-time.com |
19 | # The authors can be reached via e-mail to crossfire@schmorp.de |
25 | |
20 | |
26 | pkgstatedir = @pkgstatedir@ |
21 | pkgstatedir = @pkgstatedir@ |
27 | pkgconfdir = @pkgconfdir@ |
22 | pkgconfdir = @pkgconfdir@ |
28 | |
23 | |
29 | dist_noinst_SCRIPTS = collect.pl util.pl checkarch.pl |
24 | dist_noinst_SCRIPTS = collect.pl util.pl checkarch.pl |
30 | dist_pkgdata_DATA = artifacts def_help formulae messages races smooth\ |
25 | nobase_dist_pkgdata_DATA = artifacts def_help formulae messages races \ |
31 | animations archetypes bmaps bmaps.paths crossfire.0 \ |
26 | animations archetypes bmaps bmaps.paths crossfire.0 \ |
32 | faces attackmess image_info smooth materials regions cf.pm |
27 | faces attackmess image_info smooth materials cf.pm jeweler.yaml |
33 | |
28 | |
34 | CONF_FILES = settings motd dm_file forbid ban_file exp_table news rules |
29 | pmdir = $(pkgdatadir)/cf |
35 | VAR_FILES = highscore banish_file bookarch temp.maps clockdata |
30 | dist_pm_DATA = cf/pod.pm |
36 | EXTRA_DIST = README .collect-stamp $(CONF_FILES) treasures treasures.bld |
|
|
37 | |
31 | |
38 | helpdir=$(pkgdatadir)/help |
32 | admdir = $(pkgdatadir)/adm |
39 | dist_help_DATA = \ |
33 | dist_adm_DATA = adm/map_info adm/map_expand.pl adm/mapslitter.pl adm/archsearch.pl adm/collect_images.pl |
40 | help/apply help/applymode help/bind \ |
|
|
41 | help/bowmode help/brace help/cast \ |
|
|
42 | help/chat help/drop help/dropall \ |
|
|
43 | help/follow help/golem help/ignore \ |
|
|
44 | help/invite help/invoke help/keys \ |
|
|
45 | help/killpets help/listen help/mark \ |
|
|
46 | help/melee help/mode help/mouse \ |
|
|
47 | help/move help/output help/output-count \ |
|
|
48 | help/output-sync help/party help/peaceful \ |
|
|
49 | help/petmode help/pickup help/quests \ |
|
|
50 | help/quit help/range \ |
|
|
51 | help/rename help/reply help/save \ |
|
|
52 | help/shout help/showpets help/sort_inventory \ |
|
|
53 | help/spells help/statistics help/take \ |
|
|
54 | help/tell help/traps help/unbind \ |
|
|
55 | help/unignore help/usekeys help/whereabouts |
|
|
56 | |
34 | |
57 | wizhelpdir=$(pkgdatadir)/wizhelp |
35 | CONF_FILES = settings motd dm_file forbid exp_table news rules config |
58 | dist_wizhelp_DATA = wizhelp/abil wizhelp/addexp \ |
36 | VAR_FILES = highscore bookarch temp.maps clockdata |
59 | wizhelp/banish \ |
37 | EXTRA_DIST = README .collect-stamp $(CONF_FILES) treasures.bld |
60 | wizhelp/create wizhelp/debug \ |
|
|
61 | wizhelp/dump wizhelp/dumpallarchtypes \ |
|
|
62 | wizhelp/dumpallmaps wizhelp/dumpallobjects \ |
|
|
63 | wizhelp/dumpbelow wizhelp/dumpfriendlyobjects \ |
|
|
64 | wizhelp/forget_spell wizhelp/free \ |
|
|
65 | wizhelp/goto wizhelp/hide wizhelp/insert_into \ |
|
|
66 | wizhelp/invisible \ |
|
|
67 | wizhelp/kick wizhelp/learn_special_prayer \ |
|
|
68 | wizhelp/learn_spell wizhelp/mon_aggr \ |
|
|
69 | wizhelp/nodm \ |
|
|
70 | wizhelp/nowiz wizhelp/overlay_save \ |
|
|
71 | wizhelp/patch wizhelp/plugin \ |
|
|
72 | wizhelp/pluglist wizhelp/plugout \ |
|
|
73 | wizhelp/possess \ |
|
|
74 | wizhelp/printlos wizhelp/remove \ |
|
|
75 | wizhelp/reset wizhelp/set_god \ |
|
|
76 | wizhelp/shutdown wizhelp/server_speed \ |
|
|
77 | wizhelp/spellreset wizhelp/ssdumptable wizhelp/stats \ |
|
|
78 | wizhelp/style_info wizhelp/summon \ |
|
|
79 | wizhelp/teleport wizhelp/time \ |
|
|
80 | wizhelp/toggle_shout \ |
|
|
81 | wizhelp/who wizhelp/wizcast wizhelp/wizhelp \ |
|
|
82 | wizhelp/wizpass |
|
|
83 | |
38 | |
84 | admdir=$(pkgdatadir)/adm |
39 | MAINTAINERCLEANFILES = animations archetypes bmaps bmaps.paths crossfire.0 faces treasures.bld smooth .collect-stamp Makefile.in |
85 | dist_adm_SCRIPTS = \ |
|
|
86 | adm/map_info adm/map_expand.pl adm/mapslitter.pl adm/archsearch.pl \ |
|
|
87 | adm/collect_images.pl |
|
|
88 | |
|
|
89 | MAINTAINERCLEANFILES = archetypes bmaps faces smooth .collect-stamp |
|
|
90 | |
40 | |
91 | PERL = @PERL@ |
41 | PERL = @PERL@ |
92 | |
42 | |
93 | crossfire.0: bmaps.paths |
43 | crossfire.0: bmaps.paths |
94 | $(PERL) $(srcdir)/adm/collect_images.pl -png |
44 | $(PERL) $(srcdir)/adm/collect_images.pl -png |
… | |
… | |
116 | make collect |
66 | make collect |
117 | |
67 | |
118 | smooth: .collect-stamp |
68 | smooth: .collect-stamp |
119 | make collect |
69 | make collect |
120 | |
70 | |
121 | install-data-local: archetypes crossfire.0 faces animations collect.pl util.pl |
71 | install-data-local: archetypes crossfire.0 faces animations collect.pl util.pl jeweler.yaml |
122 | @$(NORMAL_INSTALL) |
72 | @$(NORMAL_INSTALL) |
123 | $(mkinstalldirs) $(DESTDIR)$(pkgconfdir) |
|
|
124 | for i in $(CONF_FILES); do \ |
73 | for i in $(CONF_FILES); do \ |
125 | if [ ! -f $(DESTDIR)$(pkgconfdir)/$$i ]; then \ |
74 | if [ ! -f $(DESTDIR)$(pkgconfdir)/$$i ]; then \ |
126 | echo "Installing $$i"; \ |
75 | echo "Installing $$i"; \ |
127 | $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgconfdir); \ |
76 | $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgconfdir); \ |
128 | fi \ |
77 | fi \ |
129 | done |
78 | done |
130 | |
|
|
131 | $(mkinstalldirs) $(DESTDIR)$(pkgstatedir) |
79 | $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgstatedir) |
132 | for i in $(VAR_FILES) ; do \ |
80 | for i in $(VAR_FILES) ; do \ |
133 | touch $(DESTDIR)$(pkgstatedir)/$$i ; \ |
81 | touch $(DESTDIR)$(pkgstatedir)/$$i ; \ |
134 | done |
82 | done |
135 | |
|
|
136 | @for i in datafiles players unique-items template-maps maps; do \ |
83 | @for i in datafiles players unique-items template-maps maps random db tmp; do \ |
137 | if [ ! -d $(DESTDIR)$(pkgstatedir)/$$i ]; then \ |
84 | if [ ! -d $(DESTDIR)$(pkgstatedir)/$$i ]; then \ |
138 | echo "Creating directory $(pkgstatedir)/$$i"; \ |
85 | echo "Creating directory $(pkgstatedir)/$$i"; \ |
139 | $(mkinstalldirs) $(DESTDIR)$(pkgstatedir)/$$i; \ |
86 | $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgstatedir)/$$i; \ |
140 | fi; \ |
87 | fi; \ |
141 | done |
88 | done |
142 | # Special case above because the name we install to is different |
|
|
143 | # than the name of the file |
|
|
144 | if [ ! -d $(DESTDIR)$(pkgdatadir)/$$i ]; then \ |
|
|
145 | echo "Creating directory $(pkgdatadir)/$$i"; \ |
|
|
146 | $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$$i; \ |
|
|
147 | fi; \ |
|
|
148 | $(INSTALL_DATA) $(srcdir)/treasures.bld $(DESTDIR)$(pkgdatadir)/treasures |
89 | $(INSTALL_DATA) $(srcdir)/treasures.bld $(DESTDIR)$(pkgdatadir)/treasures |
149 | |
|
|
150 | |
90 | |
151 | # Uninstall unchanged config/var files so make distcheck is happy |
91 | # Uninstall unchanged config/var files so make distcheck is happy |
152 | # but leave changed file, so no configuration/game state is lost |
92 | # but leave changed file, so no configuration/game state is lost |
153 | uninstall-local: |
93 | uninstall-local: |
154 | -for i in $(CONF_FILES); do \ |
94 | -for i in $(CONF_FILES); do \ |
… | |
… | |
161 | done |
101 | done |
162 | -for i in $(VAR_FILES) ; do \ |
102 | -for i in $(VAR_FILES) ; do \ |
163 | if test ! -f $(DESTDIR)$(pkgstatedir)/$$i ; then \ |
103 | if test ! -f $(DESTDIR)$(pkgstatedir)/$$i ; then \ |
164 | continue ;\ |
104 | continue ;\ |
165 | fi ; \ |
105 | fi ; \ |
166 | if test `wc -c $(DESTDIR)$(pkgstatedir)/$$i|$(AWK) '{ print $$1 }'` -eq "0" ; then \ |
106 | if ! [ -s "$(DESTDIR)$(pkgstatedir)/$$i" ] ; then \ |
167 | rm -f $(DESTDIR)$(pkgstatedir)/$$i ; \ |
107 | rm -f $(DESTDIR)$(pkgstatedir)/$$i ; \ |
168 | fi ; \ |
108 | fi ; \ |
169 | done |
109 | done |
170 | |
110 | |
171 | |
111 | |