[En-Nut-Discussion] Readability modification to Makefiles

Bernd Walter enut at cicely.de
Mon Mar 21 11:43:50 CET 2011

On Mon, Mar 21, 2011 at 10:26:13AM +0100, Harald Kipp wrote:
> Hi Ulrich,
> On 3/20/2011 2:06 PM, Ulrich Prinz wrote:
> > While this is not to problematic for the Nut/OS build process as there
> > the compiler is set very strict and any simple warning will cause an
> > abort, compiling your application can inherit lots of warnings that you
> > never see on the overloaded screen.
> Agreed.

For me ethernut is compiled Werror:

No way to _oversee_ a warning with that.

> > What does the trick is the following:
> ...
> > %.hex: %.elf
> > 	@echo "  [HEX] $@"
> > 	@$(BIN) $(BINFLAGS) -O ihex $<  $@
> Putting this on every command line has a disadvantage. Sometimes I need 
> to inspect the command for 2 reasons:
> 1. I want to copy the command to use it "offline" (without calling make).
> 2. Users often report problems, where the command output of make would 
> show me, what's wrong.

It was also very handy to verify thumb vs non-thumb usage in ARM, since
interrupt code can't be compiled as thumb code.

B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.

More information about the En-Nut-Discussion mailing list