# SGI

# Important malloc information: IRIX contains two malloc libraries. The
# standard libc contains one, and there is another in a separate library
# (libmalloc). Although the man page makes the libmalloc one seem better,
# our experience is that the libc version works better for IDL.
#
# To get the libc version, don't explicitly specify "-lmalloc" when linking.

IDLDIR=../..
BINDIR=$(IDLDIR)/bin/bin.sgi
CALLTEST=$(IDLDIR)/external/callable/calltest
LDFLAGS= -L$(BINDIR) -lidl -lXm -lXt -lX11 -ltermcap -lm -lpthread -rpath .

ARCHFLAGS= -n32 -mips3


# IDL
idl.new :
	cc $(ARCHFLAGS) -o idl.new  $(BINDIR)/main.o $(LDFLAGS)
	rm -f idlde.new; ln idl.new idlde.new


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