mirror of
https://github.com/IanDarwin/OpenLookCDROM.git
synced 2026-04-26 04:07:31 +00:00
Installation
------------
Prerequisites: Sun C++ 2.0 (GNU g++ possible but untested)
OpenWindows 2.0
1) Set the following environment variable to indicate CPU type:
setenv ARCH `/bin/arch`
If you are building on a Sun/3, you may wish to set a floating
point compile flag:
setenv FLOAT -f68881
or
setenv FLOAT -ffpa
2) Install LXT package as follows:
cd $LXTDIR
make
ln -s $LXTDIR/lxt.h /usr/include/local/lxt.h
ln -s $LXTDIR/liblxt_$ARCH.a /usr/lib/liblxt.a
(where $LXTDIR is the directory where the package resides).
3) Make sure that 'make' knows about C++ by sticking the following lines
at the end of /usr/include/make/default.mk (assuming, of course, that
you don't already have such an entry):
# C++ stuff
CCPLUSPLUS=CC
COMPILE.cc=$(CCPLUSPLUS) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
LINK.cc=$(CCPLUSPLUS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
.cc:
$(LINK.cc) -o $@ $< $(LDLIBS)
.cc.o:
$(COMPILE.cc) $(OUTPUT_OPTION) $<
.cc.a:
$(COMPILE.cc) -o $% $<
$(AR) $(ARFLAGS) $@ $%
$(RM) $%
4) Install LDGO C++ package as follows:
cd $LDGOCPPDIR
make
ln -s $LDGOCPPDIR/Dlnk.h /usr/include/local/Dlnk.h
ln -s $LDGOCPPDIR/libldgoc++_$ARCH.a /usr/lib/libldgoc++.a
(where $LDGOCPPDIR is the directory where the package resides).
5) Edit $OPENWINHOME/share/include/NeWS/psio.h to make it usable by C++,
changing the lines
struct psiobuf {
int cnt;
unsigned char *ptr;
unsigned char *base;
int bufsiz;
short flag;
short file;
int protected;
union {
PSFILE *outputside;
unsigned next_user_token;
} assoc;
};
to the lines
struct psiobuf {
int cnt;
unsigned char *ptr;
unsigned char *base;
int bufsiz;
short flag;
short file;
#if defined(c_plusplus) || defined(__cplusplus)
int c_protected;
#else
int protected;
#endif
union {
PSFILE *outputside;
unsigned next_user_token;
} assoc;
};
6) Build ice. If you don't care about debugging, remove the -g option
from CFLAGS in the Makefile -- this will decrease the size of the
executable dramatically and is highly recommended.
cd $ICEDIR
make
The executable will be left in $ARCH/ice.