altos: Have 'make clean' remove all programs, even old ones
[fw/altos] / src / megametrum-v0.1 / Makefile
index 06b5e2ae37aea6fec0c86718898a2dbea3487f9d..59cfb64d0449811d5bf0fc128acd31efb817c2d0 100644 (file)
@@ -28,6 +28,9 @@ INC = \
 #
 
 #PROFILE=ao_profile.c
+#PROFILE_DEF=-DAO_PROFILE=1
+
+#      ao_hmc5883.c
 
 ALTOS_SRC = \
        ao_interrupt.c \
@@ -60,14 +63,13 @@ ALTOS_SRC = \
        ao_exti_stm.c \
        ao_report.c \
        ao_i2c_stm.c \
-       ao_hmc5883.c \
        ao_mpu6000.c \
        ao_convert_pa.c \
        ao_log.c \
        ao_log_mega.c \
-       ao_sample_mm.c \
+       ao_sample.c \
        ao_kalman.c \
-       ao_flight_mm.c \
+       ao_flight.c \
        ao_telemetry.c \
        ao_packet_slave.c \
        ao_packet.c \
@@ -78,9 +80,10 @@ 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
+PROGNAME=megametrum-v0.1
+PROG=$(PROGNAME)-$(VERSION).elf
 
 SRC=$(ALTOS_SRC) ao_megametrum.c
 OBJ=$(SRC:.c=.o)
@@ -101,7 +104,7 @@ ao_product.h: ao-make-product.5c ../Version
 distclean:     clean
 
 clean:
-       rm -f $(OBJ)
+       rm -f *.o $(PROGNAME)-*.elf
        rm -f ao_product.h
 
 install: