CC       = icc -Dintelparagon -Dintelnx
FC       = if77
AR       = ar860
# According to the documentation, -q should suppress the banner.  Instead,
# ar860 complains.
#AR       = ar860 -q
RM       = rm
RANLIB   = echo
SHELL    = /bin/sh
LINKER   = icc
# Pick these based on main program language
CLINKER = icc -Dintelnx
FLINKER = if77
# -lkmath is ClassPack (from Kuck and Associates; BLAS 1, 2, 3) and some FFT.
# -lvec   is ??
# -lf     is the fortran runtime; it is needed by some of the routines in
#         lkmath.
SLIB     = -node -lkmath -lf
.PRECIOUS: $(LIBNAME)
# Blas libraries
BLAS1 = -lkmath
BLAS2 = -lkmath
BLAS3 = -lkmath
BLAS  = -lkmath
LAPACK = $(ITOOLSDIR)/libs/libs$(BOPT)/i860/liblapack.a

libbuild: $(SOURCE) $(LIBNAME)($(OBJS))
lib: $(SOURCE) $(LIBNAME)($(OBJS))
# liball is a version that builds the source files all at once and then
# adds them, again all at once, to the archive.  Because of the poor
# performance of some archive programs, this can significantly improve
# the speed of an original installation.
liball: $(SOURCEC) $(SOURCEF)
	if ("$(SOURCEC)" != "") $(CC) -c $(CFLAGS) $(BASEOPT) $(SOURCEC)
	if ("$(SOURCEF)" != "") $(FC) -c $(FFLAGS) $(BASEOPTF) $(SOURCEF)
	$(AR) clr $(LIBNAME) $(OBJS)
	$(RM) $(OBJS)
	
deletelibs:
	if (test -w $(LIBNAME)) then $(RM) $(LIBNAME) ; fi

lint:
	lint -cvhu -DLINT $(SOURCE)
lintlib:
	lint -cvhu -DLINT -Cltmp $(IFLAGS) $(SOURCE)
	mv llib-lltmp.ln $(LIBBASE).ln

.c.a: 
	$(CC) -c $(CFLAGS) $(BASEOPT) $*.c
	$(AR) clr $(LIBNAME) $*.o
	rm $*.o
.c.o: 
	$(CC) -c $(CFLAGS) $(BASEOPT) $*.c
.f.o: 
	$(FC) -c $(FFLAGS) $(BASEOPTF) $*.f
.f.a: 
	$(FC) -c $(FFLAGS) $(BASEOPTF) $*.f
	$(AR) clr $(LIBNAME) $*.o
	rm $*.o


