5 vpath % ../attiny:../drivers:../kernel:../product:..
6 vpath ao-make-product.5c ../util
7 vpath make-altitude-pa ../util
9 include ../avr/Makefile.defs
13 #PROGRAMMER=stk500v2 -P usb
15 LOADARG=-p $(DUDECPUTYPE) -c $(PROGRAMMER) -e -U flash:w:
17 #LDFLAGS=-L$(LDSCRIPTS) -Tavr25.x
49 PRODUCT_DEF=-DNANOPEAK
50 CFLAGS = $(PRODUCT_DEF) -I. -I../attiny -I../kernel -I.. -I../drivers -I../product
51 CFLAGS += -g -mmcu=$(MCU) -Wall -Wstrict-prototypes -O2 -mcall-prologues -DATTINY
61 # The user has explicitly enabled quiet compilation.
63 quiet = @printf " $1 $2 $@\n"; $($1)
65 # Otherwise, print the full command line.
68 all: $(PROG) $(PROG).hex
70 CHECK=sh ../util/check-avr-mem
72 $(PROG): Makefile $(OBJ)
73 $(call quiet,CC) $(LDFLAGS) $(CFLAGS) -o $(PROG) $(OBJ)
74 $(call quiet,CHECK) $(PROG) || ($(RM) -f $(PROG); exit 1)
78 $(OBJCOPY) -R .eeprom -O ihex $(PROG) $@
82 $(LOADCMD) $(LOADARG)$(PROG).hex
84 load-slow: $(PROG).hex
85 $(LOADCMD) $(LOADSLOW) $(LOADARG)$(PROG).hex
87 ao_product.h: ao-make-product.5c ../Version
88 $(call quiet,NICKLE,$<) $< -m altusmetrum.org -i $(IDPRODUCT) -p $(PRODUCT) -v $(VERSION) > $@
90 ao_product.o: ao_product.c ao_product.h
93 $(call quiet,CC) -c $(CFLAGS) $<
98 rm -f *.o $(PROG) $(PROG).hex
101 ../altitude-pa.h: make-altitude-pa
108 $(OBJ): ao_product.h $(INC)