Added the logic for enable/disable for accelerometer
simplified makefile