avr/ws2812/Makefile

12 lines
521 B
Makefile

MCU=attiny85
CHIP_SELECT=AVR_ATtiny85
F_CPU=8000000
CFLAGS=-O -finline-functions -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=${F_CPU} -std=gnu99 -D__${CHIP_SELECT}__=1 -mmcu=${MCU}
main:
${GCC}/bin/avr-gcc ${CFLAGS} -I../base/include/ -E -o main.E src/main.c
${GCC}/bin/avr-gcc ${CFLAGS} -I../base/include/ -S -o main.S src/main.c
${GCC}/bin/avr-gcc ${CFLAGS} -I${SIMAVR}/include/ -I../base/include/ -o main.elf src/main.c
${OBJCOPY} -O ihex main.elf main.hex