altos: Stop copying cc1111 binaries to the altos/src dir
[fw/altos] / src / product / Makefile.teledongle
index c1b422c06633e6275329188d633912921bb926df..da9bcba04597487776c62fe6efd5ee444ba431a7 100644 (file)
@@ -18,6 +18,8 @@ endif
 INC = \
        ao.h \
        ao_pins.h \
+       ao_arch.h \
+       ao_arch_funcs.h \
        cc1111.h \
        ao_product.h
 
@@ -31,17 +33,17 @@ CORE_SRC = \
        ao_rssi.c \
        ao_state.c \
        ao_stdio.c \
-       ao_task.c
+       ao_task.c \
+       ao_freq.c
 
 CC1111_SRC = \
-       ao_aes.c \
        ao_dbg.c \
        ao_dma.c \
        ao_led.c \
        ao_packet.c \
        ao_packet_master.c \
        ao_radio.c \
-       ao_radio_cmac.c \
+       ao_send_packet.c \
        ao_romconfig.c \
        ao_string.c \
        ao_timer.c \
@@ -59,7 +61,8 @@ SRC = \
        $(DRIVER_SRC) \
        $(PRODUCT_SRC)
 
-PROG = teledongle-v$(TD_VER)-$(VERSION).ihx
+PROGNAME = teledongle-v$(TD_VER)
+PROG = $(PROGNAME)-$(VERSION).ihx
 PRODUCT=TeleDongle-v$(TD_VER)
 PRODUCT_DEF=-DTELEDONGLE_V_$(TD_DEF)
 IDPRODUCT=0x000c
@@ -77,22 +80,18 @@ endif
 # Otherwise, print the full command line.
 quiet ?= $($1)
 
-all: ../$(PROG)
+all: $(PROG)
 
-../$(PROG): $(REL) Makefile
+$(PROG): $(REL) Makefile
        $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(REL) && cp $(PROG) $(PMAP) ..
-       $(call quiet,CHECK_STACK) ../cc1111/ao_arch.h $(PMEM)
+       $(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: