home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / ircd4652.zip / ircd-df-4.6.5-os2 / Makefile < prev    next >
Makefile  |  1998-06-06  |  5KB  |  174 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. INCLUDEDIR=../include
  22.  
  23. # [CHANGEME]
  24. # Default flags:
  25. # Change XCFLAGS if you don't like what Config puts there.  Same with
  26. # IRCDLIBS.
  27. #
  28. # If you are configuring by hand, try "-O -g" for XCFLAGS, and leave
  29. # IRCDLIBS blank.  If that fails, try recomendations below.
  30. #
  31. XCFLAGS=-O2 -Zsysv-signals
  32. IRCDLIBS=-lsocket -lcurses -lbtermcap
  33.  
  34. #
  35. # use the following on MIPS:
  36. #CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
  37. # For Irix 4.x (SGI), use the following:
  38. #CFLAGS= -g -cckr -I$(INCLUDEDIR)
  39. #
  40. # on NEXT use:
  41. #CFLAGS=-bsd -I$(INCLUDEDIR)
  42. #on NeXT other than 2.0:
  43. #IRCDLIBS=-lsys_s
  44. #
  45. # AIX 370 flags
  46. #CFLAGS=-D_BSD -Hxa -I$(INCLUDEDIR)
  47. #IRCDLIBS=-lbsd
  48. #
  49. # Dynix/ptx V2.0.x
  50. #CFLAGS= -I$(INCLUDEDIR) -O -Xo
  51. #IRCDLIBS= -lsocket -linet -lnsl -lseq
  52. # Dynix/ptx V1.x.x
  53. #IRCDLIBS= -lsocket -linet -lnsl -lseq
  54. #
  55. #use the following on SUN OS without nameserver libraries inside libc
  56. #IRCDLIBS=-lresolv
  57. #
  58. # Solaris 2
  59. #IRCDLIBS=-lsocket -lnsl -lresolv -L/usr/ucblib -R/usr/ucblib -lgen
  60. #
  61. # ESIX
  62. #CFLAGS=-O -I$(INCLUDEDIR) -I/usr/ucbinclude
  63. #IRCDLIBS=-L/usr/ucblib -L/usr/lib -lsocket -lucb -lns -lnsl
  64. #
  65. # LDFLAGS - flags to send the loader (ld). SunOS users may want to add
  66. # -Bstatic here.
  67. #
  68. #LDFLAGS=-Bstatic
  69. #
  70. #Dell SVR4
  71. #CC=gcc
  72. #CFLAGS= -I$(INCLUDEDIR) -O2
  73. #IRCDLIBS=-lsocket -lnsl -lucb
  74.  
  75. # [CHANGEME]
  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. IRCDMODE=
  83.  
  84. # [CHANGEME]
  85. # IRCDDIR must be the same as DPATH in include/config.h
  86. #
  87. IRCDDIR=./
  88.  
  89. # [CHANGEME]
  90. # Some SunOS versions want this.  Try it without first.
  91. RES=res_init.o res_comp.o res_mkquery.o
  92. # BSDI systems want this.
  93. #RES=res_skipname.o
  94. # The rest are perfectly content with this.
  95. #RES=res_skipname.o
  96.  
  97. # [CHANGEME]
  98. # If you get a compile-time error dealing with u_int32_t, comment out
  99. # this line.
  100. NEED_U_INT32_T=    -DNEED_U_INT32_T
  101. # NEED_U_INT32_T=
  102.  
  103. # [CHANGEME]
  104. # If you get a link-time error dealing with strtoul, comment out
  105. # this line.
  106. # STRTOUL=    strtoul.o
  107. STRTOUL=
  108.  
  109. # [CHANGEME]
  110. # If you get crashes around a specific number of clients, and that client
  111. # load comes close or a little over the system-defined value of FD_SETSIZE,
  112. # override it here and see what happens.
  113. FD_SETSIZE=
  114.  
  115. CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS) $(NEED_U_INT32_T) $(FD_SETSIZE)
  116.  
  117. SHELL=  /emx/bin/sh
  118. SUBDIRS=src
  119. BINDIR=$(IRCDDIR)
  120. MANDIR=/emx/man
  121. INSTALL=
  122. RM=rm
  123. CP=cp
  124. TOUCH=touch
  125.  
  126. all:    build
  127.  
  128. MAKEARGS =    'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
  129.         'LDFLAGS=${LDFLAGS}' 'IRCDMODE=${IRCDMODE}' \
  130.         'BINDIR=${BINDIR}' 'INSTALL=${INSTALL}' \
  131.         'INCLUDEDIR=${INCLUDEDIR}' 'IRCDDIR=${IRCDDIR}' \
  132.         'MANDIR=${MANDIR}' 'RM=${RM}' 'CP=${CP}' 'TOUCH=${TOUCH}' \
  133.         'RES=${RES}' 'SHELL=${SHELL}' 'STRTOUL=${STRTOUL}'
  134.  
  135. server:
  136. build:
  137.     -@if [ ! -f include/setup.h ] ; then \
  138.         echo "Hmm...doesn't look like you've run Config..."; \
  139.         echo "Doing so now."; \
  140.         sh Config; \
  141.     fi
  142.     @for i in $(SUBDIRS); do \
  143.         echo "Building $$i";\
  144.         ( cd $$i; ${MAKE} ${MAKEARGS} build; ) \
  145.     done
  146.     @echo 'Please, please REMEMBER to add those U lines!'
  147.     @echo 'Read the file READTHIS.NOW for more info'
  148.  
  149. clean:
  150.     $(RM) -f *~ \#* core *.orig include/*.orig
  151.     @for i in $(SUBDIRS); do \
  152.         echo "Cleaning $$i";\
  153.         ( cd $$i; ${MAKE} ${MAKEARGS} clean; ) \
  154.     done
  155.     -@if [ -f include/setup.h ] ; then \
  156.       echo "To really restart installation, remove include/setup.h" ; \
  157.     fi
  158.     -@if [ -f include/options.h ] ; then \
  159.       echo "and include/options.h" ; \
  160.     fi
  161.  
  162. cleandir: clean
  163.     rm -rf include/setup.h include/options.h Makefile Options
  164.  
  165. depend:
  166.     @for i in $(SUBDIRS); do \
  167.         echo "Making dependencies in $$i";\
  168.         ( cd $$i; ${MAKE} ${MAKEARGS} depend; ) \
  169.     done
  170.  
  171. install: all
  172.     @echo "Now install by hand; make install is broken."
  173.