Changed some pins and added I2C support
This commit is contained in:
13
Makefile
13
Makefile
@@ -1,20 +1,23 @@
|
||||
OBJCOPY = avr-objcopy
|
||||
CC = avr-gcc
|
||||
BUILD = .build
|
||||
TARGET = main
|
||||
|
||||
TARGET = keyboard
|
||||
OPT = s
|
||||
CFLAGS = -Wall -Wextra -std=c18 -O$(OPT) -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -Iinclude
|
||||
|
||||
CFLAGS = -Wall -Wextra -std=c18 -O$(OPT) -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega328p -DF_CPU=16000000L -Iinclude -Ilibs/avr-i2c-slave
|
||||
LDFLAGS = -Wall -Wextra -O$(OPT) -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p
|
||||
|
||||
SRC = \
|
||||
src/main.c \
|
||||
src/keyboard.c \
|
||||
src/fifo.c \
|
||||
src/scancode.c
|
||||
src/scancode.c \
|
||||
libs/avr-i2c-slave/I2CSlave.c
|
||||
|
||||
OBJ = $(addprefix $(BUILD)/, $(notdir $(SRC:.c=.o)))
|
||||
vpath %.c $(sort $(dir $(SRC)))
|
||||
# We can't use this as it will use the wrong main
|
||||
# vpath %.c $(sort $(dir $(SRC)))
|
||||
vpath %.c $(dir $(SRC))
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
|
||||
Reference in New Issue
Block a user