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.dist < prev    next >
Makefile  |  1997-12-28  |  5KB  |  173 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=
  32. IRCDLIBS=
  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.  
  83. # [CHANGEME]
  84. # IRCDDIR must be the same as DPATH in include/config.h
  85. #
  86. IRCDDIR=/usr/local/lib/ircd
  87.  
  88. # [CHANGEME]
  89. # Some SunOS versions want this.  Try it without first.
  90. #RES=res_init.o res_comp.o res_mkquery.o
  91. # BSDI systems want this.
  92. #RES=res_skipname.o
  93. # The rest are perfectly content with this.
  94. RES=
  95.  
  96. # [CHANGEME]
  97. # If you get a compile-time error dealing with u_int32_t, comment out
  98. # this line.
  99. # NEED_U_INT32_T=    -DNEED_U_INT32_T
  100. NEED_U_INT32_T=
  101.  
  102. # [CHANGEME]
  103. # If you get a link-time error dealing with strtoul, comment out
  104. # this line.
  105. # STRTOUL=    strtoul.o
  106. STRTOUL=
  107.  
  108. # [CHANGEME]
  109. # If you get crashes around a specific number of clients, and that client
  110. # load comes close or a little over the system-defined value of FD_SETSIZE,
  111. # override it here and see what happens.
  112. FD_SETSIZE=
  113.  
  114. CFLAGS=-I$(INCLUDEDIR) $(XCFLAGS) $(NEED_U_INT32_T) $(FD_SETSIZE)
  115.  
  116. SHELL=/bin/sh
  117. SUBDIRS=src
  118. BINDIR=$(IRCDDIR)
  119. MANDIR=/usr/local/man
  120. INSTALL=/usr/bin/install
  121. RM=rm
  122. CP=cp
  123. TOUCH=touch
  124.  
  125. all:    build
  126.  
  127. MAKEARGS =    'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
  128.         'LDFLAGS=${LDFLAGS}' 'IRCDMODE=${IRCDMODE}' \
  129.         'BINDIR=${BINDIR}' 'INSTALL=${INSTALL}' \
  130.         'INCLUDEDIR=${INCLUDEDIR}' 'IRCDDIR=${IRCDDIR}' \
  131.         'MANDIR=${MANDIR}' 'RM=${RM}' 'CP=${CP}' 'TOUCH=${TOUCH}' \
  132.         'RES=${RES}' 'SHELL=${SHELL}' 'STRTOUL=${STRTOUL}'
  133.  
  134. server:
  135. build:
  136.     -@if [ ! -f include/setup.h ] ; then \
  137.         echo "Hmm...doesn't look like you've run Config..."; \
  138.         echo "Doing so now."; \
  139.         sh Config; \
  140.     fi
  141.     @for i in $(SUBDIRS); do \
  142.         echo "Building $$i";\
  143.         ( cd $$i; ${MAKE} ${MAKEARGS} build; ) \
  144.     done
  145.     @echo 'Please, please REMEMBER to add those U lines!'
  146.     @echo 'Read the file READTHIS.NOW for more info'
  147.  
  148. clean:
  149.     $(RM) -f *~ \#* core *.orig include/*.orig
  150.     @for i in $(SUBDIRS); do \
  151.         echo "Cleaning $$i";\
  152.         ( cd $$i; ${MAKE} ${MAKEARGS} clean; ) \
  153.     done
  154.     -@if [ -f include/setup.h ] ; then \
  155.       echo "To really restart installation, remove include/setup.h" ; \
  156.     fi
  157.     -@if [ -f include/options.h ] ; then \
  158.       echo "and include/options.h" ; \
  159.     fi
  160.  
  161. cleandir: clean
  162.     rm -rf include/setup.h include/options.h Makefile Options
  163.  
  164. depend:
  165.     @for i in $(SUBDIRS); do \
  166.         echo "Making dependencies in $$i";\
  167.         ( cd $$i; ${MAKE} ${MAKEARGS} depend; ) \
  168.     done
  169.  
  170. install: all
  171.     @echo "Now install by hand; make install is broken."
  172.