changed makefiles to allow cross-compiling

Signed-off-by: Cedric Hombourger <chombourger@gmail.com>