Small Makefile issue causes compile issues on some Linux targets
Intel Hex or Motorola Hex file converter
Brought to you by:
jpelletier
There's a small makefile issue that particularly causes issues when compiling on gcc 4.9.2 on a Raspberry Pi. The pattern rule in the Makefile for creating .o files from .c files is missing the "." before the file extension. This is causing Make (at least on that system) to call 'cc' instead of 'gcc' and not pass the arguments, which fails to compile because it is then missing the -std=c99 flag.
This is fixed by changing the pattern rule from this:
%o : %c
gcc -c $(CPFLAGS) $< -o $@
To this:
%.o : %.c
gcc -c $(CPFLAGS) $< -o $@
Making this simple change of making it "%.o : %.c" allows it to compile and work correctly on the Raspberry Pi and should continue to be correct on other platforms too.
I'll make the change in the next release. Thanks!