altos: Move profiling settings to Makefile
authorKeith Packard <keithp@keithp.com>
Wed, 4 Jul 2012 04:02:20 +0000 (21:02 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 4 Jul 2012 04:02:20 +0000 (21:02 -0700)
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>
src/megametrum-v0.1/Makefile
src/megametrum-v0.1/ao_pins.h

index e789a0e86ed57195d7d38c38edbb7a391c980283..6fc9324e1d501a25b15dc88b141ec2486707e865 100644 (file)
@@ -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
 
index dc3761ba3f16506d2138e1c12b120652c58fb210..34b75255094751d2600a6b30b8491f4b2b5e7c82 100644 (file)
@@ -326,6 +326,8 @@ struct ao_adc {
  * Profiling Viterbi decoding
  */
 
+#ifndef AO_PROFILE
 #define AO_PROFILE             0
+#endif
 
 #endif /* _AO_PINS_H_ */