home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / in4wjcxu / other / irc / makefile < prev    next >
Encoding:
Makefile  |  1996-08-14  |  3.6 KB  |  148 lines

  1. #************************************************************************
  2. #*   IRC - Internet Relay Chat, Makefile
  3. #*   Copyright (C) 1990, Jarkko Oikarinen
  4. #*
  5. #*   This program is free software; you can redistribute it and/or modify
  6. #*   it under the terms of the GNU General Public License as published by
  7. #*   the Free Software Foundation; either version 1, or (at your option)
  8. #*   any later version.
  9. #*
  10. #*   This program is distributed in the hope that it will be useful,
  11. #*   but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. #*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. #*   GNU General Public License for more details.
  14. #*
  15. #*   You should have received a copy of the GNU General Public License
  16. #*   along with this program; if not, write to the Free Software
  17. #*   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. #*/
  19.  
  20. CC=gcc
  21. RM=/bin/rm
  22. INCLUDEDIR=../include
  23.  
  24. # Default flags:
  25.  CFLAGS= -I$(INCLUDEDIR) -O
  26. #IRCDLIBS=
  27. # IRCLIBS=-lcurses -ltermcap
  28. #
  29. # use the following on MIPS:
  30. #CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
  31. # For Irix 4.x (SGI), use the following:
  32. #CFLAGS= -g -cckr -I$(INCLUDEDIR)
  33. #
  34. # on NEXT use:
  35. #CFLAGS=-bsd -I$(INCLUDEDIR)
  36. #on NeXT other than 2.0:
  37. #IRCDLIBS=-lsys_s
  38. #
  39. # AIX 370 flags
  40. #CFLAGS=-D_BSD -Hxa -I$(INCLUDEDIR)
  41. #IRCDLIBS=-lbsd
  42. #IRCLIBS=-lcurses -lcur
  43. #
  44. # Dynix/ptx V2.0.x
  45. #CFLAGS= -I$(INCLUDEDIR) -O -Xo
  46. #IRCDLIBS= -lsocket -linet -lnsl -lseq
  47. #IRCLIBS=-ltermcap -lcurses -lsocket -linet -lnsl -lseq
  48. # Dynix/ptx V1.x.x
  49. #IRCDLIBS= -lsocket -linet -lnsl -lseq
  50. #
  51. #use the following on SUN OS without nameserver libraries inside libc
  52. #IRCDLIBS=-lresolv
  53. #
  54. # Solaris 2
  55. IRCDLIBS=-lsocket -lnsl -lresolv
  56. IRCLIBS=-lcurses -ltermcap -lresolv -lsocket -lnsl
  57. #
  58. # ESIX
  59. #CFLAGS=-O -I$(INCLUDEDIR) -I/usr/ucbinclude
  60. #IRCDLIBS=-L/usr/ucblib -L/usr/lib -lsocket -lucb -lns -lnsl
  61. #
  62. # LDFLAGS - flags to send the loader (ld). SunOS users may want to add
  63. # -Bstatic here.
  64. #
  65. #LDFLAGS=-Bstatic
  66. #
  67. #Dell SVR4
  68. #CC=gcc
  69. #CFLAGS= -I$(INCLUDEDIR) -O2
  70. #IRCDLIBS=-lsocket -lnsl -lucb
  71. #IRCLIBS=-lcurses -lresolv -lsocket -lnsl -lucb
  72.  
  73.  
  74.  
  75. # IRCDMODE is the mode you want the binary to be.
  76. # The 4 at the front is important (allows for setuidness)
  77. #
  78. # WARNING: if you are making ircd SUID or SGID, check config.h to make sure
  79. #          you are not defining CMDLINE_CONFIG 
  80. IRCDMODE = 711
  81.  
  82. # IRCDDIR must be the same as DPATH in include/config.h
  83. #
  84. IRCDDIR=/usr/local/src/ircd
  85.  
  86. SHELL=/bin/sh
  87. SUBDIRS=common ircd irc
  88. BINDIR=$(IRCDDIR)
  89. MANDIR=/usr/local/man
  90. INSTALL=/usr/bin/install
  91.  
  92. MAKE=make 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
  93.     'LDFLAGS=${LDFLAGS}' 'IRCDMODE=${IRCDMODE}' 'BINDIR=${BINDIR}' \
  94.     'INSTALL=${INSTALL}' 'IRCLIBS=${IRCLIBS}' 'INCLUDEDIR=${INCLUDEDIR}' \
  95.     'IRCDDIR=${IRCDDIR}' 'MANDIR=${MANDIR}'
  96.  
  97. all:    build
  98.  
  99. server:
  100.     @echo 'Making server'; cd ircd; ${MAKE} build; cd ..;
  101.  
  102. client:
  103.     @echo 'Making client'; cd irc; ${MAKE} build; cd ..;
  104.  
  105. build:
  106.     -@if [ ! -f include/setup.h ] ; then \
  107.         echo "Hmm...doesn't look like you've run Config..."; \
  108.         echo "Doing so now."; \
  109.         sh Config; \
  110.     fi
  111.     @for i in $(SUBDIRS); do \
  112.         echo "Building $$i";\
  113.         cd $$i;\
  114.         ${MAKE} build; cd ..;\
  115.     done
  116.  
  117. clean:
  118.     ${RM} -f *~ #* core
  119.     @for i in $(SUBDIRS); do \
  120.         echo "Cleaning $$i";\
  121.         cd $$i;\
  122.         ${MAKE} clean; cd ..;\
  123.     done
  124.     -@if [ -f include/setup.h ] ; then \
  125.     echo "To really restart installation, remove include/setup.h" ; \
  126.     fi
  127.  
  128. depend:
  129.     @for i in $(SUBDIRS); do \
  130.         echo "Making dependencies in $$i";\
  131.         cd $$i;\
  132.         ${MAKE} depend; cd ..;\
  133.     done
  134.  
  135. install: all
  136.     chmod +x ./bsdinstall
  137.     @for i in ircd irc doc; do \
  138.         echo "Installing $$i";\
  139.         cd $$i;\
  140.         ${MAKE} install; cd ..;\
  141.     done
  142.  
  143.  
  144. rcs:
  145.     cii -H -R Makefile common include ircd
  146.  
  147.