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 | |
1b17e766 EZ |
43 | READLINE_LIB = ../libreadline.a |
44 | HISTORY_LIB = ../libhistory.a | |
45 | ||
d60d9f65 SS |
46 | TERMCAP_LIB = @TERMCAP_LIB@ |
47 | ||
48 | .c.o: | |
c862e87b | 49 | ${RM} $@ |
d60d9f65 SS |
50 | $(CC) $(CCFLAGS) -c $< |
51 | ||
9255ee31 EZ |
52 | EXECUTABLES = fileman rltest rl rlcat rlversion histexamp |
53 | OBJECTS = fileman.o rltest.o rl.o rlversion.o histexamp.o | |
d60d9f65 SS |
54 | |
55 | all: $(EXECUTABLES) | |
9255ee31 | 56 | everything: all rlfe |
d60d9f65 | 57 | |
9255ee31 | 58 | rl: rl.o $(READLINE_LIB) |
d60d9f65 SS |
59 | $(CC) $(LDFLAGS) -o $@ rl.o -lreadline $(TERMCAP_LIB) |
60 | ||
9255ee31 EZ |
61 | rlcat: rlcat.o $(READLINE_LIB) |
62 | $(CC) $(LDFLAGS) -o $@ rlcat.o -lreadline $(TERMCAP_LIB) | |
63 | ||
64 | fileman: fileman.o $(READLINE_LIB) | |
d60d9f65 SS |
65 | $(CC) $(LDFLAGS) -o $@ fileman.o -lreadline $(TERMCAP_LIB) |
66 | ||
9255ee31 | 67 | rltest: rltest.o $(READLINE_LIB) |
d60d9f65 SS |
68 | $(CC) $(LDFLAGS) -o $@ rltest.o -lreadline $(TERMCAP_LIB) |
69 | ||
1b17e766 | 70 | rlversion: rlversion.o $(READLINE_LIB) |
c862e87b JM |
71 | $(CC) $(LDFLAGS) -o $@ rlversion.o -lreadline $(TERMCAP_LIB) |
72 | ||
9255ee31 EZ |
73 | histexamp: histexamp.o $(HISTORY_LIB) |
74 | $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB) | |
75 | ||
d60d9f65 SS |
76 | clean mostlyclean: |
77 | $(RM) $(OBJECTS) | |
1b17e766 | 78 | $(RM) $(EXECUTABLES) *.exe |
9255ee31 | 79 | $(RM) rlfe.o rlfe |
d60d9f65 SS |
80 | |
81 | distclean maintainer-clean: clean | |
82 | $(RM) Makefile | |
83 | ||
84 | fileman.o: fileman.c | |
85 | rltest.o: rltest.c | |
86 | rl.o: rl.c | |
c862e87b | 87 | rlversion.o: rlversion.c |
9255ee31 EZ |
88 | histexamp.o: histexamp.c |
89 | ||
90 | fileman.o: $(top_srcdir)/readline.h | |
91 | rltest.o: $(top_srcdir)/readline.h | |
92 | rl.o: $(top_srcdir)/readline.h | |
93 | rlversion.o: $(top_srcdir)/readline.h | |
94 | histexamp.o: $(top_srcdir)/history.h | |
1b17e766 EZ |
95 | |
96 | # Stuff for Per Bothner's `rlfe' program | |
97 | ||
98 | rlfe: rlfe.o $(READLINE_LIB) $(HISTORY_LIB) | |
99 | $(CC) $(LDFLAGS) -o $@ rlfe.o -lreadline -lhistory ${TERMCAP_LIB} | |
100 | ||
101 | rlfe.o: rlfe.c | |
102 | ||
103 | rlfe.o: $(top_srcdir)/readline.h | |
104 | rlfe.o: $(top_srcdir)/history.h |