title: Makefile that distinguishes between Windows and Unix-like systems
body: <p>I would like to have the same Makefile for building on Linux and on Windows. I use the default <em>GNU make</em> on Linux and the  <em>mingw32-make</em> (also <em>GNU make</em>) on Windows.</p>
  
  <p>I want the Makefile to detect whether it operates on Windows or Linux.</p>
  
  <hr>
  
  <p>For example <code>make clean</code> command on Windows looks like:</p>
  
  <pre><code>clean:
      del $(DESTDIR_TARGET)
  </code></pre>
  
  <p>But on Linux:</p>
  
  <pre><code>clean:
      rm $(DESTDIR_TARGET)
  </code></pre>
  
  <p>Also I would like to use different directory separator on Windows (<code>\</code>) and Linux (<code>/</code>).</p>
  
  <hr>
  
  <p><strong>It is possible to detect Windows operating system in Makefile?</strong></p>
  
  <p>PS: <em>I do not want to emulate Linux on Windows (cygwin etc.)</em></p>
  
  <p>There is similiar question: <a href="https://stackoverflow.com/questions/714100/os-detecting-makefile">OS detecting makefile</a>, but I didn't find the answer here.</p>