#  NETSOLVE_ROOT and NETSOLVE_ARCH may need to be set appropriately
#
#  NETSOLVE_ROOT should be the top level directory into which the
#  NetSolve source code has been installed.
#
#  NETSOLVE_ARCH should be set to the value obtained by doing the
#  following at the UNIX prompt (substitute the proper directory
#  path for NETSOLVE_ROOT):
#    UNIX> cd NETSOLVE_ROOT/conf
#    UNIX> config.sub `config.guess` | sed 's/[-|.]/_/g'

NETSOLVE_ROOT = ../../../..
NETSOLVE_ARCH = i686_pc_linux_gnu

CC = gcc
INCDIR = -I$(NETSOLVE_ROOT)/include

NETSOLVECLIB = $(NETSOLVE_ROOT)/lib/$(NETSOLVE_ARCH)/libnetsolve.a
NETSOLVEF77LIB = $(NETSOLVE_ROOT)/lib/$(NETSOLVE_ARCH)/libfnetsolve.a

CFLAGS = $(INCDIR) -g
LIBS = 

IOLIB = ../matmarket/iohb1.0/iohb.c ../matmarket/iohb1.0/mmio.c

all: simple_tester hbo_tester

simple_tester: simple_tester.c
	$(CC) $(CFLAGS) simple_tester.c $(NETSOLVECLIB) -o $@ $(LIBS)

hbo_tester: hbo_tester.c $(IOLIB)
	$(CC) $(CFLAGS) -I../matmarket/iohb1.0 hbo_tester.c \
		$(IOLIB) $(NETSOLVECLIB) -o $@ $(LIBS)

clean:
	/bin/rm -f simple_tester hbo_tester core
