Guest User

Untitled

a guest
Oct 23rd, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.86 KB | None | 0 0
  1. # Makefile.in
  2. #
  3. # BitchX - by panasync
  4. #
  5. # targets recognised by this Makefile:
  6. # all, everything - compiles BitchX [wserv, scr-bx, plugins]
  7. # wserv - compiles wserv
  8. # scr-bx - compiles scr-bx
  9. # dll - compiles plugins
  10. # install - installs BitchX [wserv, scr-bx] [plugins] scripts
  11. # man pages help and translation
  12. # installirc - installs BitchX [wserv, scr-bx]
  13. # installwserv - installs wserv
  14. # installscr-bx - installs scr-bx
  15. # installdll - installs plugins
  16. # installscript - installs the scripts
  17. # installtranslation - installs the translation tables
  18. # installhelp - installs the help files
  19. # installman - installs the manual pages
  20. # installeverything - all of the above
  21. # install_local - installs BitchX to your home directory
  22. # clean - remove all .o files, core, and binaries
  23. # distclean - remove all files geneated by compilation/installation
  24. # bxconf - compiles and runs bx-configure
  25. # distrib - makes a tarball of the BitchX binaries
  26. # windistrib - makes a tarball of the BitchX binaries on Win32
  27. # package - makes a tarball of the BitchX source
  28. # depend - computes the dependencies
  29.  
  30. SHELL = /bin/sh
  31.  
  32. srcdir = .
  33.  
  34. top_srcdir = .
  35. topdir = /home/ndowens/ports/irc/bitchx/work/bitchx-1.2.1
  36. prefix = /usr/local
  37. exec_prefix = ${prefix}
  38.  
  39. bindir = ${exec_prefix}/bin
  40. sbindir = ${exec_prefix}/sbin
  41. libexecdir = ${exec_prefix}/libexec
  42. datadir = ${prefix}/share
  43. sysconfdir = ${prefix}/etc
  44. sharedstatedir = ${prefix}/com
  45. localstatedir = ${prefix}/var
  46. libdir = ${exec_prefix}/lib
  47. infodir = ${prefix}/info
  48. mandir = ${prefix}/man
  49. includedir = ${prefix}/include
  50. oldincludedir = /usr/include
  51.  
  52. local_dir = $(HOME)
  53.  
  54. # Where the BitchX binary will be installed.
  55. # "make install" will compile and install the program.
  56. INSTALL_IRC = ${bindir}/$(_VERSION_)$(EXEEXT)
  57.  
  58. # Where the BitchX library will be. Generally this is the place that
  59. # you put the scripts, help pages and translation tables. It is
  60. # very important that you set this correctly.
  61. IRCLIB = ${libdir}/bx
  62.  
  63. CC = gcc
  64. CPPFLAGS = -I. -I$(topdir)/include -I$(top_srcdir)/include -I$(srcdir) -I$(srcdir)/include -DHAVE_CONFIG_H
  65. LIBS = -ltinfo -lm -lcrypt
  66.  
  67. # Tcl library.
  68. TCL_LIBS =
  69.  
  70. # These are for Tcl support.
  71. TCL_OBJS =
  72. # You don't have the following, so you'll want to leave this blank.
  73. TCL_SRCS =
  74.  
  75. # Set this to -g if you want to be able to debug the client, otherwise
  76. # use -O to have the compiler do some optimization instead.
  77. CFLAGS = -g -O2 -fno-strict-aliasing -Wall
  78.  
  79. # Set this to -s if you want the binary to be stripped.
  80. LDFLAGS =
  81.  
  82. # These are for the cd device player.
  83. CD_SRCS =
  84. CD_OBJS =
  85.  
  86. # This is the executable suffix for the target operating system.
  87. EXEEXT =
  88.  
  89. # Extra files.
  90. DEFAULT_CTOOLZ_DIR = ~/.BitchX
  91. DEFAULT_MSGLOGFILE = BitchX.away
  92. DEFAULT_BITCHX_HELP_FILE = BitchX.help
  93. DEFAULT_SCRIPT_HELP_FILE = BitchX.help
  94. DEFAULT_BITCHX_KICK_FILE = BitchX.kick
  95. DEFAULT_BITCHX_QUIT_FILE = BitchX.quit
  96. DEFAULT_BITCHX_IRCNAME_FILE = BitchX.ircnames
  97.  
  98. # Full path of the directory for BitchX help files.
  99. HELPDIR = $(IRCLIB)/help
  100.  
  101. # Full path of the directory for the BitchX scripts.
  102. INSTALL_SCRIPT = $(IRCLIB)/script
  103.  
  104. # Default setting for IRCPATH where BitchX will look for
  105. # its script files if the environment variable is undefined.
  106. # Usually, this should contain the same path as used for INSTALL_SCRIPT in
  107. # the Makefile, but it can contain multiple path elements
  108. # separated by colons. The path MUST lead to an existing directory,
  109. # because the 'global' script is expected to be found there.
  110. IRCPATH = $(DEFAULT_CTOOLZ_DIR):$(DEFAULT_CTOOLZ_DIR)/plugins:.:$(PLUGINDIR):$(INSTALL_SCRIPT):$(IRCLIB)
  111.  
  112. # Path for TRANSLATION variable.
  113. TRANSLATION_PATH = $(IRCLIB)/translation
  114.  
  115. # This is where the optional plugins will be copied to.
  116. PLUGINDIR = $(IRCLIB)/plugins
  117.  
  118. # Plugin flags.
  119. SHLIB_LD = gcc -shared
  120. SHLIB_CFLAGS =
  121. SHLIB_SUFFIX = .so
  122.  
  123. # This command will be used to install the BitchX files on Win32/OS2EMX
  124. # systems.
  125. WINNT_INSTALL =
  126.  
  127. # This program allows you to use screen/xterm's to put new BitchX windows
  128. # on new screen/xterm windows.
  129. INSTALL_WSERV = $(IRCLIB)/wserv$(EXEEXT)
  130.  
  131. # This program allows you to screen BitchX and reattach to it later.
  132. INSTALL_SCRBX = ${bindir}/scr-bx$(EXEEXT)
  133.  
  134. # Set gzip and bzip2 options.
  135. GZIP_ENV = --best
  136. BZIP2 = -9 --repetitive-best
  137.  
  138. # Standard programs.
  139. RM = rm -f
  140. LN = ln -s
  141. CP = cp -f
  142. MV = mv -f
  143.  
  144. INSTALL = /usr/bin/install -c
  145. INSTALL_DATA = ${INSTALL} -m 644
  146.  
  147. VERSION = BitchX-1.2.1
  148. _VERSION_ = BitchX
  149.  
  150. MAKE_BIN = gmake
  151. MAKE = $(MAKE_BIN) $(MFLAGS)
  152. MFLAGS = \
  153. 'local_dir=$(HOME)' \
  154. 'INSTALL_IRC=$(INSTALL_IRC)' \
  155. 'IRCLIB=$(IRCLIB)' \
  156. 'CC=$(CC)' \
  157. 'CFLAGS=$(CFLAGS)' \
  158. 'HELPDIR=$(HELPDIR)' \
  159. 'INSTALL_WSERV=$(INSTALL_WSERV)' \
  160. 'IRCPATH=$(IRCPATH)' \
  161. 'TRANSLATION_PATH=$(TRANSLATION_PATH)' \
  162. 'LDFLAGS=$(LDFLAGS)' \
  163. 'LIBS=$(LIBS)' \
  164. 'LN=$(LN)' \
  165. 'RM=$(RM)' \
  166. 'TCL_SRCS=$(TCL_SRCS)' \
  167. 'TCL_OBJS=$(TCL_OBJS)' \
  168. 'CD_PLAY=$(CD_PLAY)' \
  169. 'CD_SRCS=$(CD_SRCS)' \
  170. 'CD_OBJS=$(CD_OBJS)' \
  171. 'TCL_LIBS=$(TCL_LIBS)' \
  172. 'PLUGINDIR=$(PLUGINDIR)' \
  173. '_VERSION_=$(_VERSION_)' \
  174. 'VERSION=$(VERSION)' \
  175. 'INSTALL_DATA=$(INSTALL_DATA)' \
  176. 'INSTALL_SCRIPT=$(INSTALL_SCRIPT)' \
  177. 'EXEEXT=$(EXEEXT)' \
  178. 'SHLIB_CFLAGS=$(SHLIB_CFLAGS)' \
  179. 'SHLIB_SUFFIX=$(SHLIB_SUFFIX)'
  180.  
  181. ## Makefile starts here.
  182.  
  183. all: Makefile .config.h $(_VERSION_) wserv scr-bx dll done
  184.  
  185. .config.h:
  186. @if test ! -f $(topdir)/.config.h ; then touch $(topdir)/.config.h; fi
  187.  
  188. install: all installbin installdll installscript installman installhelp \
  189. installtranslation reallydone
  190.  
  191. installeverything: install
  192.  
  193. everything: all
  194.  
  195. $(_VERSION_): .config.h
  196. cd source \
  197. && $(MAKE) all
  198.  
  199. dll/dummy:
  200.  
  201. dll: .config.h $(srcdir)/Makefile dll/Makefile dll/dummy
  202. cd dll \
  203. && $(MAKE) all
  204.  
  205. installdll: $(srcdir)/Makefile dll/Makefile installdirs dll
  206. cd dll \
  207. && $(MAKE) 'DESTDIR=$(DESTDIR)' install
  208.  
  209. installdll_local: $(srcdir)/Makefile dll/Makefile
  210. cd dll \
  211. && $(MAKE) 'PLUGINDIR=$(local_dir)/.BitchX/plugins'
  212.  
  213. installhelp: installdirs
  214. cd $(top_srcdir)/bitchx-docs && \
  215. for d in `find . -name .svn -prune -o -type d ! -name . -print`; do \
  216. umask 022 && ../mkinstalldirs "$(DESTDIR)$(HELPDIR)/$$d"; \
  217. for f in "$$d/"*; do \
  218. if test -f "$$f"; then \
  219. $(INSTALL_DATA) "$$f" "$(DESTDIR)$(HELPDIR)/$$d"; \
  220. fi; \
  221. done; \
  222. done
  223. for f in $(top_srcdir)/bitchx-docs/*; do \
  224. if test -f "$$f"; then \
  225. $(INSTALL_DATA) "$$f" "$(DESTDIR)$(HELPDIR)"; \
  226. fi; \
  227. done;
  228. -(find "$(DESTDIR)$(HELPDIR)" -type f ! -name '*.bz2' ! -name '*.gz' | \
  229. (xargs bzip2 -9f || xargs gzip -9f)) 2>/dev/null
  230.  
  231. installbin: installirc installwserv installscr-bx
  232.  
  233. installirc: installdirs $(_VERSION_)
  234. $(INSTALL) source/$(_VERSION_)$(EXEEXT) $(DESTDIR)$(bindir)/$(VERSION)$(EXEEXT)
  235. $(RM) $(DESTDIR)$(INSTALL_IRC)
  236. $(LN) $(VERSION)$(EXEEXT) $(DESTDIR)$(INSTALL_IRC)
  237. $(INSTALL_DATA) $(top_srcdir)/BitchX.help $(DESTDIR)$(IRCLIB)/$(DEFAULT_BITCHX_HELP_FILE)
  238. $(INSTALL_DATA) $(top_srcdir)/BitchX.ircnames $(DESTDIR)$(IRCLIB)/$(DEFAULT_BITCHX_IRCNAME_FILE)
  239. $(INSTALL_DATA) $(top_srcdir)/BitchX.quit $(DESTDIR)$(IRCLIB)/$(DEFAULT_BITCHX_QUIT_FILE)
  240. $(INSTALL_DATA) $(top_srcdir)/BitchX.reasons $(DESTDIR)$(IRCLIB)/$(DEFAULT_BITCHX_KICK_FILE)
  241. $(WINNT_INSTALL)
  242.  
  243. install_local: all local_installdirs installdll_local
  244. $(INSTALL) source/$(_VERSION_)$(EXEEXT) $(local_dir)/bin/$(VERSION)$(EXEEXT)
  245. $(INSTALL) $(local_dir)/bin/$(VERSION)$(EXEEXT) $(local_dir)/bin/$(_VERSION_)$(EXEEXT)
  246. $(INSTALL) source/scr-bx$(EXEEXT) $(local_dir)/bin/scr-bx$(EXEEXT)
  247. $(INSTALL_DATA) $(top_srcdir)/BitchX.help $(DEFAULT_CTOOLZ_DIR)/$(DEFAULT_BITCHX_HELP_FILE)
  248. $(INSTALL_DATA) $(top_srcdir)/BitchX.ircnames $(DEFAULT_CTOOLZ_DIR)/$(DEFAULT_BITCHX_IRCNAME_FILE)
  249. $(INSTALL_DATA) $(top_srcdir)/BitchX.quit $(DEFAULT_CTOOLZ_DIR)/$(DEFAULT_BITCHX_QUIT_FILE)
  250. $(INSTALL_DATA) $(top_srcdir)/BitchX.reasons $(DEFAULT_CTOOLZ_DIR)/$(DEFAULT_BITCHX_KICK_FILE)
  251.  
  252. wserv: .config.h $(srcdir)/source/wserv.c $(srcdir)/source/term.c $(srcdir)/Makefile
  253. cd source \
  254. && $(MAKE) wserv
  255.  
  256. scr-bx: .config.h $(srcdir)/source/scr-bx.c $(srcdir)/source/term.c $(srcdir)/Makefile
  257. cd source \
  258. && $(MAKE) scr-bx
  259.  
  260. installwserv: installdirs wserv
  261. $(INSTALL) source/wserv $(DESTDIR)$(INSTALL_WSERV)
  262.  
  263. installscr-bx: installdirs scr-bx
  264. $(INSTALL) source/scr-bx $(DESTDIR)$(INSTALL_SCRBX)
  265.  
  266. installscript: installdirs
  267. -@( \
  268. if test -d $(top_srcdir)/script; then \
  269. for i in $(top_srcdir)/script/*; do \
  270. $(INSTALL_DATA) "$$i" $(DESTDIR)$(INSTALL_SCRIPT); \
  271. done; \
  272. chmod -x $(DESTDIR)$(INSTALL_SCRIPT)/*; \
  273. fi; \
  274. )
  275.  
  276. installtranslation: installdirs
  277. -@( \
  278. if test -d $(top_srcdir)/translation; then \
  279. for i in $(top_srcdir)/translation/*; do \
  280. $(INSTALL_DATA) "$$i" $(DESTDIR)$(TRANSLATION_PATH); \
  281. done; \
  282. chmod -x $(DESTDIR)$(TRANSLATION_PATH)/*; \
  283. fi; \
  284. )
  285. (find $(DESTDIR)$(TRANSLATION_PATH) -type f ! -name '*.bz2' ! -name '*.gz' | \
  286. (xargs bzip2 -9f || xargs gzip -9f) || :) 2>/dev/null
  287.  
  288. installman: installdirs
  289. -@( \
  290. if test -d $(top_srcdir)/doc; then \
  291. cd $(top_srcdir)/doc; \
  292. for i in BitchX.1; do \
  293. if test -f $$i; then \
  294. $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man1; \
  295. fi; \
  296. done; \
  297. fi; \
  298. )
  299. (find $(DESTDIR)$(mandir)/man1/BitchX.1 -type f ! -name '*.bz2' ! -name '*.gz' | \
  300. (xargs bzip2 -9f || xargs gzip -9f) || :) 2>/dev/null
  301.  
  302. installdirs:
  303. umask 022 && $(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(IRCLIB) \
  304. $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(TRANSLATION_PATH) $(DESTDIR)$(INSTALL_SCRIPT) \
  305. $(DESTDIR)$(HELPDIR)
  306.  
  307. local_installdirs:
  308. umask 022; $(top_srcdir)/mkinstalldirs $(local_dir)/bin $(DEFAULT_CTOOLZ_DIR) $(DEFAULT_CTOOLZ_DIR)/plugins $(DEFAULT_CTOOLZ_DIR)/logs
  309.  
  310. config: bxconf
  311.  
  312. bxconf: $(srcdir)/Makefile $(srcdir)/bx-conf/Makefile.in
  313. cd bx-conf \
  314. && $(MAKE) all
  315. $(topdir)/bxconfigure || :
  316.  
  317. clean:
  318. -@(if test -f source/Makefile; then cd source; $(MAKE) clean; fi)
  319. -@(if test -f dll/Makefile; then cd dll; $(MAKE) clean; fi)
  320. -@(if test -f bx-conf/Makefile; then cd bx-conf; $(MAKE) clean; fi)
  321.  
  322. distclean: clean
  323. -@(if test -f source/Makefile; then cd source; $(MAKE) distclean; fi)
  324. -@(if test -f dll/Makefile; then cd dll; $(MAKE) distclean; fi)
  325. -@(if test -f bx-conf/Makefile; then cd bx-conf; $(MAKE) distclean; fi)
  326. -$(RM) config.status
  327. -$(RM) config.cache config.log stamp-h stamp-h[0-9]*
  328. -$(RM) include/defs.h include/sig.inc
  329. -$(RM) *~ *.rej core *.orig .#*
  330. -$(RM) include/*~ include/*.rej include/core include/*.orig include/.#*
  331. -$(RM) source/*~ source/*.rej source/core source/*.orig source/.#*
  332. -$(RM) bitchx-docs/.#* bx-conf/.#* contrib/.#* dll/.#* doc/.#*
  333. -$(RM) script/.#* macros/.#* translation/.#*
  334. -$(RM) doc/*~ doc/BitchX.bat *.spec
  335. -$(RM) Makefile
  336. -$(CP) $(top_srcdir)/doc/Makefile $(top_srcdir)/Makefile
  337. -$(CP) $(top_srcdir)/doc/Makefile Makefile
  338.  
  339. export: distclean
  340. $(top_srcdir)/autogen.sh || :
  341.  
  342. package: export
  343. cd ..; tar -cvf $(VERSION).tar $(_VERSION_); gzip $(_VERSION_)
  344. cd ..; tar --use bzip2 -cvf $(VERSION).tar $(_VERSION_); bzip2 $(_VERSION_)
  345.  
  346. distrib: export source/$(_VERSION_)$(EXEEXT)
  347. $(CP) source/$(_VERSION_)$(EXEEXT) $(_VERSION_)$(EXEEXT)
  348. strip --strip-all $(_VERSION_)$(EXEEXT); gzip $(_VERSION_)$(EXEEXT)
  349. tar -cvf $(VERSION)-bin.tar dll/*$(SHLIB_SUFFIX) \
  350. dll/hint/BitchX.hints BitchX.*; gzip $(VERSION)-bin.tar
  351.  
  352. windistrib: install
  353. tar -cvf $(VERSION).tar \"($IRCLIB)\"; gzip $(VERSION).tar
  354. tar --use bzip2 -cvf $(VERSION).tar \"($IRCLIB)\"; bzip2 $(VERSION).tar
  355.  
  356. dep: depend
  357.  
  358. depend:
  359. cd source \
  360. && $(MAKE) depend
  361.  
  362. Makefile: $(srcdir)/Makefile.in $(srcdir)/source/Makefile.in \
  363. $(srcdir)/dll/Makefile.in config.status
  364. cd $(topdir) \
  365. && $(SHELL) ./config.status
  366.  
  367. config.status: $(srcdir)/configure
  368. $(SHELL) ./config.status --recheck
  369. #$(srcdir)/configure: $(srcdir)/configure.in
  370. # cd $(srcdir) && autoconf || :
  371.  
  372. $(top_srcdir)/aclocal.m4:
  373. cd $(top_srcdir)/macros && ./mkaclocal
  374.  
  375. include/defs.h: stamp-h
  376. @if test ! -f $@; then \
  377. rm -f stamp-h; \
  378. $(MAKE) stamp-h; \
  379. else :; fi
  380. stamp-h: $(srcdir)/include/defs.h.in $(topdir)/config.status
  381. @rm -f stamp-h stamp-hT
  382. @echo timestamp > stamp-hT 2> /dev/null
  383. cd $(topdir) \
  384. && \
  385. $(SHELL) ./config.status
  386. @mv stamp-hT stamp-h
  387. $(srcdir)/include/defs.h.in: $(srcdir)/./stamp-h.in
  388. @if test ! -f $@; then \
  389. rm -f $(srcdir)/./stamp-h.in; \
  390. $(MAKE) $(srcdir)/./stamp-h.in; \
  391. else :; fi
  392. $(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in
  393. @rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
  394. @echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
  395. cd $(top_srcdir) && autoheader
  396. @mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
  397.  
  398. done:
  399. @echo
  400. @echo Now type \"$(MAKE_BIN) install\" to install $(_VERSION_) globally \(if you\'re root\), or
  401. @echo else you can type \"$(MAKE_BIN) install_local\" to install $(_VERSION_) to your home
  402. @echo directory.
  403.  
  404. reallydone:
  405. @echo
  406. @echo $(_VERSION_) is now installed.
  407. @echo Type \"$(INSTALL_IRC)\" to start.
  408.  
  409. .PHONY: clean done reallydone installdirs local_installdirs
  410.  
  411. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  412. # Otherwise a system limit (for SysV at least) may be exceeded.
  413. .NOEXPORT:
Add Comment
Please, Sign In to add comment