# Master Makefile for GNU Smalltalk
# Copyright 1988-92, 1994-95, 1999, 2000 Free Software Foundation, Inc.
# Written by Steve Byrne

# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

# $Revision: 1.7.5$

# Make sure this is the first target
all: $(PROGS)


MAIN_SOURCES = main.c cfuncs.c

# Many thanks to find, tr and fmt for help in producing these lists!
KERNEL_FILES = kernel/Array.st kernel/ArrayColl.st \
	kernel/Association.st kernel/Autoload.st \
	kernel/CharArray.st kernel/Bag.st \
	kernel/Behavior.st kernel/BlkClosure.st \
	kernel/BlkContext.st kernel/Boolean.st \
	kernel/Browser.st kernel/Builtins.st \
	kernel/ByteArray.st kernel/ByteMemory.st \
	kernel/ByteStream.st kernel/CFuncs.st \
	kernel/CObject.st kernel/CStruct.st \
	kernel/CType.st kernel/Character.st \
	kernel/Class.st kernel/ClassDesc.st \
	kernel/Collection.st kernel/CompildCode.st \
	kernel/CompildMeth.st kernel/CompiledBlk.st \
	kernel/ContextPart.st kernel/Date.st \
	kernel/Delay.st kernel/Dictionary.st \
	kernel/DirMessage.st kernel/Directory.st \
	kernel/DLD.st kernel/ExcHandling.st \
	kernel/False.st kernel/File.st \
	kernel/FileSegment.st kernel/FileStream.st \
	kernel/Float.st kernel/Fraction.st \
	kernel/IdentDict.st kernel/IdentitySet.st \
	kernel/Integer.st kernel/Interval.st \
	kernel/LargeInt.st kernel/Link.st \
	kernel/LinkedList.st kernel/LookupKey.st \
	kernel/LookupTable.st kernel/Magnitude.st \
	kernel/MappedColl.st kernel/Memory.st \
	kernel/Message.st kernel/Metaclass.st \
	kernel/MethodInfo.st kernel/MethodDict.st \
	kernel/MthContext.st kernel/Namespace.st \
	kernel/Number.st kernel/ObjDumper.st \
	kernel/Object.st kernel/OrderColl.st \
	kernel/PkgLoader.st kernel/Point.st \
	kernel/PosStream.st kernel/ProcSched.st \
	kernel/Process.st kernel/RWStream.st \
	kernel/Random.st kernel/ReadStream.st \
	kernel/Rectangle.st kernel/RootNamespc.st \
	kernel/RunArray.st kernel/Semaphore.st \
	kernel/SeqCollect.st kernel/Set.st \
	kernel/SharedQueue.st kernel/SmallInt.st \
	kernel/SortCollect.st \
	kernel/Stream.st kernel/String.st \
	kernel/SymLink.st kernel/Symbol.st \
	kernel/SysDict.st kernel/Time.st \
	kernel/TokenStream.st kernel/Transcript.st \
	kernel/True.st kernel/UndefObject.st \
	kernel/ValueAdapt.st kernel/WeakObjects.st \
	kernel/WordMemory.st kernel/WriteStream.st \
	kernel/initialize.st

MAIN_ST_SOURCES = \
	Load.st Reload.st $(KERNEL_FILES) \
	cint/CDeclNode.st cint/CExpressionNode.st \
	cint/CPP.st cint/CPStrConc.st \
	cint/CPStrUnq.st cint/CParseType.st \
	cint/CSymbol.st cint/CSymbolTable.st \
	cint/CTok.st cint/CToken.st \
	cint/CTreeBuilder.st cint/CollapsedStream.st \
	cint/CPStrUnq.st cint/CPStrConc.st \
	cint/README cint/ExpansionStream.st \
	cint/ExpStreamStack.st cint/LineStream.st \
	cint/LineTokenStream.st cint/StreamStack.st \
	compiler/Load.st compiler/STCompLit.st \
	compiler/StartCompiler.st compiler/STVisitor.st \
	compiler/STParseNodes.st compiler/STParser.st \
	compiler/STSymTable.st compiler/STTok.st \
	compiler/STToken.st compiler/STCompiler.st compiler/README

GDBM_FILES = examples/gdbm/gdbm.st

EXAMPLE_FILES = examples/Application.st examples/Bench.st \
	examples/Case.st examples/CompFileSeg.st \
	examples/DBFile.st examples/Debugger.st \
	examples/EditStream.st examples/GenClasses.st \
	examples/IndStream.st examples/MemUsage.st \
	examples/CStream.st examples/Dinner.st \
	examples/PrtHier.st examples/Publish.st \
	examples/Queens.st examples/PushBack.st \
	examples/RandomInt.st examples/Buffers.st \
	examples/README examples/RecursLit.st \
	examples/RegExp.st examples/Tokenizer.st \
	examples/Richards.st examples/Timer.st \
	examples/shell examples/Watchdog.st \
	examples/Prolog.st examples/Lisp.st \
	examples/blox/Man.st examples/blox/Tetris.st \
	examples/mixed/self.st examples/mixed/resolve.st \
	examples/mixed/a.st examples/mixed/ba.st \
	examples/mixed/BigExpr.st examples/mixed/bug.st \
	examples/mixed/bug2.st examples/mixed/bug4.st \
	examples/mixed/CInt.st examples/mixed/binary.c \
	examples/mixed/Compiler.st \
	examples/mixed/CParseT1.st \
	examples/mixed/CParseT2.st \
	examples/mixed/CParseT3.st \
	examples/mixed/CPP-test.st \
	examples/mixed/CString.st examples/mixed/DLD.st \
	examples/mixed/market.st examples/mixed/er2.st \
	examples/mixed/Extensn.st \
	examples/mixed/IfError.st \
	examples/mixed/Interr.st \
	examples/mixed/ParseErr.st \
	examples/mixed/Process1.st \
	examples/mixed/Process2.st \
	examples/mixed/Profile.st \
	examples/mixed/Sorting.st \
	examples/mixed/t.st examples/mixed/torture.st

LIBRARY_FILES =	lib/Makefile.in lib/alloc.c \
	lib/alloc.h lib/alloca.c lib/byte.c \
	lib/byte.h lib/callin.c lib/callin.h \
	lib/cfuncs.c lib/cint.c lib/cint.h \
	lib/comp.c lib/comp.h lib/dict.c \
	lib/dict.h lib/dict.inl lib/dynamic.c \
	lib/dynamic.h lib/dld_aix.c \
	lib/dld_gnu.c lib/dld_gst.c \
	lib/dld_gst.h lib/dld_hpux.c \
	lib/dld_libdl.c lib/dld_ltdl.c \
	lib/dld_none.c lib/dld_win32.c \
	lib/gst.h lib/$(GST_TAB).c \
	lib/$(GST_TAB).h lib/gst.y lib/gstpub.h \
	lib/interp.c lib/interp.h \
	lib/interp.inl lib/lex.c lib/lex.h \
	lib/lib.c lib/lib.h lib/memzero.h \
	lib/obstack.c lib/obstack.h lib/oop.c \
	lib/oop.h lib/oop.inl lib/prims.inl \
	lib/putenv.c lib/qsort.c lib/register.h \
	lib/save.c lib/save.h lib/str.c \
	lib/str.h lib/strdup.c lib/strtoul.c \
	lib/sym.c lib/sym.h lib/sysdep.c \
	lib/sysdep.h lib/tree.c lib/tree.h \
	lib/waitpid.c

DOC_FILES = docs/COPYING docs/COPYING.LESSER docs/categories \
	docs/NEWS docs/todo docs/tutorial.txi \
	docs/gpl.txi docs/gst.txi docs/toc.txi \
	docs/ChangeLog.TCP docs/ChangeLog.Blox \
	docs/ChangeLog.C docs/ChangeLog.ST \
	docs/Makefile docs/texinfo.tex \
	docs/gst.info* docs/DOM.html \
	docs/stamp-classes docs/AUTHORS

EMACS_FILES = emacs/bison.el emacs/st-changelog.el emacs/st.el

TEST_FILES = test/arrays.ok test/arrays.st \
	test/blocks.ok test/blocks.st \
	test/chars.ok test/chars.st \
	test/classes.ok test/classes.st \
	test/dates.ok test/dates.st \
	test/delays.ok test/delays.st \
	test/do-check \
	test/exceptions.ok test/exceptions.st \
	test/floatmath.ok test/floatmath.st \
	test/geometry.ok test/geometry.st \
	test/intmath.ok test/intmath.st \
	test/objects.ok test/objects.st \
	test/processes.ok test/processes.st \
	test/sets.ok test/sets.st \
	test/strings.ok test/strings.st

BLOX_FILES = blox/BBrowser.st blox/BB-Run.st \
	blox/bear.gif blox/Colors.txt \
	blox/BrowserMain.st blox/ClassBrow.st \
	blox/CtxtInspect.st blox/GuiData.st \
	blox/DictInspect.st blox/MethInspect.st \
	blox/Notifier.st blox/Load.st \
	blox/Run.st blox/BrowShell.st \
	blox/Inspector.st blox/Manager.st \
	blox/Menu.st blox/MethSetBrow.st \
	blox/ModalDialog.st blox/PList.st \
	blox/PText.st blox/RadioForm.st \
	blox/StrcInspect.st blox/PCode.st \
	blox/View.st blox/Blox.st \
	blox/BloxBasic.st blox/BloxCanvas.st \
	blox/BloxExtend.st blox/BloxText.st \
	blox/BloxWidgets.st blox/test.st \

TCP_FILES = tcp/AbstractSocket.st tcp/init.st \
	tcp/AbstrSocketImpl.st tcp/cfuncs.st \
	tcp/ContentHandler.st tcp/Datagram.st \
	tcp/DGSocket.st tcp/DGSocketImpl.st \
	tcp/IPAddress.st tcp/MulticastSocket.st \
	tcp/ServerSocket.st tcp/Socket.st \
	tcp/SocketImpl.st tcp/TCP.st \
	tcp/TCPSocketImpl.st tcp/UDPSocketImpl.st \
	tcp/UnixStream.st tcp/URL.st

XML_FILES = xml/DOM.st xml/XWalker.st

M4_FILES = m4/waitpid.m4 m4/dld_api.m4 m4/double.m4 m4/ext_goto.m4 \
	m4/inet.m4 m4/localtime.m4 m4/obstack.m4 m4/oldansi.m4 \
	m4/readline.m4 m4/signed.m4 m4/strtoul.m4 m4/symbolset.m4 \
	m4/tcltk.m4 m4/checkprog.m4 m4/va_arg.m4

CONFIGURE_FILES = acconfig.h configure configure.in gstconf.h.in inst-pkg \
	Makefile.body Makefile.defs.in Makefile.rules modules short-names \
	config.guess config.sub stamp-h.in install-sh $(M4_FILES)

CONFIGURE_GENERATED = gstconf.h Makefile.defs lib/Makefile

OTHER_FILES = gsticon.ico INSTALL inst-pkg packages

INSTALLED_FILES = $(GDBM_FILES) $(MAIN_ST_SOURCES) $(TEST_FILES) \
	$(TCP_FILES) $(EXAMPLE_FILES) $(BLOX_FILES)

INSTALLED_DIRS = $(stdir) $(stdir)/kernel $(stdir)/blox $(stdir)/examples \
	$(stdir)/examples/gdbm $(stdir)/examples/blox \
	$(stdir)/examples/mixed $(stdir)/tcp $(stdir)/cint $(stdir)/compiler \
	$(stdir)/test $(stdir)/xml

MORE_SOURCES = examples/gdbm/Makefile.body \
	examples/gdbm/cfuncs.h examples/gdbm/gdbm.c \
	blox/Blox.c blox/cfuncs.h \
	blox/Makefile.body blox/rgbtab.h \
	tcp/tcp.c tcp/Makefile.body tcp/cfuncs.h

OBJECTS = main.o cfuncs.o

SOURCES = $(MAIN_SOURCES)

DISTFILES = $(MAIN_SOURCES) $(MORE_SOURCES) $(CONFIGURE_FILES) \
	$(OTHER_FILES) $(LIBRARY_FILES) $(DOC_FILES) $(EMACS_FILES) \
	$(INSTALLED_FILES) $(XML_FILES)
