Hello. In the samopinny meike there is such a goal:

build: $ (src)

avr-gcc $(CFLAGS) $(SYMBOLS) -c $(SRC) avr-gcc $(LDFLAGS) $(LSET) -o $(TARGET).elf $(OBJS) -lm avr-objcopy -O ihex -R .eeprom -R .nwram $(TARGET).elf $(TARGET).hex<br> 

After make build, an incomprehensible build file is created in the project directory. Can anyone explain what it is and why?

  • Well, it is created by some kind of touch then in order not to unnecessarily repeat the compilation / link / objcopy sequence. If the file creation / modification time is longer than the $ (SRC) modification time, then the .elf and .hex files are fresh and nothing needs to be done. Less - rebuild. Maybe a little awkward, but I don’t see any trouble. - alexlz
  • Thanks for the reply, alexlz. Yes, as it turned out, this file created gcc and not make, I copied the flags and some tricky options were included there. - AlexBalan

0