PennMUSH Community

root/1.8.3/tags/p4rc1/Makefile.in

Revision 1019, 6.9 kB (checked in by shawnw, 1 year ago)

Makefile cleanup; don't link info_slave with sql libraries

Line 
1 # Makefile for PennMUSH
2
3 # - System configuration - #
4
5 VERSION=1.8.3
6 PATCHLEVEL=3
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 #
17 MAKE=@MAKE@
18 CC=@CC@
19
20 SQL_CFLAGS=@MYSQL_CFLAGS@ @POSTGRESQL_CFLAGS@ @SQLITE3_CFLAGS@
21 SQL_LDFLAGS=@MYSQL_LDFLAGS@ @POSTGRESQL_LDFLAGS@ @SQLITE3_LDFLAGS@
22
23 CCFLAGS=@CFLAGS@ -I.. -I../hdrs
24 LDFLAGS=@LDFLAGS@
25 CLIBS=@LIBS@
26 INSTALL=@INSTALL@
27 INSTALLDIR=$installdir
28 CP=@CP@
29 CHMOD=@CHMOD@
30 INSTALL_LINKS=@LN_S@ ../src/netmud netmush; @LN_S@ ../src/info_slave info_slave
31
32 # stupid SYS V shell
33 SHELL=/bin/sh
34 # Where to install with 'make globalinstall'
35 GLOBAL_INSTALL=@libexecdir@
36
37 all: 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
45 config.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
52 options.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
57 autogen: hdrs/cmds.h hdrs/funs.h hdrs/switches.h
58
59 hdrs/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
62 hdrs/switches.h: src/SWITCHES Patchlevel
63     @PERL@ utils/mkcmds.pl switches
64
65 src/switchinc.c: src/SWITCHES Patchlevel
66     @PERL@ utils/mkcmds.pl switches
67
68 hdrs/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
71 hdrs/patches.h: patches/*
72     @PERL@ utils/mkcmds.pl patches
73
74 install: 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
81 netmud:
82     (cd src; make netmud "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
83     "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
84
85 access:
86     utils/make_access_cnf.sh game
87
88 pennmush.pot:
89     (cd src; make ../po/pennmush.pot)
90
91 localized:
92     -echo "Localizing for your locale..."
93     -(cd po; make localized)
94
95 portmsg:
96     (cd src; make portmsg "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
97     "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
98
99 ssl_slave:
100     (cd src; make ssl_slave "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
101     "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" "MAKE=$(MAKE)" \
102     "MAKEFLAGS=$(MAKEFLAGS)")
103
104 versions: CHANGES*
105     -@rm -rf CHANGES*~ CHANGES*bak
106     @utils/mkvershlp.pl game/txt/hlp CHANGES*
107
108 safety:
109     $(CP) src/*.c /var/pennmush-bak/src
110     $(CP) hdrs/*.h /var/pennmush-bak/hdrs
111     $(CP) * /var/pennmush-bak
112
113 distdepend: hdrs/funs.h hdrs/cmds.h
114     (cd src; @MAKE@ depend "CC=$(CC)" "CCFLAGS=$(CCFLAGS)" \
115     "LDFLAGS=$(LDFLAGS)" "CLIBS=$(CLIBS)" )
116
117 local-files:
118     $(CP) -f src/cmdlocal.dst src/cmdlocal.c
119     $(CP) -f src/flaglocal.dst src/flaglocal.c
120     $(CP) -f src/funlocal.dst src/funlocal.c
121     $(CP) -f src/local.dst src/local.c
122
123 # REQUIRES GNU INDENT! DON'T INDENT WITH ANYTHING ELSE!
124 indent:
125     @(cd src; make indent)
126
127 customize: update-conf
128     -@@PERL@ utils/customize.pl
129
130 # The default place to find the runtime files is in this directory,
131 # but it can be overridden with env variables so people can use
132 # other game directories.
133 GAMEDIR=game
134
135 update-conf: game/mushcnf.dst game/aliascnf.dst game/restrictcnf.dst game/namescnf.dst
136     -@@TOUCH@ game/mushcnf.dst
137     -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/mush.cnf game/mushcnf.dst
138     -@@TOUCH@ game/aliascnf.dst
139     -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/alias.cnf game/aliascnf.dst
140     -@@TOUCH@ game/restrictcnf.dst
141     -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/restrict.cnf game/restrictcnf.dst
142     -@if [ ! -f $(GAMEDIR)/names.cnf ]; then $(CP) game/namescnf.dst $(GAMEDIR)/names.cnf; fi
143
144 $(GAMEDIR)/alias.cnf: game/aliascnf.dst
145     -@@TOUCH@ game/aliascnf.dst
146     -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/alias.cnf game/aliascnf.dst
147
148 $(GAMEDIR)/restrict.cnf: game/restrictcnf.dst
149     -@@TOUCH@ game/restrictcnf.dst
150     -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/restrict.cnf game/restrictcnf.dst
151
152 $(GAMEDIR)/names.cnf: game/namescnf.dst
153     if [ ! -f game/names.cnf ]; then \
154         $(CP) game/namescnf.dst $(GAMEDIR)/names.cnf \
155     fi
156
157 $(GAMEDIR)/mush.cnf: game/mushcnf.dst
158     -@@TOUCH@ game/mushcnf.dst
159     -@@PERL@ utils/update-cnf.pl $(GAMEDIR)/mush.cnf game/mushcnf.dst
160
161 update: update-hdr update-conf
162
163 update-hdr:
164     -@@TOUCH@ options.h.dist
165     -@@PERL@ utils/update.pl options.h options.h.dist
166
167 test: netmud
168     (cd test; @PERL@ alltests.pl)
169
170 clean:
171     (cd src; make clean)
172     (cd game; rm -f netmush info_slave)
173
174 distclean:
175     (cd hdrs; rm -f *.orig *~ \#* *.rej *.bak funs.h cmds.h buildinf.h patches.h)
176     (cd utils; rm -f *.orig *~ \#* *.rej *.bak mkcmds.sh *.o)
177     (cd game; rm -rf *.log netmush info_slave *.orig *.rej *~ *.bak mush.cnf)
178     (cd src; make distclean; rm -f Makefile)
179     (cd game/txt; make clean)
180     (rm -rf .config Makefile config.h config.sh options.h)
181
182 totallyclean: distclean
183     (cd hdrs; rm -rf *.rej)
184     (cd src; rm -rf *.rej)
185     -rm -f Makefile
186
187 diffs:
188     @make indent > /dev/null 2>&1
189     @make versions > /dev/null 2>&1
190     @make touchswitches > /dev/null 2>&1
191     @make autogen > /dev/null 2>&1
192     @(prcs diff -r$(VS) -N pennmush `cat MANIFEST` | grep -v 'Index:')
193
194 commit: indent
195     @svn commit
196
197 patch: versions
198     @make-patch-header
199     @make diffs
200
201 etags:
202     (cd src; make etags)
203
204 ctags:
205     (cd src; make ctags)
206
207 touchswitches:
208     @@TOUCH@ src/SWITCHES
209
210 dist.tar:
211     svn checkout svn+ssh://svn.pennmush.org/svn/pennmush/$(VERSION)/trunk
212     sed -e "s#^#pennmush-$(VERSION)p$(PATCHLEVEL)/#" < trunk/MANIFEST \
213         > DISTFILES
214     mv -f trunk pennmush-$(VERSION)p$(PATCHLEVEL)
215     tar -cvf dist.tar --files-from=DISTFILES
216     -gpg -sb /tmp/dist.tar
217     bzip2 -k /tmp/dist.tar
218     openssl dgst -sha1 -out /tmp/dist.tar.bz2.sha1 /tmp/dist.tar.bz2
219     gzip -k /tmp/dist.tar
220     openssl dgst -sha1 -out /tmp/dist.tar.gz.sha1 /tmp/dist.tar.gz
221     -rm -rf pennmush-$(VERSION)p$(PATCHLEVEL) DISTFILES
222
223 globalinstall: install
224     (cd game/txt; make clean compose.sh)
225 #   $(INSTALLDIR) $(GLOBAL_INSTALL)
226     $(CP) -R game/* $(GLOBAL_INSTALL)
227     rm -f $(GLOBAL_INSTALL)/netmush $(GLOBAL_INSTALL)/info_slave
228     $(INSTALL) config.sh $(GLOBAL_INSTALL)/config.sh
229     $(INSTALL) src/netmud $(GLOBAL_INSTALL)/netmush
230     $(INSTALL) src/info_slave utils/ln-dir.sh $(GLOBAL_INSTALL)
231     $(CHMOD) a+rX -R $(GLOBAL_INSTALL)
232     @echo "** Files installed in $(GLOBAL_INSTALL). Feel free to move them."
233     @echo "** You can run $(GLOBAL_INSTALL)/ln-dir.sh to create a user directory,"
234     @echo "** or symlink that to somewhere easier to run. You may wish to strip them."
235
Note: See TracBrowser for help on using the browser.