home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / program / gnu / readline / Makefile < prev    next >
Encoding:
Makefile  |  1994-04-30  |  2.1 KB  |  75 lines

  1. ## -*- text -*- ####################################################
  2. # vi:tabstop=8:shiftwidth=8                       #
  3. #                                   #
  4. # Makefile for readline and history libraries.               #
  5. #                                   #
  6. ####################################################################
  7.  
  8. # Here is a rule for making o. files from c. files that doesn't force
  9. # the type of the machine (like -sun3) into the flags.
  10. .o.c:
  11.     $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $*.c
  12.  
  13. # Define TYPES as -DVOID_SIGHANDLER if your operating system uses
  14. # a return type of "void" for signal handlers.
  15. TYPES =
  16.  
  17. # Define USG as -DUSG if you are using a System V operating system.
  18. USG = -DUSG
  19.  
  20. # HP-UX compilation requires the BSD library.
  21. #LOCAL_LIBS = -lBSD
  22.  
  23. # Xenix compilation requires -ldir -lx
  24. #LOCAL_LIBS = -ldir -lx
  25.  
  26. # Comment out "-DVI_MODE" if you don't think that anyone will ever desire
  27. # the vi line editing mode and features.
  28. READLINE_DEFINES = $(TYPES)# -DVI_MODE
  29.  
  30. DEBUG_FLAGS =
  31. LDFLAGS = $(DEBUG_FLAGS) 
  32. CFLAGS = $(DEBUG_FLAGS) $(USG) -DARCH -O2
  33.  
  34. # A good alternative is gcc -traditional.
  35. CC = gcc
  36. #CC = cc -pcc
  37.  
  38. LOCAL_INCLUDES = -I.
  39.  
  40. CSOURCES = c.readline c.history c.funmap c.keymaps c.vi_mode \
  41.        c.emcskeymap c.vi_keymap
  42.  
  43. HSOURCES = h.readline h.chardefs h.history h.keymaps
  44. SOURCES  = $(CSOURCES) $(HSOURCES)
  45.  
  46. ##########################################################################
  47.  
  48. all: readline
  49.  
  50. readline:    o.readline o.history o.funmap o.keymaps
  51.     libfile -c -o $@ $^
  52.  
  53. o.readline:    c.readline h.readline h.chardefs  h.keymaps h.history c.vi_mode
  54.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  55.       $(LOCAL_INCLUDES) readline.c
  56.  
  57. o.history:    c.history h.history
  58.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  59.       $(LOCAL_INCLUDES) history.c
  60.  
  61. o.funmap:    c.funmap h.readline
  62.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  63.       $(LOCAL_INCLUDES) funmap.c
  64.  
  65. o.keymaps:    c.keymaps c.emcskeymap c.vi_keymap h.keymaps h.chardefs
  66.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  67.       $(LOCAL_INCLUDES) keymaps.c
  68.  
  69. clean:
  70.     rm -f o.*
  71.  
  72. install:    all
  73.     copy readline $$.usr.local.lib.* ~cf
  74.     copy h.* $$.usr.local.include.h.* ~cf
  75.