5 vpath % ..:../kernel:../product:../drivers:../avr
6 vpath ao-make-product.5c ../util
8 include ../avr/Makefile.defs
12 #PROGRAMMER=stk500v2 -P usb
13 LOADARG=-p $(DUDECPUTYPE) -c $(PROGRAMMER) -e -U flash:w:
15 #LDFLAGS=-L$(LDSCRIPTS) -Tavr5.x
25 # Common AltOS sources
27 TELESCIENCE_STORAGE= \
53 $(TELESCIENCE_STORAGE)\
56 PRODUCT=TeleScience-PWM
58 PRODUCT_DEF=-DTELESCIENCE -DTELESCIENCE_PWM
60 CFLAGS = $(PRODUCT_DEF) -I. -I../avr -I../kernel -I..
61 CFLAGS += -g -mmcu=$(MCU) -Wall -Wstrict-prototypes -O3 -mcall-prologues -DAVR
67 SRC=$(ALTOS_SRC) ao_telescience.c
71 # The user has explicitly enabled quiet compilation.
73 quiet = @printf " $1 $2 $@\n"; $($1)
75 # Otherwise, print the full command line.
80 CHECK=sh ../util/check-avr-mem
82 $(PROG): Makefile $(OBJ)
83 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ)
84 $(call quiet,CHECK) $(PROG) || ($(RM) -f $(PROG); exit 1)
88 $(OBJCOPY) -R .eeprom -O ihex $(PROG) $@
92 $(LOADCMD) $(LOADARG)$(PROG).hex
94 ao_product.h: ao-make-product.5c ../Version
95 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
97 ao_product.o: ao_product.c ao_product.h
100 $(call quiet,CC) -c $(CFLAGS) $<
105 rm -f *.o $(PROG) $(PROG).hex
112 $(OBJ): ao_product.h $(INC)