[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] assembler expressions

From: Jeff Epler
Subject: Re: [avr-gcc-list] assembler expressions
Date: Sun, 6 Mar 2005 08:40:28 -0600
User-agent: Mutt/1.4.2i

You could have "make" compute the value using a shell command, like the
arbitrary-precision calculator "bc":
# Makefile
F1    := 1000000
F_CPU := 12000000
LO_F  := $(shell echo "$(F1)*$(F_CPU)/(15*16777216)" | bc)

        @echo as ... -DLO_F=$(LO_F) ...

.PHONY: all

$ make
as ... -DLO_F=47683 ...

bc has been installed on most unix systems I remember using.


Attachment: pgpEL4962WhNu.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]