I'm trying to modify an existing makefile.am to include a rule to convert the *.rc extension into a resource file. Here's as far as I can currently get.
mytarget_SOURCES += ico.rc
.rc.o:
windres -i $< $@
As is described here: http://www.gnu.org/software/automake/manual/html_node/Suffixes.html In the generated makefile, ico.rc is added to the sources, and ico.o is added to the objects (so that's good I guess).
At the end of the makefile a this .rc.o rule is literally pasted, but I am doubting that should be the case, right? The .rc.o is supposed to be an automake rule, but it isn't a good make rule for creating the ico.o file, is it?
When make is run, it remakes the makefile and then goes on to complain on there being no rule to make ico.o. windres, or whatever I put there (e.g. an echo) is never run. I've tried googling, but information is scarce, and most I've been able to find is copies of the link I gave above. What am I doing wrong?