home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / ircd_os2.zip / makefile < prev    next >
Makefile  |  1996-03-12  |  4KB  |  149 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=rm
  22. INCLUDEDIR=../include
  23. #-I/usr/gnu/include
  24.  
  25. # Default flags:
  26. CFLAGS= -I$(INCLUDEDIR) -O2
  27. #IRCDLIBS=-L/usr/lib -L/usr/gnu/lib -lgnuc -O2
  28. IRCLIBS=-lcurses -ltermcap -lsocket
  29. #
  30. # use the following on MIPS:
  31. #CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
  32. # For Irix 4.x (SGI), use the following:
  33. #CFLAGS= -g -cckr -I$(INCLUDEDIR)
  34. #
  35. # on NEXT use:
  36. #CFLAGS=-bsd -I$(INCLUDEDIR)
  37. #on NeXT other than 2.0:
  38. #IRCDLIBS=-lsys_s
  39. #
  40. # AIX 370 flags
  41. #CFLAGS=-D_BSD -Hxa -I$(INCLUDEDIR)
  42. #IRCDLIBS=-lbsd
  43. #IRCLIBS=-lcurses -lcur
  44. #
  45. # Dynix/ptx V2.0.x
  46. #CFLAGS= -I$(INCLUDEDIR) -O -Xo
  47. #IRCDLIBS= -lsocket -linet -lnsl -lseq
  48. #IRCLIBS=-ltermcap -lcurses -lsocket -linet -lnsl -lseq
  49. # Dynix/ptx V1.x.x
  50. #IRCDLIBS= -lsocket -linet -lnsl -lseq
  51. #
  52. #use the following on SUN OS without nameserver libraries inside libc
  53. #IRCDLIBS=-lresolv
  54. #
  55. # Solaris 2
  56. #IRCDLIBS=-lsocket -lnsl
  57. #IRCLIBS=-lcurses -ltermcap -lresolv -lsocket -lnsl
  58. #
  59. # ESIX
  60. #CFLAGS=-O -I$(INCLUDEDIR) -I/usr/ucbinclude
  61. #IRCDLIBS=-L/usr/ucblib -L/usr/lib -lsocket -lucb -lns -lnsl
  62. #
  63. # LDFLAGS - flags to send the loader (ld). SunOS users may want to add
  64. # -Bstatic here.
  65. #
  66. #LDFLAGS=-Bstatic
  67. #
  68. #Dell SVR4
  69. #CC=gcc
  70. #CFLAGS= -I$(INCLUDEDIR) -O2
  71. #IRCDLIBS=-lsocket -lnsl -lucb
  72. #IRCLIBS=-lcurses -lresolv -lsocket -lnsl -lucb
  73.  
  74.  
  75.  
  76. # IRCDMODE is the mode you want the binary to be.
  77. # The 4 at the front is important (allows for setuidness)
  78. #
  79. # WARNING: if you are making ircd SUID or SGID, check config.h to make sure
  80. #          you are not defining CMDLINE_CONFIG 
  81. IRCDMODE = 711
  82.  
  83. # IRCDDIR must be the same as DPATH in include/config.h
  84. #
  85. # IRCDDIR=/home/irc/irc2.8.21+CSr2/lib
  86.  
  87. SHELL=sh
  88. SUBDIRS=common ircd 
  89. BINDIR=$(IRCDDIR)
  90. MANDIR=/usr/local/man
  91. INSTALL=/usr/bin/install
  92.  
  93. MAKE=make 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
  94.     'LDFLAGS=${LDFLAGS}' 'IRCDMODE=${IRCDMODE}' 'BINDIR=${BINDIR}' \
  95.     'INSTALL=${INSTALL}' 'IRCLIBS=${IRCLIBS}' 'INCLUDEDIR=${INCLUDEDIR}' \
  96.     'IRCDDIR=${IRCDDIR}' 'MANDIR=${MANDIR}'
  97.  
  98. all:    build
  99.  
  100. server:
  101.     @echo 'Making server'; cd ircd; ${MAKE} build; cd ..;
  102.  
  103. client:
  104.     @echo 'Making client'; cd irc; ${MAKE} build; cd ..;
  105.  
  106. build:
  107.     -@if [ ! -f include/setup.h ] ; then \
  108.         echo "Hmm...doesn't look like you've run Config..."; \
  109.         echo "Doing so now."; \
  110.         sh Config; \
  111.     fi
  112.     @for i in $(SUBDIRS); do \
  113.         echo "Building $$i";\
  114.         cd $$i;\
  115.         ${MAKE} build; cd ..;\
  116.     done
  117.  
  118. clean:
  119.     ${RM} -f *~ #* core
  120.     @for i in $(SUBDIRS); do \
  121.         echo "Cleaning $$i";\
  122.         cd $$i;\
  123.         ${MAKE} clean; cd ..;\
  124.     done
  125.     -@if [ -f include/setup.h ] ; then \
  126.     echo "To really restart installation, remove include/setup.h" ; \
  127.     fi
  128.  
  129. depend:
  130.     @for i in $(SUBDIRS); do \
  131.         echo "Making dependencies in $$i";\
  132.         cd $$i;\
  133.         ${MAKE} depend; cd ..;\
  134.     done
  135.  
  136. install: all
  137.     chmod +x ./bsdinstall
  138.     @for i in ircd ; do \
  139.         echo "Installing $$i";\
  140.         cd $$i;\
  141.         ${MAKE} install; cd ..;\
  142.     done
  143.  
  144.  
  145. rcs:
  146.     cii -H -R Makefile common include ircd
  147.  
  148.