5 vpath % .:..:../core:../product:../drivers:../avr
6 vpath ao-make-product.5c ../util
10 #PROGRAMMER=stk500v2 -P usb
13 LOADARG=-p $(DUDECPUTYPE) -c $(PROGRAMMER) -e -U flash:w:
52 PRODUCT_DEF=-DTELEPYRO
54 CFLAGS = $(PRODUCT_DEF) -I. -I../avr -I../core -I..
55 CFLAGS += -mmcu=$(MCU) -Wall -Wstrict-prototypes -O3 -mcall-prologues -DAVR
61 SRC=$(ALTOS_SRC) ao_telepyro.c
65 # The user has explicitly enabled quiet compilation.
67 quiet = @printf " $1 $2 $@\n"; $($1)
69 # Otherwise, print the full command line.
74 CHECK=sh ../util/check-avr-mem
76 $(PROG): Makefile $(OBJ)
77 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ)
78 $(call quiet,CHECK) $(PROG) || ($(RM) -f $(PROG); exit 1)
82 $(OBJCOPY) -R .eeprom -O ihex $(PROG) $@
86 $(LOADCMD) $(LOADARG)$(PROG).hex
88 ao_product.h: ao-make-product.5c ../Version
89 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
91 ao_product.o: ao_product.c ao_product.h
94 $(call quiet,CC) -c $(CFLAGS) $<
99 rm -f $(OBJ) $(PROG) $(PROG).hex