home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / nn.tar / nn-6.5.1 / Makefile < prev    next >
Makefile  |  1996-08-19  |  2KB  |  100 lines

  1. #
  2. # Makefile for nn release 6.5
  3. #
  4. #
  5. # Before compiling, read the instructions in the file INSTALLATION!
  6. # It is best to make changes to the variables in this file in config.h
  7. # --see Step 2.1: Configuration of Makefile.
  8. #
  9. # -----------------------------------------------------------------
  10. #
  11. #    make all    compile programs
  12. #    make clean    remove all make'd files from source directory
  13. #
  14. # -----------------------------------------------------------------
  15. #
  16. # Some alternatives for CPP might be /lib/cpp and $(CC) -P
  17. # Common values for CFLAGS are '-O -s' or '-g'
  18. #
  19. # Use /lib/cpp or /usr/ccs/lib/cpp for CPP on Solaris or SVR4 machines.
  20.  
  21. CC =        cc
  22. #CPP =        $(CC) -E
  23. CPP =        /lib/cpp
  24. #CFLAGS =    -O2 # -g # -I/usr/local/lib/malloc-debug -DMALLOC_FUNC_CHECK
  25. CFLAGS =    -O
  26. #-Wall -Wcomment \
  27. #-Wtraditional -Wshadow \
  28. #-Wpointer-arith -Wcast-qual -Wcast-align -Wconversion \
  29. #-Waggregate-return -Wmissing-prototypes -Wnested-externs
  30. #LDFLAGS =    -s # -lmalloc # /usr/local/lib/malloc-debug/libmalloc.a
  31. MAKE =        make
  32.  
  33.  
  34. SHELL = /bin/sh
  35.  
  36. all: ymakefile
  37.     $(MAKE) $(MFLAGS) -f ymakefile all
  38.  
  39. touch: ymakefile
  40.     $(MAKE) -f ymakefile -t all
  41.  
  42. dbg: ymakefile
  43.     $(MAKE) $(MFLAGS) -f ymakefile nn1
  44.  
  45. nn: ymakefile
  46.     $(MAKE) $(MFLAGS) -f ymakefile nn
  47.  
  48. master: ymakefile
  49.     $(MAKE) $(MFLAGS) -f ymakefile master
  50.  
  51. lint: ymakefile
  52.     $(MAKE) -f ymakefile lint
  53.  
  54. client: ymakefile
  55.     $(MAKE) $(MFLAGS) -f ymakefile client
  56.  
  57. ymakefile: Makefile xmakefile config.h
  58.     cp xmakefile MF.c
  59.     $(CPP) -DCOMPILER="$(CC)" -DPREPROC="$(CPP)" \
  60.            -DLDEBUG="$(LDFLAGS)" \
  61.            -DCDEBUG="$(CFLAGS)" -Iconf MF.c | \
  62.     sed -e '1,/MAKE WILL CUT HERE/d' \
  63.         -e '/^#/d' \
  64.         -e '/^[ \f    ]$$/d' \
  65.         -e '/^[ \/]*[*]/d' | \
  66.     sed -n -e '/^..*$$/p' > ymakefile
  67.     rm -f MF.c
  68.  
  69. #
  70. # clean up
  71. #    Will remove object and executeable files.
  72. #
  73.  
  74. clean:    ymakefile
  75.     make -f ymakefile clean
  76.     rm -f *.o *~ ymakefile
  77.  
  78. #
  79. # distribution
  80. #
  81.  
  82. distrib: man/nn.1.D
  83.     [ -d DIST ] || mkdir DIST
  84.     rm DIST/Part.*
  85.     makekit -m -k30 -s55000 -nDIST/Part.
  86.  
  87. tar: man/nn.1.D
  88.     chmod +x FILES
  89.     rm -f /tmp/nn64tar*
  90.     tar cf /tmp/nn64tar `FILES`
  91.     cd /tmp && compress nn64tar
  92.  
  93. split: tar
  94.     rm -f /tmp/nn64z*
  95.     cd /tmp && bsplit -b40000 -pnn64z -v < nn64tar.Z
  96.  
  97. man/nn.1.D: man/nn.1
  98.     sh SPLITNN1
  99.  
  100.