makefiles: crossplatform detection + remove default cflags for linux