# $Header: /cvs/stx/stx/libview/Make.proto,v 1.114 1999-09-11 10:15:26 cg Exp $
#
# -------------- no need to change anything below ----------
TOP=..
SUBDIRS=
LIBNAME=libview
PACKAGE=stx:$(LIBNAME)
LIB_BASE=$(LIBVIEW_BASE)
NM_LIB_BASE=LIBVIEW_BASE
SMALLLIBNAME=libview_small
STCOPT=$(LIBVIEW_STCOPT)
ZFLAG=-varPrefix=$(LIBNAME)
STCLOCALOPT='-package=$(PACKAGE)' $(COMMONSYMBOLS) $(SEPINITCODE) $(ZFLAG)
LINKOBJRULE=$(SEPINITLINKOBJRULE)
LOCALDEFS=-I$(XINCLUDE) $(XDEFS) $(CC_3D_FLAGS)
RCSSOURCES=*.st Make.proto styles/*.style resources/*.rs
DELIVERBINARIES=lib*.o lib*.a lib*.so $(LIBVIEW_EXTRA_TARGETS)
all:: abbrev.stc objs $(NOTINLIBOBJS) classList.stc $(OBJTARGET) $(LIBVIEW_EXTRA_TARGETS)
#
# although all files are compiled here,
# not everything goes into the target library
#
LINKOBJS=$(LIBOBJS)
#
# also, those objects are not to be placed into the liblist
#
patchLiblist::
grep -v $(WORKSTAT1) < liblist.stc | grep -v $(WORKSTAT2) > ttt
mv ttt liblist.stc
SMALLOBJFILES= \
GraphicsDevice.$(O) \
HostGraphicsDevice.$(O) \
DeviceWorkstion.$(O) \
Image.$(O) \
Depth1Image.$(O) Depth2Image.$(O) Depth4Image.$(O) \
Depth8Image.$(O) Depth24Image.$(O) \
ImageReader.$(O)
NOTINLIBOBJS= \
$(WORKSTAT1).$(O) \
$(WORKSTAT2).$(O)
REQUIREDOBJS= \
GraphicsDevice.$(O) \
HostGraphicsDevice.$(O) \
DeviceWorkstation.$(O) \
Image.$(O) \
Depth1Image.$(O) \
Depth2Image.$(O) \
Depth4Image.$(O) \
Depth8Image.$(O) \
Depth24Image.$(O) \
ImageReader.$(O)
#
# those can be compiled for space - not time critical
#
UNCRITICALOBJS= \
DisplayRootView.$(O) \
Workstation.$(O) \
AlphaMask.$(O)
LIBOBJS= \
$(REQUIREDOBJS) \
Workstation.$(O) \
Color.$(O) \
Colormap.$(O) \
FontDescription.$(O) \
Font.$(O) \
Cursor.$(O) \
DeviceHandle.$(O) \
GraphicsContext.$(O) \
DeviceGraphicsContext.$(O) \
GraphicsMedium.$(O) \
Form.$(O) \
DisplaySurface.$(O) \
SimpleView.$(O) \
View.$(O) \
TopView.$(O) \
StandardSystemView.$(O) \
ModalBox.$(O) \
PopUpView.$(O) \
ShadowView.$(O) \
DisplayRootView.$(O) \
Controller.$(O) \
WindowingTransformation.$(O) \
WindowEvent.$(O) \
WindowGroup.$(O) \
WindowSensor.$(O) \
SynchronousWindowSensor.$(O) \
KeyboardForwarder.$(O) \
KeyboardMap.$(O) \
ResourcePack.$(O) \
ViewStyle.$(O) \
Depth16Image.$(O) \
Depth32Image.$(O) \
ImageMask.$(O)
OBJS = \
$(LIBOBJS) \
$(MOREOBJS) \
$(NOTINLIBOBJS)
smalllib:
@-rm -f classList.stc
$(MAKE) objs \
LIBNAME=$(SMALLLIBNAME) \
OBJS="$(REQUIREDOBJS)" \
LINKOBJS="$(SMALLOBJFILES)" \
GENCLASSLIST_RULE=genClassList_new
$(MAKE) classList.stc \
GENCLASSLIST_RULE=genClassList_new \
LIBNAME=$(SMALLLIBNAME) \
OBJS="$(REQUIREDOBJS)" \
LINKOBJS="$(SMALLOBJFILES)"
$(MAKE) obj$(TARGET_RULE_EXTENSION) \
LIBNAME=$(SMALLLIBNAME) \
OBJS="$(REQUIREDOBJS)" \
LINKOBJS="$(SMALLOBJFILES)" \
GENCLASSLIST_RULE=genClassList_new
@-rm -f classList.stc
#
# NXWorkstation, XWorkstation and GLXWorkstation are not included in
# the classLibrary (but as extra objects)
#
specialClassList:
$(MAKE) $(GENCLASSLIST_RULE) GENCLASSLIST_RULE=$(GENCLASSLIST_RULE) LIBNAME=$(LIBNAME) OBJS="$(OBJS)" LINKOBJS="$(LINKOBJS)"
@if test -f classList.stc; then \
grep -v $(WORKSTAT1) < classList.stc > ttt; \
mv ttt classList.stc; \
grep -v $(WORKSTAT2) < classList.stc > ttt; \
mv ttt classList.stc; \
fi
CLASSLISTRULE=specialClassList
cleanjunk::
@-rm -f *.c *.H
clean::
@-mv XWorkstation.o XWorkstation.o.sav
@-mv GLXWorkstation.o GLXWorkstation.o.sav
@-mv __GLXWorkstation.o __GLXWorkstation.o.sav
@-rm -f [A-Z]*.o *.c *.H
@-mv XWorkstation.o.sav XWorkstation.o
@-mv GLXWorkstation.o.sav GLXWorkstation.o
@-mv __GLXWorkstation.o.sav __GLXWorkstation.o
clobber::
@-rm -f *.o *.c *.H classList.stc abbrev.stc
tar:
(cd $(TOP); tar cvfh DISTRIB/libview.tar \
libview/.dir.info \
libview/*.st \
libview/Make.proto \
libview/styles/.dir.info \
libview/styles/*.style \
libview/styles/*.common \
libview/resources/*.rs)
#
# special BIG-rule (kludge for HP / ibm)
#
#
# also, XWorkstat and GLXWorkstat are separate (shared) Objects - compile without sepInitCode
# and without -Zlibview (to speedup ld.so on SGI, by avoiding conflicts)
#
XWorkstation.$(O): XWorkstation.st $(INCLUDE)/DeviceWorkstion.H
$(MAKE) $(BIG_STFILE_RULE) BIG_FILE=XWorkstation \
CC="$(CC)" OPT="$(OPT)" \
CLASSLIB_CC="$(CLASSLIB_CC)" CLASSLIB_OPT="$(CLASSLIB_OPT)" \
SEPINITCODE=-sepInitCode ZFLAG=
__GLXWorkstation.$(O): GLXWorkstation.st $(INCLUDE)/XWorkstation.H $(INCLUDE)/DeviceWorkstion.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:
(cd ../support/VGL ; $(MAKE) )
DeviceWorkstion.$(O):
$(MAKE) $(BIG_STFILE_RULE) BIG_FILE=DeviceWorkstion \
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= DeviceWorkstion.$(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) DeviceWorkstion.$(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) DeviceWorkstion.$(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)"
#
# install the extra objects
#
qinstall:: $(DESTLIBDIR)
if [ "$(WORKSTAT1)"x != "x" ]; then \
$(INSTALL_LIB) $(WORKSTAT1).$(O) $(DESTLIBDIR); \
fi
if [ "$(WORKSTAT2)"x != "$(WORKSTAT1"x ]; then \
if [ "$(WORKSTAT2)"x != "x" ]; then \
$(INSTALL_LIB) $(WORKSTAT2).$(O) $(DESTLIBDIR); \
fi \
fi
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
# ENDMAKEDEPEND --- do not remove this line