# Linux

# Linux does not have bundled bundled Motif libraries. In order to
# build IDL, we must purchase Motif separately. In order to avoid
# violating the Motif license, we are required to link this Motif
# statically into IDL. This results in an IDL binary that is much
# larger than it would otherwise be, and it also makes it difficult for
# end users to re-link IDL.
#
# To build IDL you will need to install Motif on your system first. Although
# it is possible that Motif versions other than the one used by
# RSI for IDL might link and work with IDL, it is equally likely
# that they won't. RSI cannot make any assurances other than the
# Motif version we used should work.
#
# Linux IDL for X86 is built using Motif 2.1 purchased from Metro Link Inc.
#
#	www.metrolink.com
#
# Please note that Research Systems has no connection with Metro Link
# other than as a customer, and that future versions of IDL may or
# may not use this version of Motif, based on the state of the Linux
# marketplace that exists when a future IDL is released.
#
#
# Recently, The Open Group (holders of the Motif copyright) announced
# a Public License for Motif (see http://www.opengroup.org/press/15may00.htm).
# Quoting their press release:
#
#     Menlo Park, CA - May 15th, 2000 - The Open Group[tm], a vendor and
#     technology-neutral consortium dedicated to enterprise integration,
#     announced today that it is releasing the source code of Motif(tm),
#     using a public license, to the Open Source community.  The effect
#     of this is to allow Open Motif to be distributed, royalty free,
#     when the platform upon which it is shipped is Open Source.
#
# We are hopeful that this will cause the various Linux distributions to
# include a sharable version of the Motif libraries in their bundled
# X11 support. Once this happens, we intend to move IDL to use those
# libraries and permanently solve this problem.

IDLDIR=../..
BINDIR=$(IDLDIR)/bin/bin.linux.x86
CALLTEST=$(IDLDIR)/external/callable/calltest
LDFLAGS= -L$(BINDIR) -lidl -Wl,-rpath,. \
	-lMesaGLU -lMesaGL /usr/X11R6/lib/libXm.a -lXp -L/usr/X11R6/lib \
	-lXpm -lXext -lXt -lSM -lICE -lX11 -ldl -ltermcap -lm -lpthread

idl.new :
	gcc -o idl.new $(BINDIR)/main.o $(LDFLAGS)
	rm -f idlde.new; ln idl.new idlde.new


# Build the C language calltest program.
calltest :
	gcc -I$(IDLDIR)/external -o calltest $(CALLTEST).c $(LDFLAGS)
