# Linux/i486 dependant part of the makefile.
#
# The final XPCE/SWI-Prolog executable is created as a SWI-Prolog saved
# state to mimimize startup time.  A SWI-Prolog staved state is basically
# a dump of the data-segment of the process with additional info on how to
# restore it.
#
# This doesn't cooperate very well with the shared-library mechanism of
# most modern OS'es for two reasons:
#
#	(1) There is generally data in the data-segment about the status
#	of the loaded shared libraries and this data (in general) shouldn't
#	be saved/restored ... but, where to find it???
#
#	(2) There is data associated with each shared library that *should*
#	be stored, but again, where to find it???
#
#
# XFree <= 2.0
#
# These versions were distributed with static libraries and therefore
# we used static linking to avoid all the trouble described above. Use:
#
# LDFLAGS= -static
#
#
# XFree 2.1
#
# (For linux) only distributed using dynamic libraries.  As the X11
# libraries are not used before the saved-state is created, (2) is not
# a problem.  (1) appears (on first test) to be ok too.
#
# As far as I can tell, GCC does not allow for mixed static/dynamic linking,
# hence the reference to the explicit libraries ... Use:
# 
# LDFLAGS=
# LIBS= -lXt -lX11 \
#       /usr/lib/libtermcap.a /usr/lib/libreadline.a \
#	/usr/lib/libm.a /usr/lib/libc.a

OPTIMIZE=-O2
CC=gcc -Wall -funsigned-char
LDFLAGS=

include ../src/Makefile

# 

LIBS= -lXt -lX11 -ltermcap -lreadline -lm /usr/lib/libc.a

