#
# This is a template Makefile to be used while creating CORAL applications
#
# Each 'source' program (blah.S) must be run thru the translator, generating
# blah.C and possibly some blah.out.P (this file name, blah.out.P is not
# sacrosanct ... any unique file name will suffice).
# 
# Define CORALROOT to be the CORAL root directory
#
# Set appropriate CPlusFlags
#

#.SILENT         uncomment this if you wish

#CORALROOT=..
CPlus=g++
CPlusFlags=-g -I$(CORALROOT)/includes
Translator=translator

LIBS=$(CORALROOT)/src/coral.o $(CORALROOT)/bignum/BigNum.a -ll -lm

# makedepend needs this.
OTHERINCLUDES=-I/usr/misc/C++/include

.SUFFIXES: .C .S

SRCS= impmod1.S impmod2.S 

impmod1: impmod1.o
	$(CPlus) $(CPlusFlags) -o impmod1 impmod1.o $(LIBS)
	chmod a+x impmod1 

impmod2: impmod2.o
	$(CPlus) $(CPlusFlags) -o impmod2 impmod2.o $(LIBS)
	chmod a+x impmod2 

.S.o:
	$(Translator) -i $*.S -o $*.C
	$(CPlus) -c $(CPlusFlags) $*.C
	
depend:
	makedepend -- $(CPlusFlags) -- $(SRCS) $(OTHERINCLUDES)

clean:
	rm -f *.o *~ core 

# DO NOT DELETE THIS LINE -- make depend depends on it.
