###########################################################################
#
# Makefile.in -- Makefile for the general purpose library
# Copyright (C) 1994  Neil Sharman; (C) 1995 Tim Shimmin
#
# 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 of the License, 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.
#
#       @(#)Makefile.in	1.3 16 Mar 1994
#
###########################################################################


PACKAGE = @PACKAGE@
VERSION = @VERSION@

SHELL = /bin/sh
srcdir = @srcdir@
subdir = lib
VPATH = @srcdir@


AR = ar
CC = @CC@
CXX = @CXX@
ifneq ($(NZDL), 1)
CFLAGS = @CFLAGS@ -ansi @ARCH_DEP_FLAGS@
else 
CFLAGS = @CFLAGS@ -ansi @ARCH_DEP_FLAGS@ -DSILENT
endif
CXXFLAGS = @CXXFLAGS@ @ARCH_DEP_FLAGS@
DEFS = @DEFS@
RANLIB = @RANLIB@

exec_prefix = @exec_prefix@
prefix = @prefix@
libdir = @libdir@
datadir = $(prefix)/share
localedir = $(datadir)/locale

COMPILE = $(CC) -c $(DEFS) $(INCLUDES)  $(CFLAGS)
CXXCOMPILE = $(CXX) -c $(DEFS) $(INCLUDES) $(CXXFLAGS)

.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
	$(COMPILE) $<

.SUFFIXES: .cpp .o
.cpp.o:
	$(COMPILE) -D__cplusplus $<

ANSI2KNR = @ANSI2KNR@
o = .@U@o

.SUFFIXES: ._c ._o
.c._c:
	./ansi2knr $< > $*.tmp && mv $*.tmp $@
._c._o:
	@echo $(COMPILE) $<
	@rm -f _$*.c
	@ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
.c._o:
	./ansi2knr $< > $*.tmp && mv $*.tmp $*._c
	@echo $(COMPILE) $*._c
	@rm -f _$*.c
	@ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c

INCLUDES = -I.. -I$(srcdir)

HEADERS = \
    bitio_m_random.h   local_strings.h    lovinstem.h \
    bitio_m_stdio.h    memlib.h           netorder.h \
    bitio_gen.h        mgheap.h           messages.h \
    bitio_m.h          huffman.h  \
    bitio_m_mem.h      perf_hash.h \
    bitio_m_mems.h      \
    pathmax.h          getpagesize.h      sysfuncs.h         bitio_m_abstract.h  \
    random.h           simplefrenchstem.h unitool.h	     longlong.h \
    non_ansi.h


SOURCES = \
    mgheap.cpp         \
    huffman.cpp       messages.cpp \
    bitio_gen.cpp     perf_hash.cpp \
    local_strings.cpp lovinstem.cpp \
    bitio_m_mem.cpp   bitio_m_stdio.cpp bitio_m_mems.cpp \
    alloca.c          xmalloc.c         strstr.cpp \
    ftruncate.cpp     strcasecmp.cpp    random.cpp \
    simplefrenchstem.cpp                unitool.cpp       bitio_m_random.cpp \
    bitio_m_abstract.cpp
# memlib.cpp removed

OBJECTS =  mgheap$o   \
    huffman$o         messages$o \
    bitio_gen$o       perf_hash$o \
     local_strings$o   lovinstem$o \
    bitio_m_mem$o     bitio_m_stdio$o   bitio_m_mems$o \
    xmalloc$o         bitio_m_random$o  bitio_m_abstract$o \
     random$o          simplefrenchstem$o \
    unitool$o

DISTFILES = Makefile.in $(HEADERS) $(SOURCES)

all : libmgpplib.a

libmgpplib.a : $(OBJECTS)
	rm -f libmgpplib.a
	$(AR) cru libmgpplib.a $(OBJECTS)
	$(RANLIB) libmgpplib.a

install: 
installdirs:
uninstall:
execinstall:
execuninstall:
maninstall:
manuninstall:

dist: $(DISTFILES)
	for file in $(DISTFILES); do \
	  ln $$file $(distdir) 2> /dev/null \
	  || cp -p $$file $(distdir); \
	done

mostlyclean:
	rm -f *.o *_.o

clean: mostlyclean
	rm -f libmgpplib.a

distclean: clean
	rm -f Makefile

maintainer-clean: distclean
	@echo "This command is intended only for maintainers to use;"
	@echo "rebuilding the deleted files may require special tools."

# breaks make distclean (jrm21)
#Makefile: Makefile.in ../../../config.status
#	cd ../../.. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status

# 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:
