summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-07-03 21:02:20 -0700
committerKeith Packard <keithp@keithp.com>2012-07-03 21:02:20 -0700
commit31b05454ec8d90b89fa3039563ff0e86ae80b2a0 (patch)
tree6f20c42fd155827ded2910f1bf54319fcb220c27 /src
parent939ad8bfd640ed55116703a58f87af06e75ef87e (diff)
altos: Move profiling settings to Makefile
Instead of splitting the changes across Makefile and ao_pins.h, put them both in Makefile to simplify enabling profiling. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/megametrum-v0.1/Makefile3
-rw-r--r--src/megametrum-v0.1/ao_pins.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/megametrum-v0.1/Makefile b/src/megametrum-v0.1/Makefile
index e789a0e8..6fc9324e 100644
--- a/src/megametrum-v0.1/Makefile
+++ b/src/megametrum-v0.1/Makefile
@@ -28,6 +28,7 @@ INC = \
#
#PROFILE=ao_profile.c
+#PROFILE_DEF=-DAO_PROFILE=1
# ao_hmc5883.c
@@ -79,7 +80,7 @@ PRODUCT=MegaMetrum-v0.1
PRODUCT_DEF=-DMEGAMETRUM
IDPRODUCT=0x0023
-CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) -Os -g
+CFLAGS = $(PRODUCT_DEF) $(STM_CFLAGS) $(PROFILE_DEF) -Os -g
PROG=megametrum-v0.1-$(VERSION).elf
diff --git a/src/megametrum-v0.1/ao_pins.h b/src/megametrum-v0.1/ao_pins.h
index dc3761ba..34b75255 100644
--- a/src/megametrum-v0.1/ao_pins.h
+++ b/src/megametrum-v0.1/ao_pins.h
@@ -326,6 +326,8 @@ struct ao_adc {
* Profiling Viterbi decoding
*/
+#ifndef AO_PROFILE
#define AO_PROFILE 0
+#endif
#endif /* _AO_PINS_H_ */