Automatic date update in version.in
[binutils-gdb.git] / readline / examples / Makefile.in
blobc8d937ad0b775065f06517411cef59ab4ad4926c
2 # This is the Makefile for the readline examples subdirectory.
4 # Copyright (C) 1994,2008,2009 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 RL_LIBRARY_VERSION = @LIBVERSION@
21 SHELL = @MAKE_SHELL@
22 RM = rm -f
24 prefix = @prefix@
25 exec_prefix = @exec_prefix@
27 datarootdir = @datarootdir@
29 bindir = @bindir@
30 srcdir = @srcdir@
31 datadir = @datadir@
32 VPATH = @srcdir@
33 top_srcdir = @top_srcdir@
34 #BUILD_DIR = .
35 BUILD_DIR = @BUILD_DIR@
36 installdir = $(datadir)/readline
38 INSTALL = @INSTALL@
39 INSTALL_PROGRAM = @INSTALL_PROGRAM@
40 INSTALL_DATA = @INSTALL_DATA@
42 EXEEXT = @EXEEXT@
43 OBJEXT = @OBJEXT@
45 # Support an alternate destination root directory for package building
46 DESTDIR =
48 DEFS = @DEFS@
49 CC = @CC@
50 CFLAGS = @CFLAGS@
51 LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DREADLINE_LIBRARY -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
52 CPPFLAGS = @CPPFLAGS@
54 INCLUDES = -I$(srcdir) -I$(top_srcdir) -I..
56 CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS)
57 LDFLAGS = -g -L.. @LDFLAGS@
59 PURIFY = @PURIFY@
61 READLINE_LIB = ../libreadline.a
62 HISTORY_LIB = ../libhistory.a
64 TERMCAP_LIB = @TERMCAP_LIB@
66 .c.o:
67 ${RM} $@
68 $(CC) $(CCFLAGS) -c $<
70 SOURCES = excallback.c fileman.c histexamp.c manexamp.c rl-fgets.c rl.c \
71 rlcat.c rlevent.c rlptytest.c rltest.c rlversion.c
73 EXECUTABLES = fileman$(EXEEXT) rltest$(EXEEXT) rl$(EXEEXT) rlcat$(EXEEXT) \
74 rlevent$(EXEEXT) rlversion$(EXEEXT) histexamp$(EXEEXT)
75 OBJECTS = fileman.o rltest.o rl.o rlevent.o rlcat.o rlversion.o histexamp.o
77 all: $(EXECUTABLES)
78 everything: all
80 check: rlversion$(EXEEXT)
81 @echo Readline version: `rlversion$(EXEEXT)`
83 installdirs:
84 -$(SHELL) $(top_srcdir)/support/mkdirs $(DESTDIR)$(installdir)
86 install: installdirs
87 @for f in $(SOURCES); do \
88 $(RM) $(DESTDIR)$(installdir)/$$f ; \
89 $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(installdir) ; \
90 done
92 uninstall:
93 @for f in $(SOURCES); do \
94 $(RM) $(DESTDIR)$(installdir)/$$f ; \
95 done
96 -rmdir $(DESTDIR)$(installdir)
98 rl$(EXEEXT): rl.o $(READLINE_LIB)
99 $(PURIFY) $(CC) $(LDFLAGS) -o $@ rl.o $(READLINE_LIB) $(TERMCAP_LIB)
101 rlcat$(EXEEXT): rlcat.o $(READLINE_LIB)
102 $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlcat.o $(READLINE_LIB) $(TERMCAP_LIB)
104 rlevent$(EXEEXT): rlevent.o $(READLINE_LIB)
105 $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlevent.o $(READLINE_LIB) $(TERMCAP_LIB)
107 fileman$(EXEEXT): fileman.o $(READLINE_LIB)
108 $(PURIFY) $(CC) $(LDFLAGS) -o $@ fileman.o $(READLINE_LIB) $(TERMCAP_LIB)
110 rltest$(EXEEXT): rltest.o $(READLINE_LIB)
111 $(PURIFY) $(CC) $(LDFLAGS) -o $@ rltest.o $(READLINE_LIB) $(TERMCAP_LIB)
113 rlptytest$(EXEEXT): rlptytest.o $(READLINE_LIB)
114 $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlptytest.o $(READLINE_LIB) $(TERMCAP_LIB)
116 rlversion$(EXEEXT): rlversion.o $(READLINE_LIB)
117 $(CC) $(LDFLAGS) -o $@ rlversion.o $(READLINE_LIB) $(TERMCAP_LIB)
119 histexamp$(EXEEXT): histexamp.o $(HISTORY_LIB)
120 $(PURIFY) $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB)
122 clean mostlyclean:
123 $(RM) $(OBJECTS)
124 $(RM) $(EXECUTABLES) *.exe
126 distclean maintainer-clean: clean
127 $(RM) Makefile
129 fileman.o: fileman.c
130 rltest.o: rltest.c
131 rl.o: rl.c
132 rlversion.o: rlversion.c
133 histexamp.o: histexamp.c
134 rlcat.o: rlcat.c
135 rlptytest.o: rlptytest.c
137 fileman.o: $(top_srcdir)/readline.h
138 rltest.o: $(top_srcdir)/readline.h
139 rl.o: $(top_srcdir)/readline.h
140 rlversion.o: $(top_srcdir)/readline.h
141 histexamp.o: $(top_srcdir)/history.h
142 rlcat.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h
143 rlptytest.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h