home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / ircd4652.zip / ircd-df-4.6.5-os2 / src / Makefile < prev    next >
Makefile  |  1998-06-24  |  5KB  |  150 lines

  1. #************************************************************************
  2. #*   IRC - Internet Relay Chat, src/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.  
  22. LINTFLAGS=-hba
  23.  
  24. OBJS=bsd.o dbuf.o packet.o send.o match.o parse.o support.o channel.o \
  25.     class.o hash.o ircd.o list.o res.o s_auth.o s_bsd.o s_conf.o \
  26.     s_debug.o s_err.o s_misc.o s_numeric.o s_serv.o s_user.o whowas.o \
  27.     userload.o crule.o help.o md5.o version.o $(RES) $(STRTOUL)
  28.  
  29. SRC=$(OBJS:%.o=%.c)
  30.  
  31. MAKE = make 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'IRCDLIBS=${IRCDLIBS}' \
  32.         'LDFLAGS=${LDFLAGS}' 'IRCDMODE=${IRCDMODE}'
  33.  
  34. INCLUDES = ../include/struct.h ../include/config.h ../include/options.h \
  35.     ../include/sys.h ../include/common.h ../include/patchlevel.h \
  36.     ../include/h.h ../include/numeric.h ../include/msg.h
  37.  
  38. all: build
  39.  
  40. build: ircd chkconf
  41.  
  42. version.c:
  43.     $(SHELL) version.c.SH
  44.  
  45. version.o: version.c ../include/patchlevel.h
  46.     $(CC) $(CFLAGS) -c version.c
  47.  
  48. ircd: $(OBJS) 
  49.     $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(IRCDLIBS) sigsysv.o -o ircd.exe
  50.     emxbind -s ircd.exe
  51. #    chmod $(IRCDMODE) ircd
  52.  
  53. chkconf: ../include/struct.h ../include/config.h ../include/options.h ../include/sys.h \
  54.      ../include/common.h crule.c chkconf.c
  55.     $(CC) $(CFLAGS) -DCR_CHKCONF -o chkcrule.o -c crule.c
  56.     $(CC) $(CFLAGS) -DCR_CHKCONF -o chkmatch.o -c match.c
  57.     $(CC) $(CFLAGS) chkconf.c chkmatch.o chkcrule.o \
  58.     $(LDFLAGS) $(IRCDLIBS) -o chkconf.exe
  59.     emxbind -s chkconf.exe
  60.  
  61. saber: $(SRC)
  62.     #load -I../include $(SRC) version.c $(IRCDLIBS)
  63.  
  64. lint:
  65.     lint $(LINTFLAGS) -I../include $(SRC) | egrep -v 'sendto_|debug'
  66.  
  67. parse.o: parse.c $(INCLUDES)
  68. bsd.o: bsd.c $(INCLUDES)
  69. dbuf.o: dbuf.c $(INCLUDES) ../include/dbuf.h
  70. packet.o: packet.c $(INCLUDES)
  71. send.o: send.c $(INCLUDES)
  72. match.o: match.c $(INCLUDES)
  73. support.o: support.c $(INCLUDES)
  74.  
  75. #install: all
  76. #    -if [ ! -d ${IRCDDIR} -a ! -f ${IRCDDIR} ] ; then \
  77. #        mkdir ${IRCDDIR}; \
  78. #    fi
  79. #    ../bsdinstall -m ${IRCDMODE} ircd ${BINDIR}
  80. #    ../bsdinstall -m 700 chkconf ${BINDIR}
  81. #    $(CP) ../doc/example.conf ${IRCDDIR}
  82. #    $(TOUCH) ${IRCDDIR}/ircd.motd
  83. #    $(RM) -f ${IRCDDIR}/ircd.m4
  84. #    $(TOUCH) ${IRCDDIR}/ircd.m4
  85. #    chmod +x buildm4
  86. #    ./buildm4 ${IRCDDIR}
  87.  
  88. clean:
  89.     $(RM) -f *.o *~ core ircd version.c chkconf
  90.  
  91. cleandir: clean
  92.  
  93. depend:
  94.     makedepend -I${INCLUDEDIR} ${SRC}
  95.  
  96. channel.o: channel.c $(INCLUDES) ../include/channel.h
  97.     $(CC) $(CFLAGS) -c channel.c
  98.  
  99. class.o: class.c $(INCLUDES) ../include/class.h
  100.     $(CC) $(CFLAGS) -c class.c
  101.  
  102. ircd.o: ircd.c ../include/dbuf.h $(INCLUDES)
  103.     $(CC) $(CFLAGS) -c ircd.c
  104.  
  105. list.o: list.c ../include/dbuf.h $(INCLUDES)
  106.     $(CC) $(CFLAGS) -c list.c
  107.  
  108. res.o: res.c ../include/res.h $(INCLUDES)
  109.     $(CC) $(CFLAGS) -c res.c
  110.  
  111. s_bsd.o: s_bsd.c ../include/dbuf.h $(INCLUDES)
  112.     $(CC) $(CFLAGS) -c s_bsd.c
  113.  
  114. s_auth.o: s_auth.c ../include/dbuf.h $(INCLUDES)
  115.     $(CC) $(CFLAGS) -c s_auth.c
  116.  
  117. s_conf.o: s_conf.c ../include/dbuf.h $(INCLUDES)
  118.     $(CC) $(CFLAGS) -c s_conf.c
  119.  
  120. s_debug.o: ../include/sys.h s_debug.c $(INCLUDES)
  121.     $(CC) $(CFLAGS) -c s_debug.c
  122.  
  123. s_err.o: ../include/msg.h s_err.c $(INCLUDES)
  124.     $(CC) $(CFLAGS) -c s_err.c
  125.  
  126. s_misc.o: s_misc.c ../include/dbuf.h $(INCLUDES)
  127.     $(CC) $(CFLAGS) -c s_misc.c
  128.  
  129. s_user.o: s_user.c $(INCLUDES) \
  130.       ../include/dbuf.h ../include/channel.h ../include/whowas.h
  131.     $(CC) $(CFLAGS) -c s_user.c
  132.  
  133. s_serv.o: s_serv.c $(INCLUDES) \
  134.       ../include/dbuf.h ../include/whowas.h
  135.     $(CC) $(CFLAGS) -c s_serv.c
  136.  
  137. s_numeric.o: s_numeric.c ../include/dbuf.h $(INCLUDES)
  138.     $(CC) $(CFLAGS) -c s_numeric.c
  139.  
  140. whowas.o: whowas.c ../include/dbuf.h ../include/whowas.h $(INCLUDES)
  141.     $(CC) $(CFLAGS) -c whowas.c
  142.  
  143. hash.o: hash.c ../include/hash.h $(INCLUDES)
  144.     $(CC) $(CFLAGS) -c hash.c
  145.  
  146. crule.o: crule.c $(INCLUDES)
  147.     $(CC) $(CFLAGS) -c crule.c
  148.  
  149. # DO NOT DELETE THIS LINE -- make depend depends on it.
  150.