To exclude a library from compilation, just use the variable EXCLUDE_LIBS on the main makefile with the name of the folder that includes the library.
# List core, application and user's libraries to be excluded
# For example, WiFi may crash on Arduino 1.0.2, Esplora on Arduino 1.0.3, Firmata on Teensy 3.0,
# OneWire on MPIDE 0023, HardwareSerial may conflict with MarlinSerial
#EXCLUDE_LIBS = Firmata WiFi Esplora OneWire Robot_Control Robot_Control/utility Robot_Motor
However, it requires the library to be within a folder.
I used this method to exclude some application libraries that conflicted with my own libraries, like WiFi.
For more information, please refer to chapter • section Build and Upload the Project • Manage the Libraries for Compilation of the User Manual.