1
0
mirror of git://projects.qi-hardware.com/nn-usb-fpga.git synced 2025-01-10 11:10:15 +02:00
nn-usb-fpga/Examples/UNFURO/RF/Makefile

26 lines
513 B
Makefile
Raw Normal View History

2010-10-27 17:17:37 +03:00
MCU = atmega168
CC = avr-gcc
OBJCOPY= avr-objcopy
CFLAGS = -g -mmcu=$(MCU) -Wall -Wstrict-prototypes -O0 -mcall-prologues
BINDIR = binary
TARGET = prog
OBJECTS = main.o
.PHONY: all
all: $(TARGET).hex
prog.hex : main.out
$(OBJCOPY) -R .eeprom -O ihex main.out $(BINDIR)/$(TARGET).hex
main.out : $(OBJECTS)
$(CC) $(CFLAGS) -o main.out -Wl,-Map,main.map $(OBJECTS) -lm
avr-size main.out
main.o : main.c
$(CC) $(CFLAGS) -Os -c main.c
clean:
rm -f *.o *.map *.out *.hex $(BINDIR)/$(TARGET).hex