[En-Nut-Discussion] Selective Optimization Possible?

Bob Wirka bobwirka at yahoo.com
Wed Nov 6 07:20:58 CET 2013


Thank you for your reply.

Will try this.

Have also created an Eclipse project to generate libnutarch.a. Including the same sources as in the Nut Makefile. It compiles; will test that also.

Best regards,

Bob Wirka
Realtime Control Works

On Tuesday, November 5, 2013 5:15 PM, Henrik Maier <hmnews at proconx.com> wrote:
On 6/11/2013 9:02 AM, Bob Wirka wrote:
> Any way I could selectively change the optimization level for a particular file? Make one -O0 and the rest -Os?

Yes you can add selective macros definitions to a GNU makefile by 
prefixing the definition with the target name. For example:

avr/dev/ostimer.o: CPFLAGS = $(MCFLAGS) -O0 $(DEFS)

would apply different CPFLAGS settings only when compiling ostimer.o.




More information about the En-Nut-Discussion mailing list