]>
Commit | Line | Data |
---|---|---|
d60d9f65 | 1 | # |
1b17e766 EZ |
2 | # This is the Makefile for the readline examples subdirectory. |
3 | # | |
4 | # Copyright (C) 1994 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 2, or (at your option) | |
9 | # 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, write to the Free Software | |
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. | |
9255ee31 | 19 | RL_LIBRARY_VERSION = @LIBVERSION@ |
1b17e766 | 20 | |
c862e87b | 21 | SHELL = @MAKE_SHELL@ |
d60d9f65 SS |
22 | RM = rm -f |
23 | ||
24 | srcdir = @srcdir@ | |
25 | VPATH = .:@srcdir@ | |
26 | top_srcdir = @top_srcdir@ | |
27 | BUILD_DIR = . | |
28 | ||
9255ee31 EZ |
29 | # Support an alternate destination root directory for package building |
30 | DESTDIR = | |
31 | ||
d60d9f65 SS |
32 | DEFS = @DEFS@ |
33 | CC = @CC@ | |
34 | CFLAGS = @CFLAGS@ | |
9255ee31 | 35 | LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DREADLINE_LIBRARY -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"' |
d60d9f65 SS |
36 | CPPFLAGS = @CPPFLAGS@ |
37 | ||
c862e87b | 38 | INCLUDES = -I$(srcdir) -I$(top_srcdir) -I.. |
d60d9f65 SS |
39 | |
40 | CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) | |
9255ee31 | 41 | LDFLAGS = -g -L.. @LDFLAGS@ |
d60d9f65 | 42 | |
5bdf8622 DJ |
43 | PURIFY = @PURIFY@ |
44 | ||
1b17e766 EZ |
45 | READLINE_LIB = ../libreadline.a |
46 | HISTORY_LIB = ../libhistory.a | |
47 | ||
d60d9f65 SS |
48 | TERMCAP_LIB = @TERMCAP_LIB@ |
49 | ||
50 | .c.o: | |
c862e87b | 51 | ${RM} $@ |
d60d9f65 SS |
52 | $(CC) $(CCFLAGS) -c $< |
53 | ||
9255ee31 | 54 | EXECUTABLES = fileman rltest rl rlcat rlversion histexamp |
5bdf8622 | 55 | OBJECTS = fileman.o rltest.o rl.o rlcat.o rlversion.o histexamp.o |
d60d9f65 SS |
56 | |
57 | all: $(EXECUTABLES) | |
5bdf8622 | 58 | everything: all |
d60d9f65 | 59 | |
9255ee31 | 60 | rl: rl.o $(READLINE_LIB) |
5bdf8622 | 61 | $(PURIFY) $(CC) $(LDFLAGS) -o $@ rl.o $(READLINE_LIB) $(TERMCAP_LIB) |
d60d9f65 | 62 | |
9255ee31 | 63 | rlcat: rlcat.o $(READLINE_LIB) |
5bdf8622 | 64 | $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlcat.o $(READLINE_LIB) $(TERMCAP_LIB) |
9255ee31 EZ |
65 | |
66 | fileman: fileman.o $(READLINE_LIB) | |
5bdf8622 | 67 | $(PURIFY) $(CC) $(LDFLAGS) -o $@ fileman.o $(READLINE_LIB) $(TERMCAP_LIB) |
d60d9f65 | 68 | |
9255ee31 | 69 | rltest: rltest.o $(READLINE_LIB) |
5bdf8622 DJ |
70 | $(PURIFY) $(CC) $(LDFLAGS) -o $@ rltest.o $(READLINE_LIB) $(TERMCAP_LIB) |
71 | ||
72 | rlptytest: rlptytest.o $(READLINE_LIB) | |
73 | $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlptytest.o $(READLINE_LIB) $(TERMCAP_LIB) | |
d60d9f65 | 74 | |
1b17e766 | 75 | rlversion: rlversion.o $(READLINE_LIB) |
5bdf8622 | 76 | $(CC) $(LDFLAGS) -o $@ rlversion.o $(READLINE_LIB) $(TERMCAP_LIB) |
c862e87b | 77 | |
9255ee31 | 78 | histexamp: histexamp.o $(HISTORY_LIB) |
5bdf8622 | 79 | $(PURIFY) $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB) |
9255ee31 | 80 | |
d60d9f65 SS |
81 | clean mostlyclean: |
82 | $(RM) $(OBJECTS) | |
1b17e766 | 83 | $(RM) $(EXECUTABLES) *.exe |
d60d9f65 SS |
84 | |
85 | distclean maintainer-clean: clean | |
86 | $(RM) Makefile | |
87 | ||
88 | fileman.o: fileman.c | |
89 | rltest.o: rltest.c | |
90 | rl.o: rl.c | |
c862e87b | 91 | rlversion.o: rlversion.c |
9255ee31 | 92 | histexamp.o: histexamp.c |
5bdf8622 DJ |
93 | rlcat.o: rlcat.c |
94 | rlptytest.o: rlptytest.c | |
9255ee31 EZ |
95 | |
96 | fileman.o: $(top_srcdir)/readline.h | |
97 | rltest.o: $(top_srcdir)/readline.h | |
98 | rl.o: $(top_srcdir)/readline.h | |
99 | rlversion.o: $(top_srcdir)/readline.h | |
100 | histexamp.o: $(top_srcdir)/history.h | |
5bdf8622 DJ |
101 | rlcat.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h |
102 | rlptytest.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h |