PROJ = avr-eb CC = avr-gcc OBJCOPY = avr-objcopy CPU = atmega88 CFLAGS += -Os -g -mmcu=$(CPU) -Wall CFLAGS += -Wa,-adhlns=$(<:%.c=%.lst) CLDFLAGS += -mmcu=$(CPU) -Wl,-Map=$(@:%.elf=%.map) HBWOBJS += hbwnode.o hbw.o all: hbwnode.hex hbwnode.o: hbwnode.c hbw.h hw.h testhw.h $(CC) $(CFLAGS) -DTESTNODE -c $< -o $@ hbwnode.elf: $(HBWOBJS) $(CC) $(CLDFLAGS) -o $@ $(HBWOBJS) %hex:%elf $(OBJCOPY) -j .text -j .data -O srec $< $@ clean: rm -f *.hex *.elf *.o *.lst *.map