--- mstools/samples/mfedit/makefile 2018/08/09 18:20:54 1.1 +++ mstools/samples/mfedit/makefile 2018/08/09 18:24:08 1.1.1.3 @@ -4,29 +4,27 @@ !include cvars=-DNT -DWIN -DWIN32 - -# This line allows NMAKE to work as well +obj=obj +mycflag = -Fo.\$(obj)\\ all: mfedit.exe # Update the object file if necessary -mfedit.obj: mfedit.c mfedit.h - $(cc) $(cflags) $(cvars) mfedit.c - $(cvtobj) mfedit.obj +$(obj)\mfedit.obj: mfedit.c mfedit.h + IF NOT EXIST $(obj) md obj + $(cc) $(cdebug) $(cflags) $(mycflag) $(cvars) mfedit.c # Update the resources if necessary -res.res: res.rc mfedit.h - rc -r -fo mfedit.tmp res.rc - cvtres -$(CPU) mfedit.tmp -o res.res - del mfedit.tmp +$(obj)\mfedit.rbj: mfedit.rc mfedit.h + rc -r -fo .\$(obj)\mfedit.res mfedit.rc + cvtres -$(CPU) $(obj)\mfedit.res -o $(obj)\mfedit.rbj # Update the executable file if necessary, and if so, add the resource back in. -mfedit.exe: mfedit.obj \ - res.res - $(cvtobj) $(cvtdebug) *.obj - $(link) $(guiflags) -out:mfedit.exe \ - mfedit.obj \ - res.res $(guilibs) +mfedit.exe: $(obj)\mfedit.obj \ + $(obj)\mfedit.rbj + $(link) $(linkdebug) $(guiflags) -out:mfedit.exe \ + $(obj)\mfedit.obj \ + $(obj)\mfedit.rbj $(guilibs) shell32.lib