##
## Makefile for cpIce (GNU Make)
##
## You will have to change the paths to use this.
##

target  = cpIce.exe
objects = cpIce.obj rsrc.obj
temps   = rsrc.res

.PHONY: all clean

all: $(target)

$(target): $(objects)
	echo /nologo /release /subsystem:windows /opt:ref /opt:nowin98 >lnk.cmd
	echo /libpath:e:\masm32\lib >>lnk.cmd
	echo $^ >>lnk.cmd
	link @lnk.cmd
	$(RM) lnk.cmd

%.obj : %.asm
	ml /nologo /c /coff /Cp /Ie:\masm32\include /Fo$@ $<

rsrc.obj: rsrc.rc
	rc.exe /v $<
	cvtres.exe /machine:ix86 rsrc.res

clean:
	$(RM) $(target) $(objects) $(temps)
