home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / COMPR412.ZIP / Makefile < prev    next >
Makefile  |  1992-07-18  |  3KB  |  94 lines

  1. #
  2. # Makefile for compress version 4.1
  3. #
  4. #CC=cc
  5. CC=gcc
  6. #
  7. # set your compile flags.
  8. # set -DVOIDSIG if your signal() function returns a pointer to
  9. # a function returning void.
  10. # set BSD4 if you have a generally BSDish system - SunOS, Ultrix, etc.
  11. # If you're saddled with a system that only allows 14-character
  12. # filenames, set -DSHORTNAMES
  13. # include -DDIRENT if your system wants you to #include <dirent.h>
  14. # instead of <sys/dir.h>
  15. # The README file describes other flags you may need.
  16. #
  17. # CFLAGS for SunOS4.1
  18. #CFLAGS=-O -DVOIDSIG -DBSD4 -DDIRENT
  19. # CFLAGS for System V Rel 3.x
  20. #CFLAGS=-O -DSHORTNAMES -DDIRENT
  21. # CFLAGS for OS/2 2.0 with emx/gcc 2.1
  22. CFLAGS=-s -O2 -DVOIDSIG -DOS2 -DDIRENT
  23. #
  24. # BIN is where the executables (compress, uncompress, zcat, zcmp, zdiff
  25. # and zmore) will be installed.
  26. #
  27. BIN=/usr/local/bin
  28. #
  29. # MAN says where to install the man page
  30. #
  31. MAN=/usr/man/manl
  32. #
  33. # MANSUF is the suffix the installed manual page should have
  34. #
  35. MANSUF=l
  36. #
  37. # LN is how to make links (hard or symbolic) on your system
  38. #
  39. LN=ln -s
  40. #
  41. # LIBS contains any additional libraries you may need to link.
  42. # In particular, you may need -lndir or equiv. to get the
  43. # public domain directory access routines if they aren't in your libc.
  44. #
  45. LIBS=
  46. #
  47. # END OF CONFIGURATION OPTIONS
  48. #
  49.  
  50. SHARSET1=README compress.c
  51. SHARSET2=Changes Acks Makefile usermem  compress.1 zcmp zcmp.1 \
  52.     zdiff zmore zmore.1 patchlevel.h
  53.  
  54. all: compress
  55.  
  56. compress: USERMEM compress.c
  57.     $(CC) $(CFLAGS) -DUSERMEM=`cat USERMEM` -o compress compress.c $(LIBS)
  58.  
  59. compress.exe: compress.c
  60.     $(CC) $(CFLAGS) -o compress.exe compress.c $(LIBS)
  61.  
  62. # USERMEM may have to be set by hand.  It should contain the amount of
  63. # available user memory in bytes.  See the README file for more info.
  64. USERMEM:
  65.     sh usermem > USERMEM
  66.  
  67. install: compress compress.1
  68.     -mv $(BIN)/compress $(BIN)/compress.old
  69.     cp compress $(BIN)
  70.     rm -f $(BIN)/uncompress $(BIN)/zcat
  71.     $(LN) $(BIN)/compress $(BIN)/uncompress
  72.     $(LN) $(BIN)/compress $(BIN)/zcat
  73.     cp compress.1 $(MAN)/compress.$(MANSUF)
  74.     rm -f $(MAN)/uncompress.$(MANSUF) $(MAN)/zcat.$(MANSUF)
  75.     $(LN) $(MAN)/compress.$(MANSUF) $(MAN)/uncompress.$(MANSUF)
  76.     $(LN) $(MAN)/compress.$(MANSUF) $(MAN)/zcat.$(MANSUF)
  77.     cp zmore zcmp zdiff $(BIN)
  78.     cp zmore.1 $(MAN)/zmore.$(MANSUF)
  79.     cp zcmp.1 $(MAN)/zcmp.$(MANSUF)
  80.     rm -f $(MAN)/zdiff.$(MANSUF)
  81.     $(LN) $(MAN)/zcmp.$(MANSUF) $(MAN)/zdiff.$(MANSUF)
  82.  
  83. clean:
  84.     rm -f compress uncompress zcat core
  85.  
  86. shar:
  87.     shar -o compress41.shar.1 -n01 -e02 $(SHARSET1)
  88.     shar -o compress41.shar.2 -n02 -e02 $(SHARSET2)
  89.  
  90.  
  91.  
  92.  
  93.  
  94.