
#
# Computer Algebra Kit
# Copyright (c) 1992,1998 Computer Algebra Objects.  All Rights Reserved. 
#

#
# This Makefile should work with UNIX make's (like AT&T, BSD, GNU make)
#

MKDIR=mkdir
SED=sed
OBJC=@OBJC@
YACC=@YACC@
YTABH=@YTABH@
YTABC=@YTABC@
LEX=@LEX@
LEXYYC=@LEXYYC@
RM=@RM@
CP=@CP@
AR=@AR@
FINAL_AR=@FINAL_AR@
RANLIB=@RANLIB@
@SET_MAKE@
DBG_MFLAGS=@DBG_MFLAGS@
OPT_MFLAGS=@OPT_MFLAGS@
OBJSUFFIX=@OBJSUFFIX@
LIBSUFFIX=@LIBSUFFIX@
BOOTDIR=..@PATHSEP@..
LIBDIR=$(BOOTDIR)@PATHSEP@lib
IFLAGS=@CAKIT_IFLAGS@
MFLAGS=$(@MFLAGS@)

.SUFFIXES: .m 

LIBRARY=cakit.a
SHLIB=libcakit@DOTSHLIBSUFFIX@

.m.o:
	$(OBJC) -c $*.m $(MFLAGS) $(IFLAGS)
	$(AR) $(LIBRARY) $@

OBJFILES=\
	ccltn.o\
	ccltnsq.o\
	ccltnsqr.o\
	ccomplex.o\
	cfloat.o\
	fraction.o\
	integer.o\
	intmodp.o\
	matrix.o\
	 matsq.o\
	 matsqsq.o\
	monomial.o\
	 monomc.o\
	  dmonomc.o\
	  dmonoms.o\
	  smonomc.o\
	cobject.o\
	polynom.o\
	 polyeseq.o\
	 polyrseq.o\
	 polycseq.o\
	polc.o\
	 srspolc.o\
	  osrspolc.o\
	 drspolc.o\
	  odrspolc.o\
	  odrspols.o\
	  idrspolc.o\
	  idrspols.o\
	  mdrspolc.o\
	  mdrspols.o\
	 drdpolc.o\
	  odrdpolc.o\
	  odrdpols.o\
	  idrdpolc.o\
	  idrdpols.o\
	  mdrdpolc.o\
	  mdrdpols.o\
	 sespolc.o\
	  osespolc.o\
	 despolc.o\
	  odespolc.o\
	  odespols.o\
	  idespolc.o\
	  idespols.o\
	  mdespolc.o\
	  mdespols.o\
	cseq.o\
	 cseqc.o\
	symbol.o\
	term.o\
	vector.o\
	 vectorc.o\
	  ovectorc.o\
	  ovectors.o\
	  mvectorc.o\
	  mvectors.o\
	  ivectorc.o\
	  ivectors.o

$(LIBRARY) : $(OBJFILES)
	$(FINAL_AR) $(LIBRARY) $(OBJFILES)
	$(RANLIB) $(LIBRARY)

shlib : $(OBJFILES)
	objc -dl $(OBJFILES) -o $(SHLIB)

bootstrap :
	test -d $(LIBDIR) || $(MKDIR) $(LIBDIR)
	-$(CP) $(LIBRARY) $(LIBDIR)

cleantmp :
	-$(RM) *.P
	-$(RM) *.c
	-$(RM) *.i

clean : cleantmp
	-$(RM) *.o
	-$(RM) *.a

distclean : clean
	-$(RM) Makefile 

