--- mstools/samples/mfedit/makefile 2018/08/09 18:20:54 1.1 +++ mstools/samples/mfedit/makefile 2018/08/09 18:21:57 1.1.1.2 @@ -4,29 +4,33 @@ !include cvars=-DNT -DWIN -DWIN32 +obj=obj -# This line allows NMAKE to work as well +!IF "$(CPU)" == "i386" +mycflag = -Fo.\$(obj)\\ +!ELSE +mycflag = -o .\$(obj)\$(*B).obj -Olimit 700 +!ENDIF 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 + $(cvtobj) $(cvtdebug) $(obj)\*.obj + $(link) $(linkdebug) $(guiflags) -out:mfedit.exe \ + $(obj)\mfedit.obj \ + $(obj)\mfedit.rbj $(guilibs) shell32.lib