Move linker flag to LDFLAGS, disable compiler warnings, fix type conversion bug