#-------Cpt5--------------------------------------------#

cpt5: cpt5_syf  cpt5_asimut
 
cpt5_syf        : cpt5a.vbe \
                          cpt5j.vbe \
                          cpt5m.vbe \
                          cpt5o.vbe \
                          cpt5r.vbe
	@echo "<-- Generated"
 
cpt5_asimut     : cpt5a.pat \
                          cpt5j.pat \
                          cpt5m.pat \
                          cpt5o.pat \
                          cpt5r.pat
	@echo "<-- Simulated"

#-------Finite State Machine Synthesis-----------------#

cpt5a.vbe: cpt5.fsm
	@echo "    Encoding Synthesis -> cpt5a.vbe"
	syf -CEV -a cpt5
 
cpt5j.vbe: cpt5.fsm
	@echo "    Encoding Synthesis  -> cpt5j.vbe"
	syf -CEV -j cpt5
 
cpt5m.vbe: cpt5.fsm
	@echo "    Encoding Synthesis  -> cpt5m.vbe"
	syf -CEV -m cpt5
 
cpt5o.vbe: cpt5.fsm
	@echo "    Encoding Synthesis  -> cpt5o.vbe"
	syf -CEV -o cpt5
 
cpt5r.vbe: cpt5.fsm
	@echo "    Encoding Synthesis  -> cpt5r.vbe"
	syf -CEV -r cpt5

#-------Behavioral Simulation--------------------------#

cpt5a.pat: cpt5a.vbe cpt5.pat
	@echo "    Encoding Simulation -a -> cpt5a.pat"
	asimut -zerodelay -b cpt5a cpt5 cpt5a
 
cpt5j.pat: cpt5j.vbe cpt5.pat
	@echo "    Encoding Simulation -j -> cpt5j.pat"
	asimut -zerodelay -b cpt5j cpt5 cpt5j
 
cpt5m.pat: cpt5m.vbe cpt5.pat
	@echo "    Encoding Simulation -m -> cpt5m.pat"
	asimut -zerodelay -b cpt5m cpt5 cpt5m
 
cpt5o.pat: cpt5o.vbe cpt5.pat
	@echo "    Encoding Simulation -o -> cpt5o.pat"
	asimut -zerodelay -b cpt5o cpt5 cpt5o
 
cpt5r.pat: cpt5r.vbe cpt5.pat
	@echo "    Encoding Simulation -r -> cpt5r.pat"
	asimut -zerodelay -b cpt5r cpt5 cpt5r

#-------Clean Up---------------------------------------#

clean :
	rm -f  *.vbe *.enc
	rm -f cpt5?.pat
	@echo "Erase all the files generated by the makefile"

