Root/Examples/UNFURO/RF/Makefile

1MCU = atmega168
2CC = avr-gcc
3OBJCOPY= avr-objcopy
4CFLAGS = -g -mmcu=$(MCU) -Wall -Wstrict-prototypes -O0 -mcall-prologues
5BINDIR = binary
6TARGET = prog
7
8OBJECTS = main.o
9
10.PHONY: all
11
12all: $(TARGET).hex
13
14prog.hex : main.out
15    $(OBJCOPY) -R .eeprom -O ihex main.out $(BINDIR)/$(TARGET).hex
16    
17main.out : $(OBJECTS)
18    $(CC) $(CFLAGS) -o main.out -Wl,-Map,main.map $(OBJECTS) -lm
19    avr-size main.out
20
21main.o : main.c
22    $(CC) $(CFLAGS) -Os -c main.c
23
24clean:
25    rm -f *.o *.map *.out *.hex $(BINDIR)/$(TARGET).hex
26

Archive Download this file

Branches:
master



interactive