# Generated automatically from Makefile.in by configure.
#
#  Main makefile for Objective-C collection library
#  Copyright (C) 1993 Free Software Foundation, Inc.
#
#  Written by:	R. Andrew McCallum <mccallum@cs.rochester.edu>
#  Dept. of Computer Science, U. of Rochester, Rochester, NY  14627
#
#  This file is part of the GNU Objective-C Collection library.
#
#  This library is free software; you can redistribute it and/or
#  modify it under the terms of the GNU Library General Public
#  License as published by the Free Software Foundation; either
#  version 2 of the License, or (at your option) any later version.
#
#  This library 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
#  Library General Public License for more details.
#
#  You should have received a copy of the GNU Library General Public
#  License along with this library; if not, write to the Free
#  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# Kunz 4-Oct-1993
# modified to build library in area for developers
INCCOLL = ..
LIBCOLL = $(INCCOLL)/libcoll.a
 

SHELL = /bin/sh

#### Start of system configuration section. ####

srcdir = .
VPATH = .

CC = gcc
RANLIB = ranlib
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
AR = ar
ARFLAGS = rc
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
LEX = flex
LFLAGS =
     
DEFS =  -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
     
# All these are optional.  You can redifine CFLAGS, CPPFLAGS and
# INCLUDEFLAGS on the command line however you like.
CFLAGS = -Wall -Wno-implicit -g -O
CPPFLAGS = 
INCLUDEFLAGS =

prefix = /usr/local
exec_prefix = $(prefix)

# Installation locations
libdir = $(exec_prefix)/lib
includedir = $(prefix)/include/coll
infodir = $(prefix)/info

#### End of system configuration section. ####

COLL_GCC_VERSION = 2.5.8
COLL_VERSION = 940510
# When we get out of alpha testing, we'll start using this number scheme
#COLL_VERSION = $(COLL_GCC_VERSION)A

ALL_INCLUDE_FLAGS = -I$(srcdir) $(INCLUDEFLAGS)
ALL_CPPFLAGS = $(ALL_INCLUDE_FLAGS) $(CPPFLAGS)
ALL_CFLAGS = $(CFLAGS)
ALL_OBJCFLAGS = $(CFLAGS) -Wno-protocol

# definitions to be passed to subdir Makefile's
MAKEDEFINES = CC='$(CC)' CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' \
INCLUDEFLAGS='$(INCLUDEFLAGS)' DEFS='$(DEFS)'

.SUFFIXES: .m
.m.o:
	$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_OBJCFLAGS) $<
.c.o:
	$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_CFLAGS) $<

SRCS = \
Array.m \
Bag.m \
BinaryTree.m \
BinaryTreeEltNode.m \
BinaryTreeNode.m \
CircularArray.m \
Collection.m \
DelegateList.m \
Dictionary.m \
EltNodeCollector.m \
GapArray.m \
HashTable.m \
Heap.m \
IndexedCollection.m \
KeyedCollection.m \
LinkedList.m \
LinkedListEltNode.m \
LinkedListNode.m \
List.m \
Magnitude.m \
MappedCollector.m \
Queue.m \
RBTree.m \
RBTreeEltNode.m \
RBTreeNode.m \
Set.m \
SplayTree.m \
Stack.m \
Storage.m \
String.m \
NXStringTable.m \
NXStringTable_scan.c \
NXStringTable_scan.l \
Time.m \
collhash.c \
collstd.m \
eltfuncs.m \
objc-malloc.m

COLLOBJS = \
Array.o \
Bag.o \
BinaryTree.o \
BinaryTreeEltNode.o \
BinaryTreeNode.o \
CircularArray.o \
Collection.o \
DelegateList.o \
Dictionary.o \
EltNodeCollector.o \
GapArray.o \
Heap.o \
IndexedCollection.o \
KeyedCollection.o \
LinkedList.o \
LinkedListEltNode.o \
LinkedListNode.o \
Magnitude.o \
MappedCollector.o \
Queue.o \
RBTree.o \
RBTreeEltNode.o \
RBTreeNode.o \
Set.o \
SplayTree.o \
Stack.o \
String.o \
Time.o \
collhash.o \
collstd.o \
eltfuncs.o \
objc-malloc.o

NeXTOBJS = \
HashTable.o \
List.o \
NXStringTable.o \
NXStringTable_scan.o \
Storage.o 

INSTALLOBJS = $(COLLOBJS) $(NeXTOBJS) 

COLLHDRS = \
coll/Array.h \
coll/ArrayPrivate.h \
coll/Bag.h \
coll/BinaryTree.h \
coll/BinaryTreeEltNode.h \
coll/BinaryTreeNode.h \
coll/CircularArray.h \
coll/CircularArrayPrivate.h \
coll/Collecting.h \
coll/Collection.h \
coll/CollectionPrivate.h \
coll/DelegateList.h \
coll/Dictionary.h \
coll/EltNode-h \
coll/EltNode-m \
coll/EltNodeCollector.h \
coll/GapArray.h \
coll/GapArrayPrivate.h \
coll/HashTable.h \
coll/Heap.h \
coll/IndexedCollecting.h \
coll/IndexedCollection.h \
coll/IndexedCollectionPrivate.h \
coll/KeyedCollecting.h \
coll/KeyedCollection.h \
coll/LinkedList.h \
coll/LinkedListEltNode.h \
coll/LinkedListNode.h \
coll/Magnitude.h \
coll/MappedCollector.h \
coll/Ordering.h \
coll/Queue.h \
coll/RBTree.h \
coll/RBTreeEltNode.h \
coll/RBTreeNode.h \
coll/ReferenceCounting.h \
coll/Set.h \
coll/SplayTree.h \
coll/Stack.h \
coll/String.h \
coll/Time.h \
coll/ValueHolding.h \
coll/coll.h \
coll/collhash.h \
coll/collstd.h \
coll/elt.h \
coll/eltfuncs.h \
coll/objc-malloc.h \
coll/objc-gnu2next.h

NeXTHDRS = \
coll/HashTable.h \
coll/List.h \
coll/NXStringTable.h \
coll/Storage.h

INSTALLHDRS = $(COLLHDRS) $(NeXTHDRS)

DISTFILES = \
$(SRCS) $(COLLHDRS) $(NeXTHDRS) \
COPYING COPYING.LIB DISCUSSION ChangeLog \
Makefile.in Makefile.depend configure configure.in config.nested.c \
mkinstalldirs \
version.texi \
README readme.texi \
INSTALL install.texi \
TODO todo.texi \
NEWS news.texi \
libcoll.info libcoll.texi \
texinfo.tex

all: $(LIBCOLL)

$(LIBCOLL): $(INSTALLOBJS)
	$(AR) $(ARFLAGS) $(LIBCOLL) $(INSTALLOBJS)
	$(RANLIB) $(LIBCOLL)

# copy objc headers to installation include directory -- pfkeb
ALLHDRS = $(COLLHDRS) $(NeXTHDRS)
copy-headers: 
	for file in $(ALLHDRS); do \
	  cp $$file $(INCCOLL)/coll; \
	done

install: installdirs all
	$(INSTALL_DATA) $(LIBCOLL) $(libdir)/libcoll.a
	$(RANLIB) $(libdir)/libcoll.a
	$(INSTALL_DATA) $(HDRS) $(includedir)
	$(INSTALL_DATA) libcoll.info $(infodir)

installdirs:
	$(srcdir)/mkinstalldirs $(includedir) $(libdir) $(infodir)

uninstall:
	rm -f $(libdir)/libcoll.a
	rm -rf $(includedir)
	rm -f $(infodir)/libcoll.info

check: $(LIBCOLL)
	cd checks; $(MAKE) $(MAKEFLAGS) $(MAKEDEFINES)

depend:
	rm -f $(srcdir)/Makefile.depend
	$(CC) $(ALL_INCLUDE_FLAGS) -M $(SRCS) > $(srcdir)/Makefile.depend

NXStringTable_scan.c: NXStringTable_scan.l
	@echo "Makefile passing over NXStringTable_scan.l"
	@echo "NXStringTable_scan.l originally processed with GNU flex-2.4.6"
	@echo "Earlier versions do not work."
	touch NXStringTable_scan.c

#	$(LEX) $(LFLAGS) -t NXStringTable_scan.l > NXStringTable_scan.c

# turn off warnings while compiling NXStringTable_scan.c
NXStringTable_scan.o: NXStringTable_scan.c
	$(CC) -c $(ALL_CPPFLAGS) $(DEFS) $(ALL_CFLAGS) -w NXStringTable_scan.c

coll/collstd.h: Makefile.in
	rm -f tmp-collstd.h
	sed -e \
	's/#define COLL_VERSION .*/#define COLL_VERSION $(COLL_VERSION)/'\
		< coll/collstd.h >tmp-collstd.h
	rm $(srcdir)/coll/collstd.h
	sed -e \
	's/#define COLL_GCC_VERSION .*/#define COLL_GCC_VERSION $(COLL_GCC_VERSION)/'\
		< tmp-collstd.h > $(srcdir)/coll/collstd.h 

collstd.m: coll/collstd.h

version.texi: Makefile
	rm -f $(srcdir)/version.texi
	echo '@set COLL_VERSION' $(COLL_VERSION) > $(srcdir)/version.texi
	echo '@set COLL_GCC_VERSION' $(COLL_GCC_VERSION) \
		>> $(srcdir)/version.texi

info: libcoll.info TODO INSTALL NEWS README
dvi: libcoll.texi version.texi
	$(TEXI2DVI) $(srcdir)/libcoll.texi

libcoll.info: libcoll.texi todo.texi version.texi
	$(MAKEINFO) $(srcdir)/libcoll.texi
TODO: todo.texi version.texi
	$(MAKEINFO) -o TODO -D TODO_ONLY \
	--no-header --no-split $(srcdir)/todo.texi
INSTALL: install.texi version.texi
	$(MAKEINFO) -o INSTALL -D INSTALL_ONLY \
	--no-header --no-split $(srcdir)/install.texi
README: readme.texi version.texi
	$(MAKEINFO) -o README -D README_ONLY \
	--no-header --no-split $(srcdir)/readme.texi
NEWS: news.texi version.texi
	$(MAKEINFO) -o NEWS -D NEWS_ONLY \
	--no-header --no-split $(srcdir)/news.texi
Makefile: Makefile.in config.status
	$(SHELL) config.status
config.status: configure
	$(SHELL) $(srcdir)/configure --no-create
configure: configure.in
	cd $(srcdir); autoconf

TAGS: $(SRCS)
	etags $(SRCS)

mostlyclean:
	rm -f *~ coll/*~ core

clean: mostlyclean
	rm -f $(LIBCOLL) *.o
	rm -f libcoll.dvi libcoll.aux libcoll.log libcoll.toc libcoll.cl \
	libcoll.cp libcoll.cps libcoll.fn libcoll.fns libcoll.ky \
	libcoll.pg libcoll.pr libcoll.tp libcoll.vr

distclean: clean
	rm -f Makefile config.status 

realclean: distclean
	rm -f TAGS configure \
		libcoll.info version.texi README TODO INSTALL NEWS

dist: $(DISTFILES)
	echo libcoll-$(COLL_VERSION) > .fname
	rm -rf `cat .fname`
	mkdir `cat .fname`
	mkdir `cat .fname`/coll
	# previously did this: -ln (DISTFILES) `cat .fname`
	for file in $(DISTFILES); do \
	  ln $$file `cat .fname`/$$file ; \
	done
	cd checks; $(MAKE) $(MAKEFLAGS) dist
	tar -chvf `cat .fname`.tar `cat .fname`
	gzip `cat .fname`.tar
	rm -rf `cat .fname` .fname

include Makefile.depend
