diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2020-01-16 01:47:25 -0800 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2020-01-16 01:47:25 -0800 |
commit | cd0600d7fbb909612eee277d76b1d8700c052788 (patch) | |
tree | ab42be0eff7f0d46c99473709e4d27dbff338f15 | |
parent | 96b68d03cf1e8536212461018c174ed3dfadc4ea (diff) | |
download | christmas_lights-cd0600d7fbb909612eee277d76b1d8700c052788.tar.gz christmas_lights-cd0600d7fbb909612eee277d76b1d8700c052788.tar.xz |
-rw-r--r-- | Makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..792f0ab --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +CC = avr-gcc +OBJCOPY = avr-objcopy + +CFLAGS += -mmcu=attiny85 -O2 -Wall + +TARGET = cl.hex + +SRC = $(wildcard *.c) +OBJ = $(SRC:.c=.o) + +all: $(TARGET) + +$(TARGET:.hex=.elf): $(OBJ) + $(CC) $(CFLAGS) -o $@ $^ + +%.hex: %.elf + $(OBJCOPY) -j .text -j .data -O ihex $< $@ + +clean: + rm -f $(TARGET) $(TARGET:.hex=.elf) $(OBJ) + +.PHONY: all clean |