|
From: Larry D. <ldo...@re...> - 2014-07-11 21:47:33
|
Steve - On Fri, Jul 11, 2014 at 02:30:55PM -0700, Stephen Williams wrote: > *Aaagh* > No no no no NO NO! Not 27 new files! 3! Three! OK. Sorry for the confusion. So you have in mind my original option #2. > I'm thinking for each *.vpi file (there are only 3 *.vpi files) > create a single *.h file that contains all the declarations that > that module needs. For example, for the system.vpi, create a > system_funcs.h file and put all the "extern void foo_register(void);" > declarations in there. Include that in the sys_table.c and the > other *.c files that make of the system.vpi. Then similar for > the va_math.vpi and so forth. This case adds what I would consider a spurious dependency between the number and name of such foo_register functions, and the individual programs that implement them. Right now if you add another VPI function, and list it in sys_table.c, none of the old 20 .c files get recompiled -- only re-linked. sys_table.c will of course need to be modified and recompiled. But the new sys_table.h is #included in both sys_table.c and all the components. Adding a new function involves changing that file. That means make will recognize the dependency, and recompile all of the other components as well, just because a new component is added to the list. If that issue doesn't bother you, it's not a bad option otherwise. - Larry |