Hi,
in a large project with several source files (in C) for an
embedded target with not much ROM we want to use a self-written
"assert" that does not print out the file name (too much program
space) but uses a "file ID" that i want to hand over to the
compiler when generating the object file.
So
On 2006-7-3 18:58 UTC, Torsten Mohr wrote:
>
> in a large project with several source files (in C) for an
> embedded target with not much ROM we want to use a self-written
> "assert" that does not print out the file name (too much program
> space) but uses a "file ID" that i want to hand over to t
%% Torsten Mohr <[EMAIL PROTECTED]> writes:
tm> At the moment i think about adding a command line #define like:
tm> obj/%.o : %.c
tm> $(CC) -DF_ID=F_ID_$(subst .,_,$<)
tm> If then F_ID_main_c := 1 the compiler option should expand to
tm> -DF_ID=1 for "main.c".
In that case I t
Hi,
> In that case I think you meant:
> > obj/%.o : %.c
> > $(CC) -DF_ID=$(F_ID_$(subst .,_,$<))
yes, correct. I just wrote it as guessed without testing.
> tm> Now the question, if there is a list of sources in SRC, can i
> tm> somehow automatically generate variables F_ID_main_c,
%% Torsten Mohr <[EMAIL PROTECTED]> writes:
tm> Yes, correct. But we'll also generate a list of sources per release
tm> then.
This is going to be a pain as well: how can you generate this list if
make is computing the values? Make does NOT have any functions that
deal with creating files...
3 jul 2006 kl. 20.58 skrev Torsten Mohr:
Hi,
in a large project with several source files (in C) for an
embedded target with not much ROM we want to use a self-written
"assert" that does not print out the file name (too much program
space) but uses a "file ID" that i want to hand over to the
c