stx_libview.st
author Claus Gittinger <cg@exept.de>
Wed, 02 Feb 2011 01:42:47 +0100
changeset 5696 30f4730112b7
parent 5693 b6b2179daffa
child 5702 f9320ac7088d
permissions -rw-r--r--
automatically generated by browser

"
 COPYRIGHT (c) 2006 by eXept Software AG
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libview' }"

LibraryDefinition subclass:#stx_libview
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'* Projects & Packages *'
!

!stx_libview class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2006 by eXept Software AG
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    Build-Information for creation of the st/x standard library: stx_libview.
    This library contains low level interfaces to the underlying graphic system
    and representations of windows, colors, bitmaps etc.
"
! !

!stx_libview class methodsFor:'description'!

excludedFromPreRequisites
    ^ #(
	#'stx:libcompat'    "OrderedDither - referenced by Image>>convertToPalette:renderedBy: "
	#'stx:libtool'    "GenericToolbarIconLibrary - referenced by SimpleView class>>readStyleSheet "
	#'stx:libtool2'    "ImageEditor - referenced by Image>>edit "
	#'stx:libui'    "ViewSpec - referenced by SimpleView>>specClass "
	#'stx:libview2'    "TIFFReader - referenced by Image>>saveOn: "
	#'stx:libwidg'    "Button - referenced by ModalBox>>initialize "
	#'stx:libwidg2'    "ImageView - referenced by Form>>show "
    )
!

preRequisites
    ^ #(
	#'stx:libbasic'    "Object - superclass of MappedPalette "
	#'stx:libbasic2'    "IntegerArray - referenced by XWorkstation>>supportedTargetAtoms "
    )
! !

!stx_libview class methodsFor:'description - compilation'!

additionalBaseAddressDefinition_bc_dot_mak
    "this is an optional definition, which (if present) may speed up the dll-loading a little
     on win32 systems."

    ^ '
# see stdHeader_bc for LIBVIEW_BASE
LIB_BASE=$(LIBVIEW_BASE)
'
!

additionalDefinitions_bc_dot_mak
    ^ '
!!ifdef USEBC

X11_LIBS=..\libbc\X11OMF.lib ..\libbc\XextOMF.lib

!!else

X11_LIBS=..\lib\X11.lib ..\lib\Xext.lib

!!endif
'
!

additionalRules_bc_dot_mak
    ^ '#

..\libbc\X11OMF.lib: ..\support\win32\borland\X11OMF.lib
	copy ..\support\win32\borland\X11OMF.lib ..\libbc

..\libbc\XextOMF.lib: ..\support\win32\borland\XextOMF.lib
	copy ..\support\win32\borland\XextOMF.lib ..\libbc

..\lib\X11.lib: ..\support\win32\msc\X11.lib
	copy ..\support\win32\borland\X11.lib ..\lib

..\lib\Xext.lib: ..\support\win32\borland\Xext.lib
	copy ..\support\win32\borland\Xext.lib ..\lib

'
!

additionalRules_make_dot_proto
    ^ '#
# XWorkstatation and GLXWorkstatation are separate (shared) Objects - compile without sepInitCode
# and without -Zlibview (to speedup ld.so on SGI, by avoiding conflicts)
#

XWorkstation.$(O): XWorkstation.st $(INCLUDE_TOP)/stx/libview/DeviceWorkstation.H $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.H $(INCLUDE_TOP)/stx/libview/GraphicsDevice.H
	$(MAKE) $(BIG_STFILE_RULE) BIG_FILE=XWorkstation \
		CC="$(CC)" OPT="$(OPT)" \
		CLASSLIB_CC="$(CLASSLIB_CC)" \
		CLASSLIB_OPT="$(CLASSLIB_OPT) -primitiveStackSize=64000" \
		SEPINITCODE=-sepInitCode ZFLAG=

xw:
	$(MAKE) XWorkstation.c \
		CC="$(CC)" OPT="$(OPT)" \
		CLASSLIB_CC="$(CLASSLIB_CC)" \
		CLASSLIB_OPT="$(CLASSLIB_OPT) -primitiveStackSize: 64000 -V" \
		SEPINITCODE=-sepInitCode ZFLAG=

XWorkstation.$(SO): XWorkstation.$(O)
	$(MAKE) $(SHAREDLIBRULE) LIB=XWorkstation.$(SO) OBJS="XWorkstation.$(O)" LOCAL_SHARED_LIBS="-L$(X_LIB_DIR) $(LIB_X)"


__GLXWorkstation.$(O): GLXWorkstation.st $(INCLUDE_TOP)/stx/libview/XWorkstation.H $(INCLUDE_TOP)/stx/libview/DeviceWorkstation.H $(INCLUDE_TOP)/stx/libview/HostGraphicsDevice.H $(INCLUDE_TOP)/stx/libview/GraphicsDevice.H $(INCLUDE)/stc.h
	$(MAKE) $(BIG_STFILE_RULE) BIG_FILE=GLXWorkstation \
		CC="$(CC)" OPT="$(OPT)" \
		CLASSLIB_CC="$(CLASSLIB_CC)" CLASSLIB_OPT="$(CLASSLIB_OPT)" \
		SEPINITCODE=-sepInitCode ZFLAG=
	mv GLXWorkstation.$(O) __GLXWorkstation.$(O)

GLXWorkstation.$(O): glLib __GLXWorkstation.$(O)
	@if [ "$(NO_PRELINK_LIBGL)" = "" ]; \
	then\
	    echo $(CLASSLIB_LD) $(LD_REL_FLAG) -o GLXWorkstation.$(O) __GLXWorkstation.$(O) $(LIB_GL); \
	    $(CLASSLIB_LD) $(LD_REL_FLAG) -o GLXWorkstation.$(O) __GLXWorkstation.$(O) $(LIB_GL); \
	else \
	    echo cp __GLXWorkstation.$(O) GLXWorkstation.$(O); \
	    cp __GLXWorkstation.$(O) GLXWorkstation.$(O); \
	fi

glLib:
	@-if [ -d ../support/VGL ]; then \
	    (cd ../support/VGL ; $(MAKE) ) ; \
	fi

DeviceWorkstation.$(O):
	$(MAKE) $(BIG_STFILE_RULE) BIG_FILE=DeviceWorkstation \
		CC="$(CC)" OPT="$(OPT)" SEPINITCODE="$(SEPINITCODE)" \
		CLASSLIB_CC="$(CLASSLIB_CC)" CLASSLIB_OPT="$(CLASSLIB_OPT)"

SimpleView.$(O):
	$(MAKE) $(BIG_STFILE_RULE) BIG_FILE=SimpleView \
		CC="$(CC)" OPT="$(OPT)" SEPINITCODE="$(SEPINITCODE)" \
		CLASSLIB_CC="$(CLASSLIB_CC)" CLASSLIB_OPT="$(CLASSLIB_OPT)"

Image.$(O):
	$(MAKE) $(BIG_STFILE_RULE) BIG_FILE=Image \
		CC="$(CC)" OPT="$(OPT)" SEPINITCODE="$(SEPINITCODE)" \
		CLASSLIB_CC="$(CLASSLIB_CC)" CLASSLIB_OPT="$(CLASSLIB_OPT)"

#OGLWorkstation.$(O): OGLWorkstation.st
#       $(MAKE) $(BIG_STFILE_RULE) BIG_FILE=OGLWorkstation CC=$(CC) OPT="$(OPT)" \
#               XDEFS="-DOPENGL -I$(MESA_DIR)/include" SEPINITCODE=-sepInitCode ZFLAG=
#       $(CLASSLIB_LD) -r -o ttt.$(O) OGLWorkstation.$(O) \
#               $(MESA_DIR)/lib/libMesaGL.a \
#               $(MESA_DIR)/lib/libMesaGLU.a \
#               $(MESA_DIR)/lib/libMesaaux.a
#       mv ttt.$(O) OGLWorkstation.$(O)

OGLWorkstation.$(O): GLXWorkstation.st
	cp GLXWorkstation.st OGLWorkstation.st
	$(MAKE) $(BIG_STFILE_RULE) BIG_FILE=OGLWorkstation \
		CC="$(CC)" OPT="$(OPT)" \
		CLASSLIB_CC="$(CLASSLIB_CC)" CLASSLIB_OPT="$(CLASSLIB_OPT)" \
		CC_VOGL_FLAGS="$(CC_MESA_INCLUDE) -DOPENGL -DMESA -UVGL -UGLX"\
		SEPINITCODE=-sepInitCode ZFLAG=
	$(CLASSLIB_LD) -r -o ttt.$(O) OGLWorkstation.$(O) \
		$(MESA_DIR)/lib/libMesaGL.a \
		$(MESA_DIR)/lib/libMesaGLU.a \
		$(MESA_DIR)/lib/libMesaaux.a
	mv ttt.$(O) OGLWorkstation.$(O)
	rm -f OGLWorkstation.st

#ogl:
#       $(MAKE) OGLWorkstation.o XDEFS="-DOPENGL -I$(VOGL_DIR) -DSHAPE" SEPINITCODE=-sepInitCode ZFLAG=
#       mv OGLWorkstation.o ttt.o
#       $(CLASSLIB_LD) -r -o OGLWorkstation.o ttt.o \
#               $(TOP)/support/MESA/Mesa1.2.5/lib/libMesaGL.a   \
#               $(TOP)/support/MESA/Mesa1.2.5/lib/libMesaGLU.a  \
#               $(TOP)/support/MESA/Mesa1.2.5/lib/libMesaaux.a  \
#               /lib/libc.so.4

#
# on my 320H, do not compile DeviceWorkstation with -O2;
# compiler is running out of space ...
#
#AIX_BIGGIES:
#       $(MAKE) GraphicsContext.$(O)
#       $(MAKE) DeviceGraphicsContext.$(O)
#       $(MAKE) OPT= DeviceWorkstation.$(O)
#       $(MAKE) OPT= XWorkstation.$(O)
#       $(MAKE) OPT= Image.$(O)
#       $(MAKE) OPT= SimpleView.$(O)

#
# prelink those - cannot mix non-shared with shared objects (sigh)
#
AIX_SHARED_XWORKSTATION:
	$(MAKE) GraphicsDevice.$(O) HostGraphicsDevice.$(O) DeviceWorkstation.$(O)
	$(MAKE) aix_exports LIBNAME=XWorkstation ENTRY=XWorkstation
	@-echo "__XErrorHandler__" >> XWorkstation.exp
	@-echo "__XIOErrorHandler__" >> XWorkstation.exp
	$(MAKE) XWorkstation$(O_EXT) \
		ENTRY_INIT=XWorkstation \
		AIX_LOCAL_LIBS="$(LIBX)"

AIX_SHARED_GLXWORKSTATION:
	$(MAKE) GraphicsDevice.$(O) HostGraphicsDevice.$(O) DeviceWorkstation.$(O)
	$(MAKE) aix_exports LIBNAME=XWorkstation ENTRY=XWorkstation
	@-echo "__XErrorHandler__" >> XWorkstation.exp
	@-echo "__XIOErrorHandler__" >> XWorkstation.exp
	$(MAKE) GLXWorkstation$(O_EXT) \
		ENTRY_INIT=GLXWorkstation \
		AIX_LOCAL_LIBS="-bI:XWorkstation.exp $(LIB_GL) $(LIBX) -lm"
	rm -f XWorkstation.exp

#
# in (my) aix system, those cannot be compiled with
# the optimizer - running out of space ...
#
AIX::   GraphicsContext.$(O) DeviceGraphicsContext.$(O) GraphicsMedium.$(O) DisplaySurface.$(O)
	$(MAKE) OPT="" SimpleView.$(O)
	$(MAKE) OPT="" Image.$(O)
	$(MAKE) $(AIX_XWORKSTATION_RULE) $(AIX_GLXWORKSTATION_RULE)

#
# on HP, big classes blow the C-preprocessor (stops with "too much defining" error)
#
#HP::
#
#HPbigFiles:
#       $(MAKE) $(BIG_STFILE_RULE) BIG_FILE=Color CC=$(CC) OPT="$(OPT)"
#       $(MAKE) $(BIG_STFILE_RULE) BIG_FILE=DeviceGraphicsContext CC=$(CC) OPT="$(OPT)"
'
!

localDefines_unix
    ^ '-I$(XINCLUDE) $(XDEFS) $(CC_3D_FLAGS)'
!

stcOptimizationOptions
    ^ '+optinline +optinline2'
! !

!stx_libview class methodsFor:'description - contents'!

classNamesAndAttributes
    "lists the classes which are to be included in the project.
     Each entry in the list may be: a single class-name (symbol),
     or an array-literal consisting of class name and attributes.
     Attributes are: #autoload or #<os> where os is one of win32, unix,..."

    ^ #(
        "<className> or (<className> attributes...) in load order"
        (AlphaMask autoload)
        (BitmapFont autoload)
        Border
        Color
        ColorPalette
        Colormap
        (CompoundFont autoload)
        Controller
        (ControllerWithMenu autoload)
        Cursor
        Depth16Image
        Depth1Image
        Depth24Image
        Depth2Image
        Depth32Image
        Depth4Image
        Depth8Image
        DeviceGraphicsContext
        DeviceHandle
        DeviceWorkstation
        DisplayRootView
        DisplaySurface
        (FixedPalette autoload)
        Font
        FontDescription
        Form
        (GraphicsAttributes autoload)
        GraphicsContext
        GraphicsDevice
        GraphicsMedium
        HostGraphicsDevice
        Image
        ImageMask
        ImageReader
        KeyboardForwarder
        KeyboardMap
        (MDIChildView autoload)
        MappedPalette
        ModalBox
        MonoMappedPalette
        (NeXTWorkstation autoload)
        PopUpView
        ResourcePack
        ShadowView
        SimpleView
        StandardSystemView
        SynchronousWindowSensor
        TopView
        (TranslucentColor autoload)
        View
        ViewStyle
        (WinWorkstation win32)
        Event
        WindowEvent
        WindowGroup
        WindowSensor
        WindowingTransformation
        #'stx_libview'
        Depth48Image
        Depth64Image
        AbstractBorder
        SimpleBorder
        BeveledBorder
        NoBackground
        ImageBackground
        SolidBackground
        AbstractBackground
        (RoundButtonBorder autoload)
        (GradientBackground autoload)
    )
!

extensionMethodNames
    ^ #(
    )
! !

!stx_libview class methodsFor:'description - files'!

protectedFileNames
    "names of files which should NOT be generated (because they are hand-maintained)"
    "do NOT overwrite the hand-written Make.proto"

    ^ #( 'Make.proto' )

    "Created: / 14-09-2006 / 14:39:33 / cg"
    "Modified: / 21-12-2010 / 11:37:00 / cg"
! !

!stx_libview class methodsFor:'description - project information'!

companyName
    "Return a companyname which will appear in <lib>.rc"

    ^ 'eXept Software AG'
!

description
    "Return a description string which will appear in nt.def / bc.def"

    ^ 'Smalltalk/X Low Level Graphic Interfacing'

    "Modified: / 14-09-2006 / 10:54:54 / cg"
!

legalCopyright
    "Return a copyright string which will appear in <lib>.rc"

    ^ 'Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011'

    "Modified: / 01-02-2011 / 11:56:27 / cg"
! !

!stx_libview class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libview/stx_libview.st,v 1.46 2011-02-01 10:58:37 cg Exp $'
!

version_CVS
    ^ '$Header: /cvs/stx/stx/libview/stx_libview.st,v 1.46 2011-02-01 10:58:37 cg Exp $'
! !