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:
29 # Common AltOS sources
31 TELESCIENCE_STORAGE= \
56 $(TELESCIENCE_STORAGE)\
59 PRODUCT=TeleScience-v0.1
61 PRODUCT_DEF=-DTELESCIENCE
63 CFLAGS = $(PRODUCT_DEF) -I. -I../avr -I../core -I..
64 CFLAGS += -g -mmcu=$(MCU) -Wall -Wstrict-prototypes -O3 -mcall-prologues -DAVR
70 SRC=$(ALTOS_SRC) ao_telescience.c
74 # The user has explicitly enabled quiet compilation.
76 quiet = @printf " $1 $2 $@\n"; $($1)
78 # Otherwise, print the full command line.
83 CHECK=sh ../util/check-avr-mem
85 $(PROG): Makefile $(OBJ)
86 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ)
87 $(call quiet,CHECK) $(PROG) || ($(RM) -f $(PROG); exit 1)
91 $(OBJCOPY) -R .eeprom -O ihex $(PROG) $@
95 $(LOADCMD) $(LOADARG)$(PROG).hex
97 ao_product.h: ao-make-product.5c ../Version
98 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
100 ao_product.o: ao_product.c ao_product.h
103 $(call quiet,CC) -c $(CFLAGS) $<
115 $(OBJ): ao_product.h $(INC)