# specify paths to programs
# (update for specific installation)

FASM = C:\fasmw16738\fasm.exe
# assume RC/LINK are in path because NMAKE was invoked


# first clear list
.SUFFIXES :
# file types help build inference rules; order outputs<--->inputs type
.SUFFIXES : .exe .obj .fasm .res .rc


.fasm.obj :
	$(FASM) $< $@

.obj.exe :
	link $**

# use default rule to build RES from RC


# description blocks insure update when changes take place
# (first is build by default)
FileA.exe	:	FileA.obj FileB.obj FileC.res
# note: implied dependancy in leaf branch - only list unknowns
FileA.obj	:	FileA.finc
FileB.obj	:	FileB.finc
FileC.res	:	FileC.ico FileC.xml

# demonstrate inline file
FileC.xml :
	@type <<$@ >NUL
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
	xmlns="urn:schemas-microsoft-com:asm.v1"
	manifestVersion="1.0">
	<assemblyIdentity
		name="YourCorp.YourProduct.YourExe"
		processorArchitecture="amd64"
		version="0.0.0.1"
		type="win32"
	/>
	<description>TheProduct</description>
	<dependency>
		<dependentAssembly>
			<assemblyIdentity
				type="win32"
				name="Microsoft.Windows.Common-Controls"
				version="6.0.0.0"
				processorArchitecture="amd64"
				publicKeyToken="6595b64144ccf1df"
				language="*"
			/>
		</dependentAssembly>
	</dependency>
</assembly>
<< NOKEEP

clean	:
	@for %%a in	(	\
		FileA.exe	\
		FileA.obj	\
		FileB.obj	\
		FileC.res	\
		FileC.xml	\
	) do @if exist %%a del %%a
