Electronics > Microcontrollers

Makefile change output hex file name from header file #define

<< < (5/5)

I've used (for Optiboot) CPP to output a shell-script based on command-line options, and then execute the shell script during the makefile.

--- Code: ---baudcheck: FORCE
    - @$(CC) --version
    - @$(CC) $(CFLAGS) -E baudcheck.c -o baudcheck.tmp.sh
    - @$(SH) baudcheck.tmp.sh

--- End code ---

You could use a similar technique to create a build-system-native executable that includes your headers and outputs your desired name, for later use in the Makefile.


[0] Message Index

[*] Previous page

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod