# 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 .:..:../kernel:../cc1111:../drivers:../product
+vpath %.h .:..:../kernel:../cc1111:../drivers:../product
vpath ao-make-product.5c ../util
ifndef VERSION
INC = \
ao.h \
ao_pins.h \
+ ao_arch.h \
+ ao_arch_funcs.h \
cc1111.h \
altitude.h \
ao_kalman.h \
ao_product.h \
+ ao_telemetry.h \
$(TM_INC)
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 \
$(DRIVER_SRC) \
$(PRODUCT_SRC)
-PROG = telemetrum-v$(TM_VER)-$(VERSION)$(TM_EXTRA).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
# 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: