CC       = cc -DNeXT
FC       = f77
AR       = ar
RM       = rm
RANLIB   = ranlib
SHELL    = /bin/sh
LINKER   = f77
# Pick these based on main program language
CLINKER = cc
FLINKER = f77
# Blas libraries
BLAS1 =
BLAS2 =
BLAS3 = 
BLAS  =
LAPACK = $(ITOOLSDIR)/libs/libs$(BOPT)/NeXT/liblapack.a

libbuild: $(SOURCE) $(LIBNAME)($(OBJS))
lib: $(SOURCE) $(LIBNAME)($(OBJS))
	ranlib  $(LIBNAME)
# 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)" != "" ] ; then \
	     $(CC) -c $(CFLAGS) $(BASEOPT) $(SOURCEC) ;\
	fi
	if [ "$(SOURCEF)" != "" ] ; then \
	     $(FC) -c $(FFLAGS) $(BASEOPTF) $(SOURCEF) ;\
	fi
	$(AR) clq $(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) cr $(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) cr $(LIBNAME) $*.o
	rm $*.o


