Optimization of annealing temperature
I'm going to give this question a blind attempt, assuming you are talking about PCR (since you are talking about genomic DNA and cDNA) and not RT-PCR or qPCR, since I know very little about them. This answer is not necessarily optimisation for annealing but checking some basics and potential solutions. In my work I had to do a lot of site directed mutagenesis and genotyping and there are some important rules you have to follow in your primer design. First try to keep your primer length between 25-30 for sequencing (at least thats what I do) and for site-directed mutagenesis between 25-45 since anything above 45 bases increases the likelihood of secondary structure formation. Primer melting temperature (Tm) should be >=78 oC (Tm= 81.5 + 0.41(%GC)-675/N [with N being primer length in bases]). Also primers should have a minimum CG content of 40% and should ideally start and end with a C or G. So check your primer CG% since if its too high then it will make a few problems including increased Tm and possibility of primer-dimer formation due to CG triple hydrogen binding. This document has some nice information (http://www.genomics.agilent.com/files/Manual/210518.pdf)

In my opinion if all else fails and you are still struggling with your primers, then re-design a new primer set, if possible. Now getting back to the annealing temperature issue, in my experience for cDNA, annealing temp of 50 oC works best and for genomic DNA, annealing temp of 55 oC works best, which is about the range most people work with and I have so far had no problems. I'm more than happy to share my genomic DNA PCR cycle information with you if you wish through an edit.

Hope this helps!