#  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
F77 = f77
INCDIR = -I$(NETSOLVE_ROOT)/include

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

CFLAGS = $(INCDIR) -g
F77FLAGS = $(INCDIR) -g
LIBS = 

all: farming1 farming2

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

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

clean:
	/bin/rm -f farming1 farming2 core
