views:

392

answers:

2

I have a folder named 'X'. In X I have two subfolders named 'src' and 'include'.

The 'src' folder contains a C file 'main.c', and the 'include' folder contains a file 'main.h'.

I want to write a makefile to build these files(from folder X) in windows command prompt. I have tried a lot but with no effect. First of all I need the make file format in Linux for this, and once i have that i will do that in Windows.

Can anybody help me in doing this?

+4  A: 

Try the following links, in there you'll find the format, and basically all that you need to build your Makefile:

http://mrbook.org/blog/tutorials/make/

http://www.opussoftware.com/tutorial/TutMakefile.htm

http://oucsace.cs.ohiou.edu/~bhumphre/makefile.html

Gal Goldman
+1  A: 

Once you've made your Makefile, you can use MinGW's mingw32-make - A Windows native build of GNU make.

Nick