home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / GNU_ATP_1_40.lzh / EDITLINE / Makefile < prev    next >
Makefile  |  1993-05-01  |  2KB  |  76 lines

  1. ##  $Revision: 1.3 $
  2. ##
  3. ##  Unix makefile for editline library.
  4. ##
  5.  
  6. ##  Set your options:
  7. ##    -DANSI_ARROWS        ANSI arrows keys work like emacs.
  8. ##    -DHAVE_STDLIB        Have <stdlib.h>.
  9. ##    -DHAVE_TCGETATTR    Have tcgetattr(), tcsetattr().
  10. ##    -DHIDE            Make static functions static (non debug).
  11. ##    -DHIST_SIZE=n        History size.
  12. ##    -DNEED_STRDUP        Don't have strdup().
  13. ##    -DUNIQUE_HISTORY    Don't save command if same as last one.
  14. ##    -DUSE_DIRENT        Use <dirent.h>, not <sys/dir.h>?
  15. ##    -DUSE_TERMCAP        Use the termcap library for terminal size
  16. ##                see LDFLAGS, below, if you set this.
  17. ##    -DNEED_PERROR        Don't have perror() (used in testit)
  18. DEFS    = -DANSI_ARROWS -DHAVE_TCGETATTR -DHIDE -DUSE_TERMCAP -DHAVE_STDLIB \
  19.           -DUSE_DIRENT -DSYS_UNIX -DHIST_SIZE=25 -DUNIQUE_HISTORY
  20.  
  21. ##  Set your C compiler:
  22. #WARN    = -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings \
  23. #    -Wunused -Wcomment -Wswitch
  24. CC    = cc $(WARN)
  25. #CC    = cc
  26. CFLAGS    = $(DEFS) -O 
  27.  
  28. ##  If you have -DUSE_TERMCAP, set this as appropriate:
  29. #LDFLAGS = -ltermlib
  30. LDFLAGS = -ltermcap
  31.  
  32. ##  Set ranlib as appropriate:
  33. RANLIB    = ranlib
  34. #RANLIB    = echo
  35.  
  36. ##  End of configuration.
  37.  
  38. SOURCES    = editline.c complete.c sysunix.c
  39. OBJECTS    = editline.o complete.o sysunix.o
  40. SHARFILES =    README Makefile editline.3 editline.h unix.h editline.c \
  41.         complete.c sysunix.c testit.c \
  42.         Make.os9 os9.h sysos9.c
  43.  
  44. all:        libedit.a
  45.  
  46. testit:        testit.c libedit.a
  47.     $(CC) $(CFLAGS) -o testit testit.c libedit.a $(LDFLAGS)
  48.  
  49. shar:        $(SHARFILES)
  50.     shar $(SHARFILES) >shar
  51.  
  52. complete.o : complete.c editline.h unix.h 
  53.  
  54. editline.o : editline.c editline.h unix.h edlproto.h 
  55.  
  56. sysunix.o : sysunix.c editline.h unix.h 
  57.  
  58. clean:
  59.     rm -f *.[oa] testit foo core tags lint lint.all a.out shar
  60.  
  61. dep:    
  62.     cc -MMD $(CFLAGS) $(SOURCES)
  63.  
  64. lint:        testit
  65.     lint -a -b -u -x $(DEFS) $(SOURCES) testit.c >lint.all
  66.     sed -e '/warning: function prototype not in scope/d' \
  67.         -e '/warning: old style argument declaration/'d \
  68.         -e '/mix of old and new style function declaration/'d \
  69.         <lint.all >lint
  70.  
  71. libedit.a:    $(OBJECTS)
  72.     @rm -f $@
  73.     ar r $@ $(OBJECTS)
  74.     $(RANLIB) $@
  75.  
  76.