Children's / YA book, don't remember too much about it. Main character is a wizard/apprentice? Prophecy of imminent destruction, quest to prevent it. Other fantasy races: trolls, living in underground caverns. Danger turns out to be alien spaceship which begins to harvest world for resources, by building a series of signal fires manage to communicate the presence of intelligent life.
Teranon adds: The dragon(s?) in the story spoke with certain parts of the sentences replaced with synonyms with slashes (for example: great/wonderful/fantastic). Also the main characters were a father son team, with the son apprenticed to the wizard father. I also think they made the signals in geometric shapes (circle, triangle, etc).