diff options
author | Josh Blum <josh@joshknows.com> | 2013-06-10 11:00:07 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2013-06-10 11:00:07 -0700 |
commit | 3924a4d70ef11f4e13cd45617ccc2f7c12c2cd05 (patch) | |
tree | e8395bbdd39e4a0bf9e844662b90c427289b27e2 /firmware/octoclock/Makefile | |
parent | 91e0ed6d4d81ec036070b9ccd327fd496399d273 (diff) | |
parent | 9fefb30f210f86c8c5964ca8ee80f63ad8856d02 (diff) | |
download | uhd-3924a4d70ef11f4e13cd45617ccc2f7c12c2cd05.tar.gz uhd-3924a4d70ef11f4e13cd45617ccc2f7c12c2cd05.tar.bz2 uhd-3924a4d70ef11f4e13cd45617ccc2f7c12c2cd05.zip |
Merge branch 'mergeme/octoclock'
Diffstat (limited to 'firmware/octoclock/Makefile')
-rw-r--r-- | firmware/octoclock/Makefile | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/firmware/octoclock/Makefile b/firmware/octoclock/Makefile new file mode 100644 index 000000000..6ef662bc6 --- /dev/null +++ b/firmware/octoclock/Makefile @@ -0,0 +1,56 @@ +# +# Copyright 2009 Ettus Research LLC +# + +################################################## +# Compiler +################################################## +CC = avr-gcc +OBJCOPY = avr-objcopy +STRIP = avr-strip +OBJDUMP = avr-objdump +SREC = srec_cat +#CFLAGS = -O2 -std=gnu99 -fshort-enums -pedantic-errors -Wall -Werror \ +# -Wstrict-prototypes -Wmissing-prototypes -Wcast-align -Wshadow +CFLAGS = -std=gnu99 -O2 + +#-D IO_DEBUG + +################################################## +# Files +################################################## +HDRS = OctoClock-io.h +SRCS = OctoClock.c +TARGET = octoclock_fw + +################################################## +# Device +################################################## +MMCU = atmega128 +PROGRAMMER = avrisp2 +PORT = usb +AVRDUDE = avrdude -p $(MMCU) -c $(PROGRAMMER) -P $(PORT) + +################################################## +# Global Targets +################################################## +all: $(TARGET).hex + +clean: + $(RM) *.o *.elf *.hex + +install: all + $(AVRDUDE) -U flash:w:$(TARGET).hex:i + +################################################## +# Dependency Targets +################################################## + +$(TARGET).hex: $(TARGET).elf + $(OBJCOPY) -O ihex $< $@ + +$(TARGET).elf: $(SRCS:.c=.o) + $(CC) -mmcu=$(MMCU) $^ -o $@ + +%.o: %.c $(HDRS) Makefile + $(CC) -mmcu=$(MMCU) -c $< -o $@ $(CFLAGS) |