> I think I'd put the WebFileTOC in a .c and define an empty extern
> WebFileTOC in the .h. You really don't want memory allocation occurring
> in a .h as you show above.
I agree, and would like to eventually incorporate that change.
> Then in your Makefile add a pattern rule:
> %.html : %.o
> avr-objcopy -B elf $< $@
> Perhaps rename your files to index_html.html, error_html.html, and
> main_css.html so as to get something close to the names you have used
I guess I wasn't clear enough. I actually have a rule like that, and the file you see was actually generated by my Makefile. The problem is that it doesn't properly handle the dependencies. I want a change in a .html to result in the web.h being re-built, and then any code that includes web.h being recompiled.
Maybe I just need to ensure that these rules are the first to execute in the Makefile?
> Put index_html.o, error_html.o, and main_css.o in your list of objects
> to link and that should be it.
One of the things I'm trying to avoid is to have to specify the .o files. My make rules allow me to specify the source files, and the lists of corresponding .o get built automatically.
Unfortunately, I've had a number weird issues, not the least of which is that sometimes I've seen the .html replaced by what should've gone into the .o (I don't know what steps are required to reproduce this).
Here's a set of rules (I left out some of the CSS and PNG rules for brevity):