title: How to write CMakeLists.txt or Makefile to avoid conflicts when there're multiple implementations share the same interface in C?
body: <p>I have a C project with directory like this:</p>
  
  <pre><code>./I.h
  ./config.h
  ./one/{I.h, I.c}
  ./two/{I.h, I.c}
  </code></pre>
  
  <p>The interfaces are defined in I.h, two different implementations are in two folders <em>one</em> and <em>two</em>, we could define some macros in config to select which implementation I want. So, in I.h, it looks like:</p>
  
  <pre><code>#if   defined(USE_ONE)
    #include "./one/I.h"
  #elif defined(USE_TWO)
    #include "./two/I.h"
  #else
    #error ...
  #endif
  </code></pre>
  
  <p>I wonder how could I write the Makefile or CMakeLists.txt that could avoid compile the projects without conflicts. </p>
  
  <p>Thanks!</p>