Makefile.in revision 21308
1## -*- text -*- #################################################### 2# # 3# Makefile for the GNU Readline and History Libraries. # 4# # 5#################################################################### 6 7srcdir = @srcdir@ 8VPATH = .:@srcdir@ 9topdir = @top_srcdir@ 10BUILD_DIR = @BUILD_DIR@ 11 12INSTALL = @INSTALL@ 13INSTALL_PROGRAM = @INSTALL_PROGRAM@ 14INSTALL_DATA = @INSTALL_DATA@ 15 16CC = @CC@ 17RANLIB = @RANLIB@ 18AR = @AR@ 19RM = rm -f 20CP = cp 21MV = mv 22 23# See the file STANDALONE for the -D defines that readline understands 24 25CFLAGS = @CFLAGS@ 26LOCAL_CFLAGS = @LOCAL_CFLAGS@ 27CPPFLAGS = @CPPFLAGS@ 28LDFLAGS = @LDFLAGS@ 29 30DEFS = @DEFS@ 31 32INCLUDES = -I. -I$(BUILD_DIR) -I$(topdir) -I$(topdir)/lib 33 34CCFLAGS = $(DEFS) $(APP_CFLAGS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS) 35 36# Here is a rule for making .o files from .c files that doesn't force 37# the type of the machine (like -sun3) into the flags. 38.c.o: 39 $(CC) -c $(CCFLAGS) $< 40 41# The name of the main library target. 42LIBRARY_NAME = libreadline.a 43 44# The C code source files for this library. 45CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \ 46 $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \ 47 $(srcdir)/complete.c $(srcdir)/bind.c $(srcdir)/isearch.c \ 48 $(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \ 49 $(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \ 50 $(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \ 51 $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c \ 52 $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \ 53 $(srcdir)/histfile.c $(srcdir)/nls.c \ 54 $(srcdir)/tilde.c \ 55 56# The header files for this library. 57HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ 58 posixstat.h tilde.h rlconf.h tcap.h 59 60HISTOBJ = history.o histexpand.o histfile.o histsearch.o 61TILDEOBJ= tilde.o 62OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ 63 rltty.o complete.o bind.o isearch.o display.o signals.o \ 64 util.o kill.o undo.o macro.o input.o callback.o terminal.o \ 65 nls.o xmalloc.o \ 66 $(HISTOBJ) $(TILDEOBJ) 67 68# The texinfo files which document this library. 69DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo 70DOCOBJECT = doc/readline.dvi 71DOCSUPPORT = doc/Makefile 72DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT) 73 74SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]* 75 76SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE) 77 78THINGS_TO_TAR = $(SOURCES) $(SUPPORT) 79 80INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h 81 82########################################################################## 83 84all: libreadline.a libhistory.a 85 86libreadline.a: $(OBJECTS) 87 $(RM) -f $@ 88 $(AR) cr $@ $(OBJECTS) 89 -test -n "$(RANLIB)" && $(RANLIB) $@ 90 91libhistory.a: $(HISTOBJ) xmalloc.o 92 $(RM) -f $@ 93 $(AR) cr $@ $(HISTOBJ) xmalloc.o 94 -test -n "$(RANLIB)" && $(RANLIB) $@ 95 96documentation: force 97 test -d doc || mkdir doc 98 -( cd doc && $(MAKE) $(MFLAGS) ) 99 100force: 101 102# The rule for 'includes' is written funny so that the if statement 103# always returns TRUE unless there really was an error installing the 104# include files. 105install: installdirs libreadline.a 106 for file in $(INSTALLED_HEADERS) ; do \ 107 $(INSTALL_DATA) $(srcdir)/$$file $(includedir)/readline ; \ 108 done 109 -${MV} $(libdir)/libreadline.a $(libdir)/libreadline.old 110 ${INSTALL_DATA} libreadline.a $(libdir)/libreadline.a 111 -test -n "$(RANLIB)" && $(RANLIB) -t $(bindir)/libreadline.a 112 113installdirs: $(topdir)/support/mkdirs 114 $(SHELL) $(topdir)/support/mkdirs $(includedir) \ 115 $(includedir)/readline $(libdir) $(infodir) $(man3dir) 116 117uninstall: 118 cd $(includedir)/readline && ${RM} -f ${INSTALLED_HEADERS} 119 cd $(libdir) && ${RM} -f libreadline.a libreadline.old 120 121tags: force 122 etags $(CSOURCES) $(HSOURCES) 123 124TAGS: force 125 ctags -x $(CSOURCES) $(HSOURCES) > $@ 126 127readline: readline.h rldefs.h chardefs.h 128readline: $(OBJECTS) 129 $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \ 130 $(LOCAL_INCLUDES) -DTEST -o readline readline.c vi_mode.o funmap.o \ 131 keymaps.o -ltermcap 132 133clean: force 134 $(RM) $(OBJECTS) *.a 135 -( cd doc && $(MAKE) $(MFLAGS) $@ ) 136 137distclean realclean maintainer-clean: clean 138 -( cd doc && $(MAKE) $(MFLAGS) $@ ) 139 $(RM) Makefile 140 141mostlyclean: clean 142 -( cd doc && $(MAKE) $(MFLAGS) $@ ) 143 144# Dependencies 145readline.o: readline.c readline.h rldefs.h rlconf.h chardefs.h tcap.h 146readline.o: keymaps.h history.h 147vi_mode.o: rldefs.h rlconf.h readline.h history.h 148funmap.o: funmap.c readline.h rlconf.h 149keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c keymaps.h chardefs.h rlconf.h 150history.o: history.h histlib.h 151histexpand.o: history.h histlib.h 152histsearch.o: history.h histlib.h 153histfile.o: history.h histlib.h 154isearch.o: readline.h history.h 155search.o: readline.h history.h 156display.o: readline.h history.h rldefs.h rlconf.h tcap.h 157complete.o: readline.h rldefs.h rlconf.h posixdir.h posixstat.h 158rltty.o: rldefs.h rlconf.h readline.h rltty.h 159bind.o: rldefs.h rlconf.h readline.h history.h 160signals.o: rldefs.h rlconf.h readline.h history.h 161parens.o: readline.h 162kill.o: rldefs.h rlconf.h readline.h history.h 163macro.o: rldefs.h rlconf.h readline.h history.h 164undo.o: rldefs.h rlconf.h readline.h history.h 165input.o: rldefs.h rlconf.h readline.h history.h 166callback.o: rlconf.h rldefs.h readline.h 167terminal.o: rlconf.h rldefs.h readline.h tcap.h history.h 168 169bind.o: $(BUILD_DIR)/config.h 170callback.o: $(BUILD_DIR)/config.h 171complete.o: $(BUILD_DIR)/config.h 172display.o: $(BUILD_DIR)/config.h 173funmap.o: $(BUILD_DIR)/config.h 174histexpand.o: $(BUILD_DIR)/config.h 175histfile.o: $(BUILD_DIR)/config.h 176history.o: $(BUILD_DIR)/config.h 177histsearch.o: $(BUILD_DIR)/config.h 178input.o: $(BUILD_DIR)/config.h 179isearch.o: $(BUILD_DIR)/config.h 180keymaps.o: $(BUILD_DIR)/config.h 181kill.o: $(BUILD_DIR)/config.h 182macro.o: $(BUILD_DIR)/config.h 183parens.o: $(BUILD_DIR)/config.h 184readline.o: $(BUILD_DIR)/config.h 185rltty.o: $(BUILD_DIR)/config.h 186search.o: $(BUILD_DIR)/config.h 187signals.o: $(BUILD_DIR)/config.h 188tilde.o: $(BUILD_DIR)/config.h 189undo.o: $(BUILD_DIR)/config.h 190util.o: $(BUILD_DIR)/config.h 191vi_mode.o: $(BUILD_DIR)/config.h 192xmalloc.o: $(BUILD_DIR)/config.h 193