Added code to deal with filenames less than 9 characters in a COFF file.
[deliverable/binutils-gdb.git] / readline / Makefile.in
CommitLineData
bd5635a1
RP
1## -*- text -*- ####################################################
2# #
3# Makefile for readline and history libraries. #
4# #
5####################################################################
6
7da15eff
RP
7srcdir = .
8destdir = /usr/local
9
10#### host and target dependent Makefile fragments come in here.
11##
12
bd5635a1
RP
13# Here is a rule for making .o files from .c files that doesn't force
14# the type of the machine (like -sun3) into the flags.
15.c.o:
16 $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $(READLINE_DEFINES) $<
17
18# Destination installation directory. The libraries are copied to DESTDIR
19# when you do a `make install', and the header files to INCDIR/readline/*.h.
7da15eff
RP
20DESTDIR = $(destdir)/lib
21INCDIR = $(destdir)/include
bd5635a1
RP
22
23# Define TYPES as -DVOID_SIGHANDLER if your operating system uses
24# a return type of "void" for signal handlers.
25TYPES = -DVOID_SIGHANDLER
26
27# Define SYSV as -DSYSV if you are using a System V operating system.
28#SYSV = -DSYSV
29
30# HP-UX compilation requires the BSD library.
31#LOCAL_LIBS = -lBSD
32
33# Xenix compilation requires -ldir -lx
34#LOCAL_LIBS = -ldir -lx
35
36# Comment out "-DVI_MODE" if you don't think that anyone will ever desire
37# the vi line editing mode and features.
38READLINE_DEFINES = $(TYPES) -DVI_MODE
39
40DEBUG_FLAGS = -g
41LDFLAGS = $(DEBUG_FLAGS)
42CFLAGS = $(DEBUG_FLAGS) $(SYSV) -I.
43
44# A good alternative is gcc -traditional.
45#CC = gcc -traditional
46CC = cc
7da15eff 47RANLIB = /bin/ranlib
bd5635a1 48AR = ar
7da15eff 49AR_FLAGS = clq
bd5635a1
RP
50RM = rm
51CP = cp
52
7da15eff 53LOCAL_INCLUDES = -I$(srcdir)/../
bd5635a1
RP
54
55CSOURCES = readline.c history.c funmap.c keymaps.c vi_mode.c \
56 emacs_keymap.c vi_keymap.c
57
58HSOURCES = readline.h chardefs.h history.h keymaps.h
59SOURCES = $(CSOURCES) $(HSOURCES)
60
61DOCUMENTATION = readline.texinfo inc-readline.texinfo \
62 history.texinfo inc-history.texinfo
63
64SUPPORT = COPYING Makefile $(DOCUMENTATION) ChangeLog
65
66THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
67
68##########################################################################
69
7da15eff
RP
70STAGESTUFF = *.o *.a *.log *.cp *.tp *.vr *.fn *.aux *.pg *.toc
71
bd5635a1
RP
72all: libreadline.a
73
74libreadline.a: readline.o history.o funmap.o keymaps.o
75 $(RM) -f libreadline.a
7da15eff
RP
76 $(AR) $(AR_FLAGS) libreadline.a readline.o history.o funmap.o keymaps.o
77 $(RANLIB) libreadline.a
bd5635a1
RP
78
79readline.o: readline.h chardefs.h keymaps.h history.h readline.c vi_mode.c
80history.o: history.c history.h
81funmap.o: readline.h
82keymaps.o: emacs_keymap.c vi_keymap.c keymaps.h chardefs.h keymaps.c
83
84libtest: libreadline.a libtest.c
85 $(CC) -o libtest $(CFLAGS) $(CPPFLAGS) -L. libtest.c -lreadline -ltermcap
86
87readline: readline.c history.o keymaps.o funmap.o readline.h chardefs.h
88 $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
89 $(LOCAL_INCLUDES) -DTEST -o readline readline.c funmap.o \
90 keymaps.o history.o -L. -ltermcap
91
92readline.tar: $(THINGS_TO_TAR)
93 tar -cf readline.tar $(THINGS_TO_TAR)
94
95readline.tar.Z: readline.tar
96 compress -f readline.tar
97
98install: $(DESTDIR)/libreadline.a includes
99
100includes:
101 if [ ! -r $(INCDIR)/readline ]; then\
102 mkdir $(INCDIR)/readline;\
103 chmod a+r $(INCDIR)/readline;\
104 fi
105 $(CP) readline.h keymaps.h chardefs.h $(INCDIR)/readline/
106clean:
7da15eff 107 rm -f $(STAGESTUFF)
bd5635a1
RP
108
109$(DESTDIR)/libreadline.a: libreadline.a
110 -mv $(DESTDIR)/libreadline.a $(DESTDIR)/libreadline.old
111 cp libreadline.a $(DESTDIR)/libreadline.a
112 $(RANLIB) -t $(DESTDIR)/libreadline.a
7da15eff
RP
113
114# Copy the object files from a particular stage into a subdirectory.
115stage1: force
116 -mkdir stage1
117 -mv $(STAGESTUFF) stage1
118
119stage2: force
120 -mkdir stage2
121 -mv $(STAGESTUFF) stage2
122
123stage3: force
124 -mkdir stage3
125 -mv $(STAGESTUFF) stage3
126
127de-stage1: force
128 - (cd stage1 ; mv -f * ..)
129 - rmdir stage1
130
131de-stage2: force
132 - (cd stage2 ; mv -f * ..)
133 - rmdir stage2
134
135de-stage3: force
136 - (cd stage3 ; mv -f * ..)
137 - rmdir stage3
138
139force:
140
141# with the gnu make, this is done automatically.
142
143Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
144 (cd $(srcdir) ; \
145 ./configure +destdir=$(destdir) +norecurse \
146 `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \
147 $(host) +target=$(target))
148
This page took 0.030704 seconds and 4 git commands to generate.