Added shared build for Windows makefile
- Added history cleaning in Linux makefile
- Minor makefiles fixes