title: How do write a makefile for C#?
body: <p>I have a simple C# program that needs to be run from the command line in Linux through mono. Here's what I have for my makefile so far. It's based off of a C++ makefile I found for another program. I tried modifying it to work with my C# program but it says certain source files could not be found. </p>
  
  <pre><code>.PHONY : build view clean
  
  build : test
  @# do nothing
  
  test : test.o
  gmcs test test.o
  
  test.o : test.cs
  gmcs test.cs
  
  view :
  @\less test.cs
  
  clean :
  -\rm *.exe
  -\rm test
  </code></pre>
  
  <p>I've never worked with makefiles before so I don't really know what I'm doing wrong. There's only one file in my entire project and that's just test.cs. The final goal of this is to be able to run the program by typing in the command line:</p>
  
  <pre><code>./test
  </code></pre>
  
  <p>And it should clean up the .exe files generated too. </p>