# Generated automatically from Makefile.in by configure.
## -*- text -*- ##
# Master Makefile for the GNU readline library.
# Copyright (C) 1994, 1998 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
RL_LIBRARY_VERSION = 4.3
RL_LIBRARY_NAME = readline

srcdir = ../../shlib
VPATH = .:../..
topdir = ../..
BUILD_DIR = .

INSTALL = copy
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL)

!ifdef __MAKE__
CC = bcc32 -q
AR = tlib
ARFLAGS = /a
MAKE = make
CFLAGS = -O2 -w-
LOCAL_CFLAGS =
CPPFLAGS = 
SHOBJ_CC = bcc32
SHOBJ_CFLAGS = -tWD -lGi
OUTFLAG = -e
MAKE_IMPORT_LIB = implib
!else
CC = cl -nologo
AR = lib
ARFLAGS = -out:
MAKE = nmake
CFLAGS = -MD
LOCAL_CFLAGS =
CPPFLAGS = 
SHOBJ_CC = cl -nologo
SHOBJ_CFLAGS = -LD
OUTFLAG = -Fe
MAKE_IMPORT_LIB = lib
IMPORT_FLAG = -machine:x86
IMPORT_OFLAG = -out:
IMPORT_DFLAG = -def:
!endif

RM = del
CP = copy
MV = move

SHELL = /bin/sh

!ifndef prefix
prefix = /usr/local
!endif
exec_prefix = $(prefix)

bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
mandir = $(prefix)/man
includedir = $(prefix)/include

infodir = $(prefix)/info

man3dir = $(mandir)/man3

# Programs to make tags files.
ETAGS = etags -tw
CTAGS = ctags -tw


DEFS = -DHAVE_CONFIG_H
LOCAL_DEFS = -DREADLINE_DLL -DBUILDING_DLL

!ifndef __MAKE__
SHOBJ_LIBS = user32.lib advapi32.lib
SHLIB_LIBS =
!endif

# For libraries which include headers from other libraries.
INCLUDES = -I. -I.. -I$(topdir) -I$(includedir)

CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES:/=\) $(LOCAL_CFLAGS) $(CFLAGS)

{..}.c.obj:
	$(CC) -c $(CCFLAGS) $<

{$(topdir:/=\)}.c.obj:
	$(CC) -c $(CCFLAGS) $<

# The name of the main library target.

IMPORT_READLINE = readline.lib
DEFINE_READLINE = libreadlinedl.def
EXPORT_READLINE = readline.dll
IMPORT_HISTORY = history.lib
DEFINE_HISTORY = libhistorydl.def
EXPORT_HISTORY = history.dll
SHARED_LIBS = $(IMPORT_READLINE) $(EXPORT_READLINE) $(IMPORT_HISTORY)

# The C code source files for this library.
CSOURCES = $(topdir)/readline.c $(topdir)/funmap.c $(topdir)/keymaps.c \
	   $(topdir)/vi_mode.c $(topdir)/parens.c $(topdir)/rltty.c \
	   $(topdir)/complete.c $(topdir)/bind.c $(topdir)/isearch.c \
	   $(topdir)/display.c $(topdir)/signals.c $(topdir)/emacs_keymap.c \
	   $(topdir)/vi_keymap.c $(topdir)/util.c $(topdir)/kill.c \
	   $(topdir)/undo.c $(topdir)/macro.c $(topdir)/input.c \
	   $(topdir)/callback.c $(topdir)/terminal.c $(topdir)/xmalloc.c \
	   $(topdir)/history.c $(topdir)/histsearch.c $(topdir)/histexpand.c \
	   $(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \
	   $(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c

# The header files for this library.
HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
	   posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
	   ansi_stdlib.h tcap.h rlstdc.h rldynlink.h

HISTOBJ = history.obj histexpand.obj histfile.obj histsearch.obj shell.obj 
TILDEOBJ = tilde.obj
OBJECTS = readline.obj vi_mode.obj funmap.obj keymaps.obj parens.obj search.obj \
	  rltty.obj complete.obj bind.obj isearch.obj display.obj signals.obj \
	  util.obj kill.obj undo.obj macro.obj input.obj callback.obj terminal.obj \
	  text.obj nls.obj mbutil.obj misc.obj xmalloc.obj $(HISTOBJ) $(TILDEOBJ) dirent.obj

# The texinfo files which document this library.
DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
DOCOBJECT = doc/readline.dvi
DOCSUPPORT = doc/Makefile
DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)

CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile
CREATED_CONFIGURE = config.status config.h config.cache config.log \
		    stamp-config stamp-h
CREATED_TAGS = TAGS

INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
		    rlstdc.h rlconf.h rldynlink.h rltypedefs.h

##########################################################################

all: $(SHARED_LIBS)

supported: $(SHARED_LIBS)

$(IMPORT_READLINE): $(EXPORT_READLINE)

$(EXPORT_READLINE): $(OBJECTS)
	$(SHOBJ_CC) $(SHOBJ_CFLAGS) $(OBJECTS) $(SHOBJ_LIBS) -Fe$@

$(IMPORT_HISTORY): $(DEFINE_HISTORY)
	$(MAKE_IMPORT_LIB) $(IMPORT_FLAG) $(IMPORT_OFLAG)$(IMPORT_HISTORY) $(IMPORT_DFLAG)$(DEFINE_HISTORY)

readline: $(OBJECTS) {$(topdir)}readline.h {$(topdir)}rldefs.h {$(topdir)}chardefs.h
	$(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a 

force: nul

install: installdirs $(SHARED_LIBS)
	$(INSTALL_PROGRAM) readline.dll $(bindir:/=\) /Y >nul
	$(INSTALL_DATA) readline.lib $(libdir:/=\) /Y >nul
	$(INSTALL_DATA) history.lib $(libdir:/=\) /Y >nul
	cd $(topdir:/=\)
	for %i in ($(INSTALLED_HEADERS)) do @$(INSTALL_DATA) %i $(includedir:/=\)\readline /y >nul

installdirs:
	-if not exist $(includedir:/=\)\nul mkdir $(includedir:/=\)
	-if not exist $(includedir:/=\)\readline\nul mkdir $(includedir:/=\)\readline
	-if not exist $(libdir:/=\)\nul mkdir $(libdir:/=\)
	-if not exist $(bindir:/=\)\nul mkdir $(bindir:/=\)

uninstall:
	for %i in ($(INSTALLED_HEADERS)) do @del $(includedir:/=\)\readline\%i >nul
	cd $(bindir:/=\)
	$(RM) readline.dll
	$(RM) history.dll
	cd $(libdir:/=\)
	$(RM) readline.lib
	$(RM) history.lib

install-shared: installdirs shared
	-( cd shlib ; $(MAKE) $(MFLAGS) install )

uninstall-shared:
	-( cd shlib; $(MAKE) $(MFLAGS) uninstall )

TAGS:	force
	$(ETAGS) $(CSOURCES) $(HSOURCES)

clean:	force
	if exist *.obj $(RM) *.obj
	if exist *.exp $(RM) *.exp
	if exist *.tds $(RM) *.tds
	if exist *~ $(RM) *~
	for %i in ($(SHARED_LIBS)) do @if exist %i $(RM) %i

info dvi:
	-( cd doc && $(MAKE) $(MFLAGS) $@ )

install-info:
check:
installcheck:

dist:   force
	@echo Readline distributions are created using $(topdir)/support/mkdist.
	@echo Here is a sample of the necessary commands:
	@echo bash $(topdir)/support/mkdist -m $(topdir)/MANIFEST -s $(topdir) -r $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION)
	@echo tar cf $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION).tar $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION)
	@echo gzip $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION).tar

# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
#.NOEXPORT:

t = {.;$(topdir:/=\)}
# Dependencies
bind.obj: $(t)ansi_stdlib.h $(t)posixstat.h
bind.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
bind.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
bind.obj: $(t)tilde.h $(t)history.h $(t)rldynlink.h
callback.obj: $(t)rlconf.h
callback.obj: $(t)rldefs.h $(BUILD_DIR)/config.h
callback.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
callback.obj: $(t)tilde.h $(t)rldynlink.h
complete.obj: $(t)ansi_stdlib.h $(t)posixdir.h $(t)posixstat.h
complete.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
complete.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
complete.obj: $(t)tilde.h $(t)rldynlink.h
display.obj: $(t)ansi_stdlib.h $(t)posixstat.h
display.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
display.obj: $(t)tcap.h
display.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
display.obj: $(t)tilde.h $(t)history.h $(t)rldynlink.h
funmap.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
funmap.obj: $(t)rlconf.h $(t)ansi_stdlib.h
funmap.obj: $(BUILD_DIR)/config.h $(t)tilde.h $(t)rldynlink.h
histexpand.obj: $(t)ansi_stdlib.h
histexpand.obj: $(t)history.h $(t)histlib.h
histexpand.obj: $(BUILD_DIR)/config.h $(t)rldynlink.h
histfile.obj: $(t)ansi_stdlib.h
histfile.obj: $(t)history.h $(t)histlib.h
histfile.obj: $(BUILD_DIR)/config.h
history.obj: $(t)ansi_stdlib.h
history.obj: $(t)history.h $(t)histlib.h
history.obj: $(BUILD_DIR)/config.h $(t)rldynlink.h
histsearch.obj: $(t)ansi_stdlib.h
histsearch.obj: $(t)history.h $(t)histlib.h
histsearch.obj: $(BUILD_DIR)/config.h $(t)rldynlink.h
input.obj: $(t)ansi_stdlib.h
input.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
input.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
input.obj: $(t)tilde.h $(t)rldynlink.h
isearch.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
isearch.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
isearch.obj: $(t)ansi_stdlib.h $(t)history.h $(t)tilde.h
isearch.obj: $(t)rldynlink.h
keymaps.obj: $(t)emacs_keymap.c $(t)vi_keymap.c
keymaps.obj: $(t)keymaps.h $(t)chardefs.h $(t)rlconf.h
keymaps.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
keymaps.obj: $(BUILD_DIR)/config.h $(t)ansi_stdlib.h $(t)tilde.h
keymaps.obj: $(t)rldynlink.h
kill.obj: $(t)ansi_stdlib.h
kill.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
kill.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
kill.obj: $(t)tilde.h $(t)history.h $(t)rldynlink.h
macro.obj: $(t)ansi_stdlib.h
macro.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
macro.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
macro.obj: $(t)tilde.h $(t)history.h $(t)rldynlink.h
nls.obj: $(t)ansi_stdlib.h
nls.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
parens.obj: $(t)rlconf.h $(BUILD_DIR)/config.h
parens.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
parens.obj: $(t)tilde.h $(t)rldynlink.h
readline.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
readline.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
readline.obj: $(t)history.h $(t)tilde.h $(t)rldynlink.h
readline.obj: $(t)posixstat.h $(t)ansi_stdlib.h $(t)posixjmp.h
rltty.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
rltty.obj: $(t)rltty.h $(t)tilde.h $(t)rldynlink.h
rltty.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
search.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
search.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
search.obj: $(t)ansi_stdlib.h $(t)history.h $(t)tilde.h
search.obj: $(t)rldynlink.h
signals.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
signals.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
signals.obj: $(t)history.h $(t)tilde.h $(t)rldynlink.h
terminal.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
terminal.obj: $(t)tcap.h
terminal.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
terminal.obj: $(t)tilde.h $(t)history.h $(t)rldynlink.h
tilde.obj: $(t)ansi_stdlib.h $(BUILD_DIR)/config.h $(t)tilde.h
tilde.obj: $(t)rldynlink.h
undo.obj: $(t)ansi_stdlib.h
undo.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
undo.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
undo.obj: $(t)tilde.h $(t)history.h $(t)rldynlink.h
util.obj: $(t)posixjmp.h $(t)ansi_stdlib.h
util.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
util.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
util.obj: $(t)tilde.h $(t)rldynlink.h
vi_mode.obj: $(t)rldefs.h $(BUILD_DIR)/config.h $(t)rlconf.h
vi_mode.obj: $(t)readline.h $(t)keymaps.h $(t)chardefs.h
vi_mode.obj: $(t)history.h $(t)ansi_stdlib.h $(t)tilde.h
vi_mode.obj: $(t)rldynlink.h
xmalloc.obj: $(BUILD_DIR)/config.h
xmalloc.obj: $(t)ansi_stdlib.h

#readline.obj: $(topdir)/readline.c
#vi_mode.obj: $(topdir)/vi_mode.c
#funmap.obj: $(topdir)/funmap.c
#keymaps.obj: $(topdir)/keymaps.c
#parens.obj: $(topdir)/parens.c
#search.obj: $(topdir)/search.c
#rltty.obj: $(topdir)/rltty.c
#complete.obj: $(topdir)/complete.c
#bind.obj: $(topdir)/bind.c
#isearch.obj: $(topdir)/isearch.c
#display.obj: $(topdir)/display.c
#signals.obj: $(topdir)/signals.c
#util.obj: $(topdir)/util.c
#kill.obj: $(topdir)/kill.c
#undo.obj: $(topdir)/undo.c
#macro.obj: $(topdir)/macro.c
#input.obj: $(topdir)/input.c
#callback.obj: $(topdir)/callback.c
#terminal.obj: $(topdir)/terminal.c
#nls.obj: $(topdir)/nls.c
#xmalloc.obj: $(topdir)/xmalloc.c
#history.obj: $(topdir)/history.c
#histexpand.obj: $(topdir)/histexpand.c
#histfile.obj: $(topdir)/histfile.c
#histsearch.obj: $(topdir)/histsearch.c
#savestring.obj: $(topdir)/savestring.c
#shell.obj: $(topdir)/shell.c
#tilde.obj: $(topdir)/tilde.c
#
#dirent.obj: ../dirent.c
#
#readline.obj: readline.c
#vi_mode.obj: vi_mode.c
#funmap.obj: funmap.c
#keymaps.obj: keymaps.c
#parens.obj: parens.c
#search.obj: search.c
#rltty.obj: rltty.c
#complete.obj: complete.c
#bind.obj: bind.c
#isearch.obj: isearch.c
#display.obj: display.c
#signals.obj: signals.c
#util.obj: util.c
#kill.obj: kill.c
#undo.obj: undo.c
#macro.obj: macro.c
#input.obj: input.c
#callback.obj: callback.c
#terminal.obj: terminal.c
#nls.obj: nls.c
#xmalloc.obj: xmalloc.c
#history.obj: history.c
#histexpand.obj: histexpand.c
#histfile.obj: histfile.c
#histsearch.obj: histsearch.c
#savestring.obj: savestring.c
#shell.obj: shell.c
#tilde.obj: tilde.c
