Steven Michalske <[email protected]> wrote: > CFLAGS+=" -DMY_DATE=`date +%y%m%d` " > > and in your code > > #ifndef MY_DATE > #error "MY_DATE not defined." > #endif > > now use MY_DATE instead of __DATE__
Wow, now that looks cool ;-) I added your line to my makefile: ... CFLAGS= -Os -g -Wall -ffreestanding -mmcu=$(MCU) CFLAGS+=" -DMY_DATE=`date +%y%m%d` " ... ...but I get a Make error sadly, any idea, maybe a typo in what you posted ? ========= avr-gcc -Os -g -Wall -ffreestanding -mmcu=atmega32 " -DMY_DATE=`date +%y%m%d` " -c main.c avr-gcc: -DMY_DATE=090129 : No such file or directory make: *** [main.o] Error 1 ========= -- Vince, learning new cool tricks every day.. _______________________________________________ AVR-GCC-list mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
