#
# $Header$
#
# -------------- no need to change anything below ----------
TOP=../..
SUBDIRS=
RCSSOURCES=*.rc patches Make.proto
LINKSOURCES=*.rc patches Make.proto
DELIVERBINARIES=smalltalk
#
# other definitions to use for things compiled here
#
LOCALDEFS=-DDEBUG
# ST_LDFLAG=
#
# see COMMON/defines for what those XXX_LIB etc. are
#
# MINI_LIB = libbasic, libcomp $(PRIVATELIBS)
# FUNDAMENTAL_LIB = above PLUS libview, libwidg
# DEVELOP_LIB = above PLUS libtool
# STANDARD_LIB = above PLUS libwidg2, libdbase
# EXTENDED_LIB = above PLUS libwidg3
#
# this defines where the show starts
#
STARTUP_CLASS="Smalltalk"
STARTUP_SELECTOR="start"
#
# directories from which bitmap files in bitmap subdirectories are to be symlinked
# to the bitmaps subdirectory
#
BITMAPDIRS= \
$(LIBBASIC2DIR) $(LIBVIEWDIR) $(LIBVIEW2DIR) $(LIBWIDGDIR) $(LIBWIDG2DIR) \
$(LIBWIDG3DIR) $(LIBTABLEDIR) $(LIBTOOLDIR) $(CLIENTDIR)/[A-Z]* \
$(OTHERLIBDIRS) \
$(TOP)/fileIn $(TOP)/fileIn/* $(TOP)/goodies \
$(TOP)/goodies/* $(TOP)/goodies/*/*
MOREBITMAPDIRS= \
$(TOP)/goodies/bitmaps/*
#
# directories from which binary files are to be symlinked
# to the binary subdirectory
#
BINARYDIRS= \
$(LIBBASICDIR) $(LIBBASIC2DIR) $(LIBBASIC3DIR) $(LIBVIEWDIR) $(LIBVIEW2DIR) $(LIBWIDGDIR) \
$(LIBWIDG2DIR) $(LIBWIDG3DIR) $(LIBTOOLDIR) $(CLIENTDIR)/[A-Z]* \
$(LIBCOMPDIR) $(LIBTABLEDIR) $(LIBCOMPATDIR) $(LIBPRODIR) $(OTHERLIBDIRS) \
$(TOP)/fileIn $(TOP)/libtomcat $(TOP)/goodies $(TOP)/goodies/* \
$(TOP)/goodies/*/* $(EXTRA_BINARYDIRS)
#
# directories from which source files are to be symlinked
# to the source subdirectory
#
SOURCEDIRS= \
$(LIBBASICDIR) $(LIBBASIC2DIR) $(LIBBASIC3DIR) $(LIBCOMPDIR) $(LIBVIEWDIR) $(LIBVIEW2DIR) \
$(LIBWIDGDIR) $(LIBWIDG2DIR) $(LIBWIDG3DIR) $(LIBTOOLDIR) $(CLIENTDIR)/[A-Z]* \
$(LIBTABLEDIR) $(LIBUIDIR) $(LIBCOMPATDIR) $(LIBPRODIR) $(OTHERLIBDIRS) \
$(TOP)/fileIn $(TOP)/libtomcat $(TOP)/goodies $(TOP)/goodies/* \
$(TOP)/goodies/*/*
#
# including your own private lib in the make process and executable:
#
# for example, if you have a libprivate directory,
# where libprivate.obj is built, and that one should be included,
# add lines as below to your configuration/.../defines file:
# PRIVATEOBJ=$(TOP)/libprivate/libprivate.obj
# PRIVATE_SO=$(TOP)/libprivate/libprivate.so
# PRIVATELIBS=libprivate
# ---------------------- end additional stuff --------------------
#
# default target: create the TARGET (usually smalltalk),
# create subdirectories with source-links, bitmap-links and resource-links
#
all:: $(TARGET)$(TARGET_RULE_EXTENSION) symlinks
#
# same, force recreation of link-directories
#
allNew: $(TARGET)$(TARGET_RULE_EXTENSION) newResources styles newSource newBitmaps binary newInclude misc
#
# create symbolic links to sources, resources etc.
# normally (on an end-user system) these should go into usr/local/lib/smalltalk
#
symlinks: resources styles newSource bitmaps bitmapLink binary binaryLink includeLink misc
#
# the standard smalltalk executable:
# basic classes + view & widgets + tools + persistency
#
xsmalltalk: $(TARGET)
smalltalk:: $(TARGET)$(TARGET_RULE_EXTENSION)
#
# demo for a graphical standAlone application (simply opening a FileBrowser)
#
demoApp1:
-rm main.o modulList.*
$(MAKE) main.o MAIN=$(LIBRUNDIR)/appmain.c STARTUP_CLASS='"FileBrowser"' STARTUP_SELECTOR='"open"'
$(MAKE) linkTarget TARGET=demoApp1
-rm main.o modulList.*
#
# demo for a non-graphical standAlone application (simply computing 100 factorial)
#
demoApp2: DemoApp2.o
-rm main.o modulList.*
$(MAKE) main.o MAIN=$(LIBRUNDIR)/appmain.c STARTUP_CLASS='"DemoApp2"' STARTUP_SELECTOR='"start"'
$(MAKE) linkTarget \
LIBLIST="$(MINI_LIST)" \
LIBOBJS="$(MINI_LIB)" \
TARGET=demoApp2 \
EXTRA_OBJ="DemoApp2.o" \
EXTRA_CLASSES="DemoApp2"
-rm main.o modulList.* DemoApp2.st DemoApp2.o
DemoApp2.o:: DemoApp2.st
DemoApp2.st:
-cp $(CLIENTDIR)/Demos/DemoApp2.st .
smalltalk_static:
@echo "making statically linked smalltalk ..."
@$(MAKE) linkIt LIBOBJS="$(LIBOBJS)" EXTRA_OBJ="$(EXTRA_OBJ)" LIBLIST="$(LIBLIST)"
smalltalk_shared:
@echo "making shared library linked smalltalk ..."
@$(MAKE) linkIt LIBOBJS="$(LIBOBJS)" EXTRA_OBJ="$(EXTRA_OBJ)" LIBLIST="$(LIBLIST)"
forceStatic:
(cd $(LIBBASICDIR) ; make libbasicInit.o)
-rm $(LIBBASICDIR)/libbasic.o
$(MAKE) linkIt LIBRUN="$(LIBRUNDIR)/*.o" LIBBASIC="$(LIBBASICDIR)/*.o"
#
# a "smaller" smalltalk (does not include development classes)
#
smalltalk_exec:
-rm modulList.stc
@$(MAKE) modulList.stc \
EXTRA_CLASSES="$(EXTRA_CLASSES) DebugView" \
EXTRA_OBJ="$(EXTRA_OBJ) $(LIBTOOLDIR)/DebugView$(BIN_O)" \
LIBLIST="$(FUNDAMENTAL_LIST)"
@$(MAKE) smalltalk \
LIBLIST="$(FUNDAMENTAL_LIST)" \
EXTRA_CLASSES="$(EXTRA_CLASSES) DebugView" \
EXTRA_OBJ="$(EXTRA_OBJ) $(LIBTOOLDIR)/DebugView$(BIN_O)" \
LIBOBJS="$(FUNDAMENTAL_LIB)"
if [ ! -f binary/DebugView$(BIN_O) ]; then \
(cd binary ; ln -s ../../../libtool/DebugView.so .); \
fi
$(LIBTOOLDIR)/DebugView.so:
(cd $(LIBTOOLDIR) ; $(MAKE) DebugView.so)
$(LIBTOOLDIR)/DebugView.o:
(cd $(LIBTOOLDIR) ; $(MAKE) DebugView.o)
$(LIBVIEWDIR)/XWorkstat.o:
(cd $(LIBVIEWDIR) ; $(MAKE) XWorkstat.o)
$(LIBVIEWDIR)/XWorkstat.so:
(cd $(LIBVIEWDIR) ; $(MAKE) XWorkstat.so)
$(LIBVIEWDIR)/GLXWorkstat.o:
(cd $(LIBVIEWDIR) ; $(MAKE) GLXWorkstat.o)
$(LIBVIEWDIR)/GLXWorkstat.so:
(cd $(LIBVIEWDIR) ; $(MAKE) GLXWorkstat.so)
$(LIBCOMPDIR)/ObjFLoader.o:
(cd $(LIBCOMPDIR) ; $(MAKE) ObjFLoader.o)
$(LIBCOMPDIR)/ObjFLoader.so:
(cd $(LIBCOMPDIR) ; $(MAKE) ObjFLoader.so)
#
# make list of classes for a standard smalltalk
# (includes basic, view & widgets and Persistency)
#
BASICLIST: $(CLASSLISTS)
-cat $(CLASSLISTS) > $(CLASSLIST)
#
# dont want these ttt-tempfile abbrevs to be included ...
#
abbrev.stc::
@-rm -f ttt*.*
#
# dont want local abbrevs to be included ...
#
collectAbbrev::
@-rm -f abbrev.stc
-@if [ -d include ]; then \
if [ ! -f include/abbrev.stc ]; then \
(cd include; $(LNS) ../$(INCLUDE)/abbrev.stc . ); \
fi; \
fi
collectAutoload::
@-rm -f autoloadList.stc
-@if [ -d include ]; then \
if [ ! -f include/autoloadList.stc ]; then \
(cd include; $(LNS) ../$(INCLUDE)/autoloadList.stc . ); \
fi; \
fi
classes::
-mkdir classes
-for i in source/*.st; do \
stcomp -i stcomp.img $$i; \
done
#
# make a new source subdirectory
# the source directory consists of sym-links to all .st files we find
#
newSource:
-rm -rf source
@-$(MAKE) sourceLink
Source: source
source:
@-$(MAKE) sourceLink
sourcelink:: sourceLink
#
# make a new include subdirectory and link to abbreviation file
newInclude:
-rm -rf include
@-$(MAKE) includeLink
includelink:: includeLink
includeLink:
@-rm -f ttt*.H
@-if [ ! -d include ]; then \
mkdir include; \
fi
@-if [ ! -r include/abbrev.stc ]; then \
if [ -f $(INCLUDE)/abbrev.stc ]; then \
echo "linking abbrev.stc ..."; \
(cd include; $(LNS) ../$(INCLUDE)/abbrev.stc .); \
else \
echo "oops - no $(INCLUDE)/abbrev.stc"; \
fi \
fi
@-if [ ! -r include/liblist.stc ]; then \
if [ -f $(INCLUDE)/liblist.stc ]; then \
echo "linking liblist.stc ..."; \
(cd include; $(LNS) ../$(INCLUDE)/liblist.stc .); \
else \
echo "oops - no $(INCLUDE)/liblist.stc"; \
fi \
fi
@-if [ ! -r include/symbols.stc ]; then \
if [ -f $(INCLUDE)/symbols.stc ]; then \
echo "linking symbols.stc ..."; \
(cd include; $(LNS) ../$(INCLUDE)/symbols.stc .); \
fi \
fi
@-if [ ! -r include/autoloadList.stc ]; then \
if [ -f $(INCLUDE)/autoloadList.stc ]; then \
echo "linking autoloadList.stc ..."; \
(cd include; $(LNS) ../$(INCLUDE)/autoloadList.stc .); \
fi \
fi
@-rm -f include/RCS include/CVS
misc: examples
examples:
-mkdir examples examples/3D
-(cd examples/3D; $(LNS) ../../$(TOP)/clients/GLdemos/*.data .)
#
# make a new binary subdirectory
# (this is only useful on systems that support dynamic loading;
# autoloaded classes will then be loaded from machine code files
# instead of source)
#
newBinary:
-rm -rf binary
@-$(MAKE) binaryLink
binary:
@-$(MAKE) binaryLink
binarylink:: binaryLink
#
# make a new bitmaps subdirectory
# (simply collect the contents of all bitmap directories)
#
newBitmaps:
-rm -rf bitmaps
@-$(MAKE) bitmaps
Bitmaps: bitmaps
bitmaps:
@-$(MAKE) bitmapLink
bitmaplink:: bitmapLink
#
# clean out intermediate chunk
#
cleanjunk::
-rm -f a.out SymbolTable ttt main.c
-rm -f classList.c fclassList.c nxclassList.c basicclassList.c
-rm -f betaclassList.c miniList.c tinyList.c
-rm -f modulList.stc modulList.c modulList.o
-rm -f pers* pers2 data data2 data.boss tetris.scores
cleanlinks:
-rm -rf source bitmaps binaries resources examples include
#
# clean out all that is not needed to run smalltalk
#
clean::
-rm -f a.out SymbolTable ttt main.c
-rm -f modulList.stc modulList.c modulList.o
-rm -f classList.stc classList.c classList.o
-rm -f fclassList.stc fclassList.c
-rm -f nxclassList.stc nxclassList.c
-rm -f basicclassList.stc basicclassList.c
-rm -f betaclassList.stc betaclassList.c
-rm -f miniList.stc miniList.c
-rm -f tinyList.stc tinyList.c
-rm -f pers pers2 data data2 data.boss tetris.scores
-rm -f st.img st2.img
-rm -f .stx*.mem
#
# clean out all that can be regenerated
#
clobber::
-rm -f modulList.stc modulList.c modulList.o
-rm -rf resources source binary bitmaps include examples
-rm -f smalltalk minitalk tinytalk st.img
-rm -f main.o
#
# make a new resources subdirectory
#
newResources:
rm -rf resources
@$(MAKE) resources styles
resources:
-mkdir resources
@$(MAKE) resourceLink
resourcelink: resourceLink
resourceLink:
@-if [ "`echo $(LIBBASICDIR)/resources/*`" != '$(LIBBASICDIR)/resources/*' ]; then \
echo "linking resource files from $(LIBBASICDIR) ..."; \
(cd resources; $(LNS) ../$(LIBBASICDIR)/resources/* .); \
rm -f resources/RCS resources/CVS; \
fi
@-if [ "`echo $(LIBVIEWDIR)/resources/*`" != '$(LIBVIEWDIR)/resources/*' ]; then \
echo "linking resource files from $(LIBVIEWDIR) ..."; \
(cd resources; $(LNS) ../$(LIBVIEWDIR)/resources/* .); \
rm -f resources/RCS resources/CVS; \
fi
@-if [ "`echo $(LIBVIEW2DIR)/resources/*`" != '$(LIBVIEW2DIR)/resources/*' ]; then \
echo "linking resource files from $(LIBVIEW2DIR) ..."; \
(cd resources; $(LNS) ../$(LIBVIEW2DIR)/resources/* .); \
rm -f resources/RCS resources/CVS; \
fi
@-if [ "`echo $(LIBWIDGDIR)/resources/*`" != '$(LIBWIDGDIR)/resources/*' ]; then \
echo "linking resource files from $(LIBWIDGDIR) ..."; \
(cd resources; $(LNS) ../$(LIBWIDGDIR)/resources/* .); \
rm -f resources/RCS resources/CVS; \
fi
@-if [ "`echo $(LIBWIDG2DIR)/resources/*`" != '$(LIBWIDG2DIR)/resources/*' ]; then \
echo "linking resource files from $(LIBWIDG2DIR) ..."; \
(cd resources; $(LNS) ../$(LIBWIDG2DIR)/resources/* .); \
rm -f resources/RCS resources/CVS; \
fi
@-if [ "`echo $(LIBWIDG3DIR)/resources/*`" != '$(LIBWIDG3DIR)/resources/*' ]; then \
echo "linking resource files from $(LIBWIDG3DIR) ..."; \
(cd resources; $(LNS) ../$(LIBWIDG3DIR)/resources/* .); \
rm -f resources/RCS resources/CVS; \
fi
@-if [ "`echo $(LIBTOOLDIR)/resources/*`" != '$(LIBTOOLDIR)/resources/*' ]; then \
echo "linking resource files from $(LIBTOOLDIR) ..."; \
(cd resources; $(LNS) ../$(LIBTOOLDIR)/resources/* .); \
rm -f resources/RCS resources/CVS; \
fi
@-if [ "`echo $(LIBTABLEDIR)/resources/*`" != '$(LIBTABLEDIR)/resources/*' ]; then \
echo "linking resource files from $(LIBTABLEDIR) ..."; \
(cd resources; $(LNS) ../$(LIBTABLEDIR)/resources/* .); \
rm -f resources/RCS resources/CVS; \
fi
@-if [ "`echo $(TOP)/fileIn/resources/*`" != '$(TOP)/fileIn/resources/*' ]; then \
echo "linking resource files from $(TOP)/fileIn ..."; \
(cd resources; $(LNS) ../$(TOP)/fileIn/resources/* .); \
rm -f resources/RCS resources/CVS; \
fi
@-if [ "`echo $(CLIENTDIR)/*/resources/*`" != '$(CLIENTDIR)/*/resources/*' ]; then \
echo "linking resource files from $(CLIENTDIR) ..."; \
(cd resources; $(LNS) ../$(CLIENTDIR)/*/resources/* .); \
rm -f resources/RCS resources/CVS; \
fi
styles: resources
@-echo "linking style files from $(LIBVIEWDIR)/styles ..."
@-rm -f resources/*.style resources/*.common
@-(cd resources; $(LNS) ../$(LIBVIEWDIR)/styles/* .)
@rm -f resources/RCS resources/CVS
main.o:: $(INCLUDE)/stc.h $(INCLUDE)/stcIntern.h Makefile
#
# installation rules
#
install:: installThis
#
# install binary only
#
binInstall::
-mkdir $(DESTLIBDIR)
-mkdir $(DESTBINDIR)
$(INSTALL) smalltalk $(DESTBINDIR)
-strip $(DESTBINDIR)/smalltalk
#
# install all local stuff
#
# notice the [x-y]* patterns; some unixes (at&t) dont like too many arguments ...
#
installThis::
-mkdir $(DESTLIBDIR)
-mkdir $(DESTBINDIR)
$(INSTALL) smalltalk $(DESTBINDIR)
-strip $(DESTBINDIR)/smalltalk
-mkdir $(DESTLIBDIR)/source
-chmod a+rx $(DESTLIBDIR)/source
-cp source/[A-G]* $(DESTLIBDIR)/source
-cp source/[H-P]* $(DESTLIBDIR)/source
-cp source/[Q-Z]* $(DESTLIBDIR)/source
-chmod a+r $(DESTLIBDIR)/source/[A-G]*
-chmod a+r $(DESTLIBDIR)/source/[H-P]*
-chmod a+r $(DESTLIBDIR)/source/[Q-Z]*
-mkdir $(DESTLIBDIR)/bitmaps
-chmod a+rx $(DESTLIBDIR)/bitmaps
-cp bitmaps/[A-I]* $(DESTLIBDIR)/bitmaps
-cp bitmaps/[J-Z]* $(DESTLIBDIR)/bitmaps
-cp bitmaps/[a-i]* $(DESTLIBDIR)/bitmaps
-cp bitmaps/[j-z]* $(DESTLIBDIR)/bitmaps
-chmod a+r $(DESTLIBDIR)/bitmaps/[A-I]*
-chmod a+r $(DESTLIBDIR)/bitmaps/[J-Z]*
-chmod a+r $(DESTLIBDIR)/bitmaps/[a-i]*
-chmod a+r $(DESTLIBDIR)/bitmaps/[j-z]*
-chmod a+rx $(DESTLIBDIR)/resources
-mkdir $(DESTLIBDIR)/resources
-cp resources/* $(DESTLIBDIR)/resources
-chmod a+r $(DESTLIBDIR)/resources/*.rs
-cp *.rc *.stc patches $(DESTLIBDIR)
-chmod a+r $(DESTLIBDIR)/*.rc $(DESTLIBDIR)/*.stc $(DESTLIBDIR)/patches
qinstall:: installThis