home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / SRC / TO_PORT / compfacelib.lzh / Makefile < prev    next >
Makefile  |  1992-04-30  |  2KB  |  82 lines

  1. #
  2. #  Compface - 48x48x1 image compression and decompression
  3. #
  4. #  Copyright (c) James Ashton - Sydney University - June 1990.
  5. #
  6. #  Written 11th November 1989.
  7. #
  8. #  Permission is given to distribute these sources, as long as the
  9. #  copyright messages are not removed, and no monies are exchanged. 
  10. #
  11. #  No responsibility is taken for any errors on inaccuracies inherent
  12. #  either to the comments or the code of this program, but if reported
  13. #  to me, then an attempt will be made to fix them.
  14.  
  15. # BINDIR, LIBDIR, and MANDIR are expected to be overridden by the
  16. # calling Makefile
  17.  
  18. BINDIR        = /usr/local/bin
  19. LIBDIR        = /usr/local/lib
  20. MANDIR        = /usr/local/man
  21.  
  22. NAME        = compface
  23. UNNAME        = uncompface
  24. EXECUTABLE    = $(BINDIR)/$(NAME)
  25. UNEXECUTABLE    = $(BINDIR)/$(UNNAME)
  26. LIBNAME        = lib$(NAME).a
  27. LIBRARY        = $(LIBDIR)/$(LIBNAME)
  28. MAN1DIR        = $(MANDIR)/man1
  29. MAN3DIR        = $(MANDIR)/man3
  30. OBJECTS        = arith.o file.o compress.o gen.o uncompface.o
  31. SOURCES        = compface.c uncompface.o arith.c file.c compress.c gen.c \
  32.           cmain.c uncmain.c
  33. HDRS        = compface.h data.h
  34. OTHERS        = README $(NAME).1 $(NAME).3 Makefile
  35.  
  36. CC        = cc
  37. CFLAGS        = -O
  38.  
  39. all:        $(NAME) $(UNNAME)
  40.  
  41. $(NAME) :    cmain.o compface.o $(LIBNAME)
  42.         $(CC) $(CFLAGS) -o $(NAME) cmain.o compface.o $(LIBNAME)
  43.  
  44. $(UNNAME) :    uncmain.o $(LIBNAME)
  45.         $(CC) $(CFLAGS) -o $(UNNAME) uncmain.o $(LIBNAME)
  46.  
  47. $(LIBNAME) :    $(OBJECTS)
  48.         ar rc $(LIBNAME) $(OBJECTS)
  49.         ranlib $(LIBNAME)
  50.  
  51. lint :
  52.         lint -abchx $(SOURCES)
  53.  
  54. clean :
  55.         rm -f *.o *.a *.sh core a.out $(NAME) $(UNNAME)
  56.  
  57. install :    $(NAME) $(UNNAME) $(LIBNAME)
  58.         -cp $(NAME) $(EXECUTABLE)
  59.         strip $(EXECUTABLE)
  60.         -cp $(UNNAME) $(UNEXECUTABLE)
  61.         strip $(UNEXECUTABLE)
  62.         -cp $(NAME).1 $(MAN1DIR)
  63.         rm -f $(MAN1DIR)/$(UNNAME).1
  64.         -ln $(MAN1DIR)/$(NAME).1 $(MAN1DIR)/$(UNNAME).1
  65.         -cp $(LIBNAME) $(LIBRARY)
  66.         -cp $(NAME).3 $(MAN3DIR)
  67.         rm -f $(MAN3DIR)/$(UNNAME).3
  68.         -ln $(MAN3DIR)/$(NAME).3 $(MAN3DIR)/$(UNNAME).3
  69.  
  70. shar :
  71.         shar.script $(OTHERS) $(HDRS) $(SOURCES) > $(NAME).sh
  72.         compress $(NAME).sh
  73.  
  74. arith.o:    arith.c compface.h data.h
  75. cmain.o:    cmain.c compface.h data.h
  76. compface.o:    compface.c compface.h data.h
  77. compress.o:    compress.c compface.h data.h
  78. file.o:        file.c compface.h data.h
  79. gen.o:        gen.c compface.h data.h
  80. uncmain.o:    uncmain.c compface.h data.h
  81. uncompface.o:    uncompface.c compface.h data.h
  82.