home *** CD-ROM | disk | FTP | other *** search
/ Computer Club Elmshorn Atari PD / CCE_PD.iso / pc / 0600 / CCE_0638.ZIP / CCE_0638 / UPDATE / UPDATE29.ZOO / editline / Makefile < prev    next >
Makefile  |  1993-03-28  |  2KB  |  67 lines

  1. ##  $Revision: 1.1 $
  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_DIRENT -DSYS_UNIX
  19.  
  20. ##  Set your C compiler:
  21. WARN    = -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings \
  22.     -Wunused -Wcomment -Wswitch
  23. CC    = gcc -ansi $(WARN)
  24. #CC    = cc
  25. CFLAGS    = $(DEFS) -O -g
  26.  
  27. ##  If you have -DUSE_TERMCAP, set this as appropriate:
  28. #LDFLAGS = -ltermlib
  29. #LDFLAGS = -ltermcap
  30.  
  31. ##  Set ranlib as appropriate:
  32. RANLIB    = ranlib
  33. #RANLIB    = echo
  34.  
  35. ##  End of configuration.
  36.  
  37. SOURCES    = editline.c complete.c sysunix.c
  38. OBJECTS    = editline.o complete.o sysunix.o
  39. SHARFILES =    README Makefile editline.3 editline.h unix.h editline.c \
  40.         complete.c sysunix.c testit.c \
  41.         Make.os9 os9.h sysos9.c
  42.  
  43. all:        libedit.a
  44.  
  45. testit:        testit.c libedit.a
  46.     $(CC) $(CFLAGS) -o testit testit.c libedit.a $(LDFLAGS)
  47.  
  48. shar:        $(SHARFILES)
  49.     shar $(SHARFILES) >shar
  50.  
  51. clean:
  52.     rm -f *.[oa] testit foo core tags lint lint.all a.out shar
  53.  
  54. lint:        testit
  55.     lint -a -b -u -x $(DEFS) $(SOURCES) testit.c >lint.all
  56.     sed -e '/warning: function prototype not in scope/d' \
  57.         -e '/warning: old style argument declaration/'d \
  58.         -e '/mix of old and new style function declaration/'d \
  59.         <lint.all >lint
  60.  
  61. libedit.a:    $(OBJECTS)
  62.     @rm -f $@
  63.     ar r $@ $(OBJECTS)
  64.     $(RANLIB) $@
  65.  
  66. $(OBJECTS):    editline.h
  67.