root/1.8.3/branches/devel/Makefile.in

Revision 1298, 7.0 KB (checked in by shawnw, 3 months ago)

Update devel branch to p7

Line 
1# Makefile for PennMUSH
2
3# - System configuration - #
4
5VERSION=1.8.3
6PATCHLEVEL=7
7
8#
9# This section of the file should be automatically configured by
10# the Configure script. If it doesn't work, you might try starting
11# from the Makefile.old that's included instead, and reporting
12# your problem (including this Makefile) to pennmush-bugs@pennmush.org
13#
14# If you want to profile the code, add -pg -a -DPROFILING to CCFLAGS
15# and (probably) remove -O
16#
17MAKE=@MAKE@
18CC=@CC@
19
20SQL_CFLAGS=@MYSQL_CFLAGS@ @POSTGRESQL_CFLAGS@ @SQLITE3_CFLAGS@
21SQL_LDFLAGS=@MYSQL_LDFLAGS@ @POSTGRESQL_LDFLAGS@ @SQLITE3_LDFLAGS@
22
23CCFLAGS=@CFLAGS@ -I.. -I../hdrs @CPPFLAGS@ @PCRE_CFLAGS@
24LDFLAGS=@LDFLAGS@
25CLIBS=@LIBS@ @PCRE_LIBS@
26INSTALL=@INSTALL@
27INSTALLDIR=$installdir
28CP=@CP@
29CHMOD=@CHMOD@
30INSTALL_LINKS=@LN_S@ ../src/netmud netmush; @LN_S@ ../src/info_slave info_slave
31
32# stupid SYS V shell
33SHELL=/bin/sh
34# Where to install with 'make globalinstall'
35GLOBAL_INSTALL=@libexecdir@
36
37all: config.h options.h autogen game/mush.cnf
38    @echo "Making all in src."
39    (cd src; @MAKE@ all "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
40    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" "MAKE=$(MAKE)" \
41    "MAKEFLAGS=$(MAKEFLAGS)" "SQL_CFLAGS=$(SQL_CFLAGS)" \
42    "SQL_LDFLAGS=$(SQL_LDFLAGS)")
43    @echo "If the make was successful, use 'make install' to install links."
44
45config.h: configure
46    @echo "Looks like your configure has been updated."
47    @echo "Run that first. If you did just run configure and"
48    @echo "it said that config.h was unchanged, 'touch config.h'"
49    @echo "to suppress this message and continue compiling."
50    @exit 1
51
52options.h: options.h.dist
53    @echo "Please use 'make update' to update your options.h file from options.h.dist"
54    @echo "You must cp options.h.dist to options.h and edit it."
55    @exit 1
56
57autogen: hdrs/cmds.h hdrs/funs.h hdrs/switches.h
58
59hdrs/cmds.h: src/cmds.c src/command.c src/cque.c src/help.c src/set.c src/sql.c Patchlevel
60    @PERL@ utils/mkcmds.pl commands
61
62hdrs/switches.h: src/SWITCHES Patchlevel
63    @PERL@ utils/mkcmds.pl switches
64
65src/switchinc.c: src/SWITCHES Patchlevel
66    @PERL@ utils/mkcmds.pl switches
67
68hdrs/funs.h: src/fun*.c src/bsd.c src/conf.c src/extmail.c src/help.c src/markup.c src/wiz.c src/sql.c Patchlevel
69    @PERL@ utils/mkcmds.pl functions
70
71hdrs/patches.h: patches/*
72    @PERL@ utils/mkcmds.pl patches
73
74install: localized all
75    -rm -f game/netmush
76    -rm -f game/info_slave
77    (cd game; $(INSTALL_LINKS))
78    (cd game/txt; make)
79    @echo "If you plan to run multiple MUSHes, consider running 'make customize'"
80
81netmud:
82    (cd src; make netmud "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
83    "SQL_CFLAGS=$(SQL_CFLAGS)" "SQL_LDFLAGS=$(SQL_LDFLAGS)" \
84    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
85
86access:
87    utils/make_access_cnf.sh game
88
89pennmush.pot:
90    (cd src; make ../po/pennmush.pot)
91
92localized:
93    -echo "Localizing for your locale..."
94    -(cd po; make localized)
95
96portmsg:
97    (cd src; make portmsg "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
98    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
99
100ssl_slave:
101    (cd src; make ssl_slave "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
102    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" "MAKE=$(MAKE)" \
103    "MAKEFLAGS=$(MAKEFLAGS)")
104
105versions: CHANGES*
106    -@rm -rf CHANGES*~ CHANGES*bak
107    @utils/mkvershlp.pl game/txt/hlp CHANGES*
108
109safety:
110    $(CP) src/*.c /var/pennmush-bak/src
111    $(CP) hdrs/*.h /var/pennmush-bak/hdrs
112    $(CP) * /var/pennmush-bak
113
114distdepend: hdrs/funs.h hdrs/cmds.h
115    (cd src; @MAKE@ depend "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
116    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
117
118local-files:
119    $(CP) -f src/cmdlocal.dst src/cmdlocal.c
120    $(CP) -f src/flaglocal.dst src/flaglocal.c
121    $(CP) -f src/funlocal.dst src/funlocal.c
122    $(CP) -f src/local.dst src/local.c
123
124# REQUIRES GNU INDENT! DON'T INDENT WITH ANYTHING ELSE!
125indent:
126    @(cd src; make indent)
127
128customize: update-conf
129    -@@PERL@ utils/customize.pl
130
131# The default place to find the runtime files is in this directory,
132# but it can be overridden with env variables so people can use
133# other game directories.
134GAMEDIR=game
135
136update-conf: game/mushcnf.dst game/aliascnf.dst game/restrictcnf.dst game/namescnf.dst
137    -@@TOUCH@ game/mushcnf.dst
138    -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/mush.cnf game/mushcnf.dst
139    -@@TOUCH@ game/aliascnf.dst
140    -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/alias.cnf game/aliascnf.dst
141    -@@TOUCH@ game/restrictcnf.dst
142    -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/restrict.cnf game/restrictcnf.dst
143    -@if [ ! -f $(GAMEDIR)/names.cnf ]; then $(CP) game/namescnf.dst $(GAMEDIR)/names.cnf; fi
144
145$(GAMEDIR)/alias.cnf: game/aliascnf.dst
146    -@@TOUCH@ game/aliascnf.dst
147    -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/alias.cnf game/aliascnf.dst
148
149$(GAMEDIR)/restrict.cnf: game/restrictcnf.dst
150    -@@TOUCH@ game/restrictcnf.dst
151    -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/restrict.cnf game/restrictcnf.dst
152
153$(GAMEDIR)/names.cnf: game/namescnf.dst
154    if [ ! -f game/names.cnf ]; then \
155        $(CP) game/namescnf.dst $(GAMEDIR)/names.cnf \
156    fi
157
158$(GAMEDIR)/mush.cnf: game/mushcnf.dst
159    -@@TOUCH@ game/mushcnf.dst
160    -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/mush.cnf game/mushcnf.dst
161
162update: update-hdr update-conf
163
164update-hdr:
165    -@@TOUCH@ options.h.dist
166    -@sleep 2
167    -@@PERL@ utils/update.pl options.h options.h.dist
168
169test: netmud
170    (cd test; @PERL@ alltests.pl)
171
172clean:
173    (cd src; make clean)
174    (cd game; rm -f netmush info_slave)
175
176distclean:
177    (cd hdrs; rm -f *.orig *~ \#* *.rej *.bak funs.h cmds.h buildinf.h patches.h)
178    (cd utils; rm -f *.orig *~ \#* *.rej *.bak mkcmds.sh *.o)
179    (cd game; rm -rf *.log netmush info_slave *.orig *.rej *~ *.bak mush.cnf)
180    (cd src; make distclean; rm -f Makefile)
181    (cd game/txt; make clean)
182    (rm -rf .config Makefile config.h config.sh options.h)
183
184totallyclean: distclean
185    (cd hdrs; rm -rf *.rej)
186    (cd src; rm -rf *.rej)
187    -rm -f Makefile
188
189diffs:
190    @make indent > /dev/null 2>&1
191    @make versions > /dev/null 2>&1
192    @make touchswitches > /dev/null 2>&1
193    @make autogen > /dev/null 2>&1
194    @(prcs diff -r$(VS) -N pennmush `cat MANIFEST` | grep -v 'Index:')
195
196commit: indent
197    @svn commit
198
199patch: versions
200    @make-patch-header
201    @make diffs
202
203etags:
204    (cd src; make etags)
205
206ctags:
207    (cd src; make ctags)
208
209touchswitches:
210    @@TOUCH@ src/SWITCHES
211
212dist.tar:
213    svn checkout svn+ssh://svn.pennmush.org/svn/pennmush/$(VERSION)/trunk
214    sed -e "s#^#pennmush-$(VERSION)p$(PATCHLEVEL)/#" < trunk/MANIFEST \
215        > DISTFILES
216    mv -f trunk pennmush-$(VERSION)p$(PATCHLEVEL)
217    tar -cvf dist.tar --files-from=DISTFILES
218    -gpg -sb /tmp/dist.tar
219    bzip2 -k /tmp/dist.tar
220    openssl dgst -sha1 -out /tmp/dist.tar.bz2.sha1 /tmp/dist.tar.bz2
221    gzip -k /tmp/dist.tar
222    openssl dgst -sha1 -out /tmp/dist.tar.gz.sha1 /tmp/dist.tar.gz
223    -rm -rf pennmush-$(VERSION)p$(PATCHLEVEL) DISTFILES
224
225globalinstall: install
226    (cd game/txt; make clean compose.sh)
227#   $(INSTALLDIR) $(GLOBAL_INSTALL)
228    $(CP) -R game/* $(GLOBAL_INSTALL)
229    rm -f $(GLOBAL_INSTALL)/netmush $(GLOBAL_INSTALL)/info_slave
230    $(INSTALL) config.sh $(GLOBAL_INSTALL)/config.sh
231    $(INSTALL) src/netmud $(GLOBAL_INSTALL)/netmush
232    $(INSTALL) src/info_slave utils/ln-dir.sh $(GLOBAL_INSTALL)
233    $(CHMOD) a+rX -R $(GLOBAL_INSTALL)
234    @echo "** Files installed in $(GLOBAL_INSTALL). Feel free to move them."
235    @echo "** You can run $(GLOBAL_INSTALL)/ln-dir.sh to create a user directory,"
236    @echo "** or symlink that to somewhere easier to run. You may wish to strip them."
Note: See TracBrowser for help on using the browser.