# makefile for callable interface/lnx files
# following fields are user settable

# XMATH         is where Xmath is installed.
# LNXNAME       is the name of the lnx file you wish to create.
# CINAME        is the name of program that uses the callable interface.
# USEROBJECTS   lists the .o files you wish to link with.
#               Include $(XMATH)/lib/ftnlnx.o if you are using
#               the Pure Fortran LNX.
# USERLIBS      lists library search paths and/or libraries,
#               e.g., can have -Lpath and/or -llibname here.
# UCFLAG        is the user CFLAGS, i.e., options the user wants sent to the 
#               cc compiler (.e.g, -O).
# UFFLAG        ditto for Fortran.

       XMATH = /tools/xmath.40.sparc
     LNXNAME = math
      CINAME = 
 USEROBJECTS = xmathlink.c
    USERLIBS = -L/proj7/Math/Bin/MathLink -lML -lm
      UCFLAG = -D__STDC__ -O -I/proj7/Math/Source/Includes
      UFFLAG = 

     INCLUDE = $(XMATH)/include
        LIBS = $(XMATH)/lib
          CC = CC
      CFLAGS = $(UCFLAG) -I$(INCLUDE) -Bstatic
      FFLAGS = $(UFFLAG)

all: $(LNXNAME) $(CINAME)

# Note, on non-Sun platforms you will have to delete the rule below
#       that is not being used.  For example, if you are using LNX 
#       then delete the two lines begining with $(CINAME):

$(LNXNAME): $(USEROBJECTS)
        $(CC) -o $@.lnx $(CFLAGS) $(USEROBJECTS) -L$(LIBS) $(USERLIBS) -lXmath

#$(CINAME): $(USEROBJECTS)
#       $(CC) -o $@ $(CFLAGS) $(USEROBJECTS) -L$(LIBS) $(USERLIBS) -lXmath

