From 31b05454ec8d90b89fa3039563ff0e86ae80b2a0 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 3 Jul 2012 21:02:20 -0700 Subject: [PATCH] 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 --- src/megametrum-v0.1/Makefile | 3 ++- src/megametrum-v0.1/ao_pins.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) 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_ */ -- 2.30.2