c8d937ad0b775065f06517411cef59ab4ad4926c
[deliverable/binutils-gdb.git] / readline / examples / Makefile.in
1 #
2 # This is the Makefile for the readline examples subdirectory.
3 #
4 # Copyright (C) 1994,2008,2009 Free Software Foundation, Inc.
5
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.
10
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.
15
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/>.
18
19 RL_LIBRARY_VERSION = @LIBVERSION@
20
21 SHELL = @MAKE_SHELL@
22 RM = rm -f
23
24 prefix = @prefix@
25 exec_prefix = @exec_prefix@
26
27 datarootdir = @datarootdir@
28
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
37
38 INSTALL = @INSTALL@
39 INSTALL_PROGRAM = @INSTALL_PROGRAM@
40 INSTALL_DATA = @INSTALL_DATA@
41
42 EXEEXT = @EXEEXT@
43 OBJEXT = @OBJEXT@
44
45 # Support an alternate destination root directory for package building
46 DESTDIR =
47
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@
53
54 INCLUDES = -I$(srcdir) -I$(top_srcdir) -I..
55
56 CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS)
57 LDFLAGS = -g -L.. @LDFLAGS@
58
59 PURIFY = @PURIFY@
60
61 READLINE_LIB = ../libreadline.a
62 HISTORY_LIB = ../libhistory.a
63
64 TERMCAP_LIB = @TERMCAP_LIB@
65
66 .c.o:
67 ${RM} $@
68 $(CC) $(CCFLAGS) -c $<
69
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
72
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
76
77 all: $(EXECUTABLES)
78 everything: all
79
80 check: rlversion$(EXEEXT)
81 @echo Readline version: `rlversion$(EXEEXT)`
82
83 installdirs:
84 -$(SHELL) $(top_srcdir)/support/mkdirs $(DESTDIR)$(installdir)
85
86 install: installdirs
87 @for f in $(SOURCES); do \
88 $(RM) $(DESTDIR)$(installdir)/$$f ; \
89 $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(installdir) ; \
90 done
91
92 uninstall:
93 @for f in $(SOURCES); do \
94 $(RM) $(DESTDIR)$(installdir)/$$f ; \
95 done
96 -rmdir $(DESTDIR)$(installdir)
97
98 rl$(EXEEXT): rl.o $(READLINE_LIB)
99 $(PURIFY) $(CC) $(LDFLAGS) -o $@ rl.o $(READLINE_LIB) $(TERMCAP_LIB)
100
101 rlcat$(EXEEXT): rlcat.o $(READLINE_LIB)
102 $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlcat.o $(READLINE_LIB) $(TERMCAP_LIB)
103
104 rlevent$(EXEEXT): rlevent.o $(READLINE_LIB)
105 $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlevent.o $(READLINE_LIB) $(TERMCAP_LIB)
106
107 fileman$(EXEEXT): fileman.o $(READLINE_LIB)
108 $(PURIFY) $(CC) $(LDFLAGS) -o $@ fileman.o $(READLINE_LIB) $(TERMCAP_LIB)
109
110 rltest$(EXEEXT): rltest.o $(READLINE_LIB)
111 $(PURIFY) $(CC) $(LDFLAGS) -o $@ rltest.o $(READLINE_LIB) $(TERMCAP_LIB)
112
113 rlptytest$(EXEEXT): rlptytest.o $(READLINE_LIB)
114 $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlptytest.o $(READLINE_LIB) $(TERMCAP_LIB)
115
116 rlversion$(EXEEXT): rlversion.o $(READLINE_LIB)
117 $(CC) $(LDFLAGS) -o $@ rlversion.o $(READLINE_LIB) $(TERMCAP_LIB)
118
119 histexamp$(EXEEXT): histexamp.o $(HISTORY_LIB)
120 $(PURIFY) $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB)
121
122 clean mostlyclean:
123 $(RM) $(OBJECTS)
124 $(RM) $(EXECUTABLES) *.exe
125
126 distclean maintainer-clean: clean
127 $(RM) Makefile
128
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
136
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
This page took 0.044642 seconds and 3 git commands to generate.