diff options
author | jaseg <code@jaseg.net> | 2016-05-04 14:07:15 +0200 |
---|---|---|
committer | jaseg <code@jaseg.net> | 2016-05-05 18:31:10 +0200 |
commit | 698c35b23c7f3f43e47479ff158e71c7c331f918 (patch) | |
tree | 4f9574fba9412a936de6deb12c1f0f80339ef05f /Makefile | |
download | cccb-klingel-698c35b23c7f3f43e47479ff158e71c7c331f918.tar.gz cccb-klingel-698c35b23c7f3f43e47479ff158e71c7c331f918.tar.bz2 cccb-klingel-698c35b23c7f3f43e47479ff158e71c7c331f918.zip |
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6bcec57 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +# Makefile to build light_ws2812 library examples +# This is not a very good example of a makefile - the dependencies do not work, therefore everything is rebuilt every time. + +# Change these parameters for your device + +F_CPU = 16000000 +DEVICE = atmega168 + +CFLAGS = -g2 -mmcu=$(DEVICE) -DF_CPU=$(F_CPU) +CFLAGS+= -Os -ffunction-sections -fdata-sections -fpack-struct -fno-move-loop-invariants -fno-tree-scev-cprop -fno-inline-small-functions +CFLAGS+= -Wall -Wno-pointer-to-int-cast +#CFLAGS+= -Wa,-ahls=$<.lst + +LDFLAGS = -Wl,--relax,--section-start=.text=0,-Map=main.map + +main.elf: main.c + avr-gcc $(CFLAGS) -o $@ $^ + avr-size $@ + +.PHONY: program +program: main.elf + avrdude -c arduino -P /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0 -b 19200 -p atmega168 -U flash:w:$< + +.PHONY: clean +clean: + rm -f main.elf |