home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-04-30 | 2.1 KB | 75 lines |
- ## -*- text -*- ####################################################
- # vi:tabstop=8:shiftwidth=8 #
- # #
- # Makefile for readline and history libraries. #
- # #
- ####################################################################
-
- # Here is a rule for making o. files from c. files that doesn't force
- # the type of the machine (like -sun3) into the flags.
- .o.c:
- $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $*.c
-
- # Define TYPES as -DVOID_SIGHANDLER if your operating system uses
- # a return type of "void" for signal handlers.
- TYPES =
-
- # Define USG as -DUSG if you are using a System V operating system.
- USG = -DUSG
-
- # HP-UX compilation requires the BSD library.
- #LOCAL_LIBS = -lBSD
-
- # Xenix compilation requires -ldir -lx
- #LOCAL_LIBS = -ldir -lx
-
- # Comment out "-DVI_MODE" if you don't think that anyone will ever desire
- # the vi line editing mode and features.
- READLINE_DEFINES = $(TYPES)# -DVI_MODE
-
- DEBUG_FLAGS =
- LDFLAGS = $(DEBUG_FLAGS)
- CFLAGS = $(DEBUG_FLAGS) $(USG) -DARCH -O2
-
- # A good alternative is gcc -traditional.
- CC = gcc
- #CC = cc -pcc
-
- LOCAL_INCLUDES = -I.
-
- CSOURCES = c.readline c.history c.funmap c.keymaps c.vi_mode \
- c.emcskeymap c.vi_keymap
-
- HSOURCES = h.readline h.chardefs h.history h.keymaps
- SOURCES = $(CSOURCES) $(HSOURCES)
-
- ##########################################################################
-
- all: readline
-
- readline: o.readline o.history o.funmap o.keymaps
- libfile -c -o $@ $^
-
- o.readline: c.readline h.readline h.chardefs h.keymaps h.history c.vi_mode
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
- $(LOCAL_INCLUDES) readline.c
-
- o.history: c.history h.history
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
- $(LOCAL_INCLUDES) history.c
-
- o.funmap: c.funmap h.readline
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
- $(LOCAL_INCLUDES) funmap.c
-
- o.keymaps: c.keymaps c.emcskeymap c.vi_keymap h.keymaps h.chardefs
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
- $(LOCAL_INCLUDES) keymaps.c
-
- clean:
- rm -f o.*
-
- install: all
- copy readline $$.usr.local.lib.* ~cf
- copy h.* $$.usr.local.include.h.* ~cf
-