altos: Stop copying cc1111 binaries to the altos/src dir
[fw/altos] / src / product / Makefile.telemetrum
index 2759ac52c8ac3c6fa78879cda8bc25b5cfdaf5e3..c740a4831149325ca8bf67965847696de6150598 100644 (file)
@@ -7,8 +7,8 @@
 # TM_VER, TM_DEF, TM_INC and TM_SRC and include
 # this file
 
-vpath %.c ..:../core:../cc1111:../drivers:../product
-vpath %.h ..:../core:../cc1111:../drivers:../product
+vpath %.c .:..:../core:../cc1111:../drivers:../product
+vpath %.h .:..:../core:../cc1111:../drivers:../product
 vpath ao-make-product.5c ../util
 
 ifndef VERSION
@@ -18,6 +18,8 @@ endif
 INC = \
        ao.h \
        ao_pins.h \
+       ao_arch.h \
+       ao_arch_funcs.h \
        cc1111.h \
        altitude.h \
        ao_kalman.h \
@@ -40,7 +42,8 @@ CORE_SRC = \
        ao_log.c \
        ao_log_big.c \
        ao_report.c \
-       ao_telemetry.c
+       ao_telemetry.c \
+       ao_freq.c
 
 CC1111_SRC = \
        ao_adc.c \
@@ -54,6 +57,7 @@ CC1111_SRC = \
        ao_radio.c \
        ao_romconfig.c \
        ao_serial.c \
+       ao_string.c \
        ao_spi.c \
        ao_timer.c \
        ao_usb.c \
@@ -71,7 +75,8 @@ SRC = \
        $(DRIVER_SRC) \
        $(PRODUCT_SRC)
 
-PROG = telemetrum-v$(TM_VER)-$(VERSION).ihx
+PROGNAME = telemetrum-v$(TM_VER)$(TM_EXTRA)
+PROG = $(PROGNAME)-$(VERSION).ihx
 PRODUCT=TeleMetrum-v$(TM_VER)
 PRODUCT_DEF=-DTELEMETRUM_V_$(TM_DEF)
 IDPRODUCT=0x000b
@@ -89,22 +94,18 @@ endif
 # Otherwise, print the full command line.
 quiet ?= $($1)
 
-all: ../$(PROG)
+all: $(PROG)
 
-../$(PROG): $(REL) Makefile
-       $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
-       $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM)
+$(PROG): $(REL) Makefile
+       $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL)
+       $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM) || rm $@
 
 ao_product.h: ao-make-product.5c ../Version
        $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
 
 distclean:     clean
 
-clean:
-       rm -f $(ADB) $(ASM) $(LNK) $(LST) $(REL) $(RST) $(SYM)
-       rm -f $(PROG) $(PCDB) $(PLNK) $(PMAP) $(PMEM) $(PAOM)
-       rm -f ao_product.h
-       rm -f ../$(PROG) ../$(PMAP)
+clean: clean-cc1111
 
 install: