FC=lf95
FOPTS=
LDOPTS=

Intercom_1000: Intercom_1000.o Exec.o Memory.o Output_m.o Paper_Tape.o
	$(FC) -o Intercom_1000 $(LODPTS)  \
                 Intercom_1000.o Exec.o Memory.o Output_m.o Paper_Tape.o

exec.mod Exec.o: Exec.f90 memory.mod output_m.mod paper_tape.mod
	$(FC) -c $(FOPTS) Exec.f90

memory.mod Memory.o: Memory.f90
	$(FC) -c $(FOPTS) Memory.f90

output_m.mod Output_m.o: Output_m.f90
	$(FC) -c $(FOPTS) Output_m.f90

paper_tape.mod Paper_Tape.o: Paper_Tape.f90
	$(FC) -c $(FOPTS) Paper_Tape.f90

Intercom_1000.o: Intercom_1000.f90 \
               exec.mod memory.mod output_m.mod paper_tape.mod
	$(FC) -c $(FOPTS) Intercom_1000.f90

clean:
	rm -f *.o *.mod Intercom_1000

tar:
	tar czf Intercom_1000.tgz *.f90 Makefile

zip:
	zip -9 Intercom_1000.zip *.f90 Makefile

allclean:
	rm -f *.zip *.tgz
	make clean
