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.djd < prev    next >
Makefile  |  1993-05-01  |  2KB  |  149 lines

  1. ##  $Revision: 1.3 $
  2.  
  3. ##
  4.  
  5. ##  Makefile for D.J. Delorie GCC for MS-DOS for editline library.
  6.  
  7. ##
  8.  
  9.  
  10.  
  11. ##  Set your options:
  12.  
  13. ##    -DANSI_ARROWS        ANSI arrows keys work like emacs.
  14.  
  15. ##    -DHAVE_STDLIB        Have <stdlib.h>.
  16.  
  17. ##    -DHAVE_TCGETATTR    Have tcgetattr(), tcsetattr().
  18.  
  19. ##    -DHIDE            Make static functions static (non debug).
  20.  
  21. ##    -DHIST_SIZE=n        History size.
  22.  
  23. ##    -DNEED_STRDUP        Don't have strdup().
  24.  
  25. ##    -DUNIQUE_HISTORY    Don't save command if same as last one.
  26.  
  27. ##    -DUSE_DIRENT        Use <dirent.h>, not <sys/dir.h>?
  28.  
  29. ##    -DUSE_TERMCAP        Use the termcap library for terminal size
  30.  
  31. ##                see LDFLAGS, below, if you set this.
  32.  
  33. ##    -DNEED_PERROR        Don't have perror() (used in testit)
  34.  
  35. DEFS    = -DANSI_ARROWS -DHIDE -DHAVE_STDLIB -DSYS_UNIX\
  36.  
  37.           -DUSE_DIRENT -DHIST_SIZE=25 -DUNIQUE_HISTORY
  38.  
  39.  
  40.  
  41. ##  Set your C compiler:
  42.  
  43. #WARN    = -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings \
  44.  
  45. #    -Wunused -Wcomment -Wswitch
  46.  
  47.  
  48.  
  49. #CC    = gcc $(WARN)
  50.  
  51. CC    = gcc
  52.  
  53. CFLAGS  = $(DEFS) -O -DDJD
  54.  
  55.  
  56.  
  57. ##  If you have -DUSE_TERMCAP, set this as appropriate:
  58.  
  59. #LDFLAGS = -ltermlib
  60.  
  61. #LDFLAGS = -ltermcap
  62.  
  63.  
  64.  
  65. ##  Set ranlib as appropriate:
  66.  
  67. #RANLIB  = ranlib
  68.  
  69. RANLIB = echo
  70.  
  71.  
  72.  
  73. ##  End of configuration.
  74.  
  75.  
  76.  
  77. SOURCES = editline.c complete.c sysdos.c getch.s
  78.  
  79. OBJECTS = editline.o complete.o sysdos.o getch.o
  80.  
  81.  
  82.  
  83. .c.o:
  84.  
  85.     $(CC) -c $(CFLAGS) $*.c 
  86.  
  87.  
  88.  
  89. .s.o:
  90.  
  91.         $(CC) -c $(CFLAGS) $*.s
  92.  
  93.  
  94.  
  95. all:        libedit.a
  96.  
  97.  
  98.  
  99. testit:        testit.o libedit.a
  100.  
  101.     $(CC) -o testit testit.o libedit.a $(LDFLAGS)
  102.  
  103.     strip testit
  104.  
  105.     copy /b \usr\gcc\bin\go32.exe + testit testit.exe
  106.  
  107.  
  108.  
  109. shar:        $(SHARFILES)
  110.  
  111.     shar $(SHARFILES) >shar
  112.  
  113.  
  114.  
  115. clean:
  116.  
  117.     del *.o 
  118.  
  119.     del *.a 
  120.  
  121.  
  122.  
  123. lint:        testit
  124.  
  125.     lint -a -b -u -x $(DEFS) $(SOURCES) testit.c >lint.all
  126.  
  127.     sed -e '/warning: function prototype not in scope/d' \
  128.  
  129.         -e '/warning: old style argument declaration/'d \
  130.  
  131.         -e '/mix of old and new style function declaration/'d \
  132.  
  133.         <lint.all >lint
  134.  
  135.  
  136.  
  137. libedit.a:    $(OBJECTS)
  138.  
  139.     @del libedit.a
  140.  
  141.     ar r libedit.a $(OBJECTS)
  142.  
  143.     $(RANLIB) libedit.a
  144.  
  145.  
  146.  
  147. $(OBJECTS):    editline.h
  148.  
  149.