Reputation: 59
How to write a makefile for programs that i want to run on windows. I want to use make files to compile the code instead of vc8 UI compiler.
Upvotes: 1
Views: 671
Reputation: 122391
Makefiles for Windows are just the same as those for other systems; no different at all. Here's an example one from Microsoft's own reference:
# Sample makefile
!include <win32.mak>
all: simple.exe challeng.exe
.c.obj:
$(cc) $(cdebug) $(cflags) $(cvars) $*.c
simple.exe: simple.obj
$(link) $(ldebug) $(conflags) -out:simple.exe simple.obj $(conlibs) lsapi32.lib
challeng.exe: challeng.obj md4c.obj
$(link) $(ldebug) $(conflags) -out:challeng.exe $** $(conlibs) lsapi32.lib
Upvotes: 0
Reputation: 18064
The Microsoft Program Maintenance Utility (NMAKE.EXE) is a tool that builds projects based on commands contained in a description file.
Upvotes: 1