home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / DOORL093.ZIP / doorlib-0.9.3.tar.bz2 / doorlib-0.9.3.tar / doorlib-0.9.3 / src / Makefile < prev    next >
Makefile  |  2003-12-21  |  2KB  |  79 lines

  1. # Makefile for door library for Unix.
  2. # Copyright (c) 2003 by M. Broek.
  3. # $Id: Makefile,v 1.3 2003/12/21 13:04:15 mbroek Exp $
  4.  
  5. include ../Makefile.global
  6.  
  7. SRCS        = input.c  output.c  xmalloc.c  doorsys.c  timeout.c  logger.c  parse.c  dispfile.c
  8. OBJS        = input.o  output.o  xmalloc.o  doorsys.o  timeout.o  logger.o  parse.o  dispfile.o
  9. LOBJS        = input.lo output.lo xmalloc.lo doorsys.lo timeout.lo logger.lo parse.lo dispfile.lo
  10. HDRS        = door.h
  11. OTHER        = Makefile
  12. TARGET        = libdoor.a libdoor.la
  13.  
  14. #############################################################################################################
  15.  
  16. .c.o:
  17.         libtool ${CC} ${CFLAGS} -c $<
  18.  
  19. all:        ${TARGET}
  20.  
  21. clean: 
  22.         rm -Rf ${TARGET} *.o *.lo *.la *.h~ *.c~ core filelist Makefile.bak .libs
  23.  
  24. libdoor.a:    ${OBJS}
  25.         ar cru libdoor.a ${OBJS}
  26.         ranlib libdoor.a
  27.  
  28. libdoor.la:    ${OBJS}
  29.         libtool ${CC} -g -O -o libdoor.la ${LOBJS} -release "${VERSION}" -rpath ${DESTDIR}${LIBDIR}
  30.  
  31. install:    all
  32.         mkdir -p ${DESTDIR}${LIBDIR}
  33.         libtool cp libdoor.la ${DESTDIR}${LIBDIR}/libdoor.la
  34.         mkdir -p ${DESTDIR}${INCDIR}
  35.         cp ${HDRS} ${DESTDIR}${INCDIR}
  36.  
  37. uninstall:
  38.         rm -f ${DESTDIR{${INCDIR}/door.h
  39.         rm -f ${DESTDIR}${LIBDIR}/libdoor.*
  40.  
  41. filelist:    Makefile
  42.         BASE=`pwd`; \
  43.         BASE=`basename $${BASE}`; \
  44.         (for f in ${SRCS} ${HDRS} ${OTHER} ; do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist
  45.  
  46. depend:
  47.         @rm -f Makefile.bak; \
  48.         mv Makefile Makefile.bak; \
  49.         sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \
  50.         ${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' \
  51.         >>Makefile; \
  52.         ${ECHO} '# Dependencies generated by make depend' >>Makefile; \
  53.         for f in ${SRCS}; \
  54.         do \
  55.         ${ECHO} "Dependencies for $$f:\c"; \
  56.         ${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \
  57.         for h in `sed -n -e \
  58.             's/^#[     ]*include[     ]*"\([^"]*\)".*/\1/p' $$f`; \
  59.         do \
  60.             ${ECHO} " $$h\c"; \
  61.             ${ECHO} " $$h\c" >>Makefile; \
  62.         done; \
  63.         ${ECHO} " done."; \
  64.         ${ECHO} "" >>Makefile; \
  65.         done; \
  66.         ${ECHO} '# End of generated dependencies' >>Makefile
  67.  
  68. # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT
  69. # Dependencies generated by make depend
  70. input.o: ../config.h door.h
  71. output.o: ../config.h door.h
  72. xmalloc.o: ../config.h door.h
  73. doorsys.o: ../config.h door.h
  74. timeout.o: ../config.h door.h
  75. logger.o: ../config.h door.h
  76. parse.o: ../config.h door.h
  77. dispfile.o: ../config.h door.h
  78. # End of generated dependencies
  79.