Fix CCFLAGS handling

Signed-off-by: Vinzenz Feenstra <evilissimo@gmail.com>
Dynamic Linking support added to the buildsystem

Signed-off-by: Vinzenz Feenstra <evilissimo@gmail.com>