root/1.8.3/branches/autoconf/Makefile.in

Revision 742, 7.2 KB (checked in by shawnw, 21 months ago)

autoconf: #7258: sqlite3 support

Line 
1# Makefile for PennMUSH
2
3# - System configuration - #
4
5#
6# This section of the file should be automatically configured by
7# the Configure script. If it doesn't work, you might try starting
8# from the Makefile.old that's included instead, and reporting
9# your problem (including this Makefile) to pennmush-bugs@pennmush.org
10#
11# If you want to profile the code, add -pg -a -DPROFILING to CCFLAGS
12# and (probably) remove -O
13#
14MAKE=@MAKE@
15CC=@CC@
16
17SQL_CFLAGS=@MYSQL_CFLAGS@ @POSTGRESQL_CFLAGS@ @SQLITE3_CFLAGS@
18SQL_LDFLAGS=@MYSQL_LDFLAGS@ @POSTGRESQL_LDFLAGS@ @SQLITE3_LDFLAGS@
19
20CCFLAGS=@CFLAGS@ $(SQL_CFLAGS) -I.. -I../hdrs
21LDFLAGS=@LDFLAGS@ $(SQL_LDFLAGS)
22CLIBS=@LIBS@
23INSTALL=@INSTALL@
24INSTALLDIR=$installdir
25CP=@CP@
26CHMOD=@CHMOD@
27INSTALL_LINKS=@LN_S@ ../src/netmud netmush; @LN_S@ ../src/info_slave info_slave
28
29# stupid SYS V shell
30SHELL=/bin/sh
31# Where to install with 'make globalinstall'
32GLOBAL_INSTALL=@libexecdir@
33
34all: config.h options.h autogen game/mush.cnf
35    @echo "Making all in src."
36    (cd src; @MAKE@ all "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
37    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" "MAKE=$(MAKE)" \
38    "MAKEFLAGS=$(MAKEFLAGS)")
39    @echo "If the make was successful, use 'make install' to install links."
40
41config.h: configure
42    @echo "Looks like your configure has been updated."
43    @echo "Run that first."
44    exit 1
45
46options.h: options.h.dist
47    @echo "Please use 'make update' to update your options.h file from options.h.dist"
48    @echo "You must cp options.h.dist to options.h and edit it."
49    exit 1
50
51autogen: hdrs/cmds.h hdrs/funs.h hdrs/switches.h
52
53hdrs/cmds.h: src/cmds.c src/command.c src/cque.c src/help.c src/set.c src/sql.c Patchlevel
54    (cd utils; sh mkcmds.sh commands)
55
56hdrs/switches.h: src/SWITCHES Patchlevel
57    (cd utils; sh mkcmds.sh switches)
58
59src/switchinc.c: src/SWITCHES Patchlevel
60    (cd utils; sh mkcmds.sh switches)
61
62hdrs/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
63    (cd utils; sh mkcmds.sh functions)
64
65hdrs/patches.h: patches/*
66    (cd utils; sh mkcmds.sh patches)
67
68install: localized all
69    -rm -f game/netmush
70    -rm -f game/info_slave
71    (cd game; $(INSTALL_LINKS))
72    (cd game/txt; make)
73    @echo "If you plan to run multiple MUSHes, consider running 'make customize'"
74
75netmud:
76    (cd src; make netmud "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
77    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
78
79access:
80    utils/make_access_cnf.sh game
81
82pennmush.pot:
83    (cd src; make ../po/pennmush.pot)
84
85localized:
86    -echo "Localizing for your locale..."
87    -(cd po; make localized)
88
89portmsg:
90    (cd src; make portmsg "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
91    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
92
93announce:
94    (cd src; make announce "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
95    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
96
97ssl_slave:
98    (cd src; make ssl_slave "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
99    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" "MAKE=$(MAKE)" \
100    "MAKEFLAGS=$(MAKEFLAGS)")
101
102versions: CHANGES*
103    -@rm -rf CHANGES*~ CHANGES*bak
104    @utils/mkvershlp.pl game/txt/hlp CHANGES*
105
106safety:
107    $(CP) src/*.c /var/pennmush-bak/src
108    $(CP) hdrs/*.h /var/pennmush-bak/hdrs
109    $(CP) * /var/pennmush-bak
110
111distdepend: hdrs/funs.h hdrs/cmds.h
112    (cd src; @MAKE@ depend "CC=$(CC)" "CFLAGS=@CFLAGS@" \
113    "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
114
115local-files:
116    $(CP) -f src/cmdlocal.dst src/cmdlocal.c
117    $(CP) -f src/flaglocal.dst src/flaglocal.c
118    $(CP) -f src/funlocal.dst src/funlocal.c
119    $(CP) -f src/local.dst src/local.c
120
121# REQUIRES GNU INDENT! DON'T INDENT WITH ANYTHING ELSE!
122indent:
123    @(cd src; make indent)
124
125protoize:
126    (cd src; make protoize "CCFLAGS=$(CCFLAGS)")
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    -@@PERL@ utils/update.pl options.h options.h.dist
167
168test: netmud
169    (cd test; @PERL@ alltests.pl)
170
171clean:
172    (cd src; make clean)
173    (cd game; rm -f netmush info_slave)
174
175distclean:
176    (cd hdrs; rm -f *.orig *~ \#* *.rej *.bak funs.h cmds.h buildinf.h patches.h)
177    (cd utils; rm -f *.orig *~ \#* *.rej *.bak mkcmds.sh)
178    (cd game; rm -rf *.log netmush info_slave *.orig *.rej *~ *.bak mush.cnf)
179    (cd os2; rm -rf *.rej *.orig *~ *.bak)
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
189distci: distclean ci-src ci-game
190
191ci-src:
192    -(yes . | ci -l -f -N$(NAME) FAQ* BUGS COPY* CHANGE* READ* MANIFEST \
193      Configure utils/* Makefile.SH Patchlevel config_h.SH confmagic.h \
194      *.dist src/Makefile src/SWITCHES src/*.c src/*.dst \
195      hdrs/* hints/* os2/*)
196
197ci-game:
198    -(yes . | ci -l -f -N$(NAME) game/restart game/mushcnf.dst \
199      game/access.README \
200      game/txt/* game/txt/nws/* game/txt/evt/* game/txt/hlp/* )
201
202diffs:
203    @make indent > /dev/null 2>&1
204    @make versions > /dev/null 2>&1
205    @make touchswitches > /dev/null 2>&1
206    @make autogen > /dev/null 2>&1
207    @(prcs diff -r$(VS) -N pennmush `cat MANIFEST` | grep -v 'Index:')
208
209checkin: versions autogen
210    @prcs checkin
211
212commit: indent
213    @svn commit
214
215patch: versions
216    @make-patch-header
217    @make diffs
218
219etags:
220    (cd src; make etags)
221
222ctags:
223    (cd src; make ctags)
224
225dist.tar.Z: distclean dist.tar
226    compress /tmp/dist.tar
227
228dist.tar.gz: distclean dist.tar
229    gzip /tmp/dist.tar
230
231touchswitches:
232    @@TOUCH@ src/SWITCHES
233
234dist.tar: indent distclean versions touchswitches autogen
235    makedist -c pennmush
236    tar -cvf /tmp/dist.tar pennmush
237    -pgp -sb /tmp/dist.tar
238    -rm -rf pennmush
239
240CSRImalloc.tar.Z:
241    (cd src/CSRI; make clean)
242    (tar -cvFFf /tmp/CSRImalloc.tar `cat exclude.tar`)
243    compress /tmp/CSRImalloc.tar
244
245globalinstall: install
246    (cd game/txt; make clean compose.sh)
247#   $(INSTALLDIR) $(GLOBAL_INSTALL)
248    $(CP) -R game/* $(GLOBAL_INSTALL)
249    rm -f $(GLOBAL_INSTALL)/netmush $(GLOBAL_INSTALL)/info_slave
250    $(INSTALL) config.sh $(GLOBAL_INSTALL)/config.sh
251    $(INSTALL) src/netmud $(GLOBAL_INSTALL)/netmush
252    $(INSTALL) src/info_slave utils/ln-dir.sh $(GLOBAL_INSTALL)
253    $(CHMOD) a+rX -R $(GLOBAL_INSTALL)
254    @echo "** Files installed in $(GLOBAL_INSTALL). Feel free to move them."
255    @echo "** You can run $(GLOBAL_INSTALL)/ln-dir.sh to create a user directory,"
256    @echo "** or symlink that to somewhere easier to run. You may wish to strip them."
Note: See TracBrowser for help on using the browser.