Windows makefile

I have a folder with a name 'X'. In XI have two subfolders: srcand include.

The folder srccontains the C file main.c, and the folder includecontains the file main.h.

I want to write a makefile to create these files (from a folder X) on a windows command prompt. I tried a lot, but without effect. First of all, for this I need the make file format on Linux, and as soon as I do this, I will do it on Windows.

Can someone help me with this?

+3
source share
3 answers

Try the following links, there you will find the format and basically everything you need to create a Makefile:

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

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

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

+5

Makefile, MinGW mingw32-make - GNU GNU make.

+1

Makefiles Windows Visual Studio. . , ! Include

makefile

! include

all: simple.exe challenge.exe

.c.obj:
$ (cc) $(cdebug) $(cflags) $(cvars) $*. c

simple.exe: simple.obj
$ (link) $(ldebug) $(conflags) -out: simple.exe simple.obj $(conlibs) lsapi32.lib

challenge.exe: challenge.obj md4c.obj
$ (link) $(ldebug) $(conflags) -out: challenge.exe $** $(conlibs) lsapi32.lib

0

Source: https://habr.com/ru/post/1709061/


All Articles