-MCU = atmega328p
-CLOCK = 16000000
-CFLAGS = -Wall -Os -ffunction-sections -fdata-sections -mmcu=$(MCU) -DF_CPU=$(CLOCK)
-LDFLAGS = -Os -Wl,--gc-sections -mmcu=$(MCU)
+MCU := atmega328p
+CLOCK := 16000000
+CC := avr-gcc
+FEATURES := LCD_SHIFTREG LCD_ASYNC
+CFLAGS := -Wall -Os -ffunction-sections -fdata-sections -mmcu=$(MCU) -DF_CPU=$(CLOCK) $(patsubst %,-D%,$(FEATURES))
+LDFLAGS := -Os -Wl,--gc-sections -mmcu=$(MCU)
+AVRDUDE := avrdude
+OBJCOPY := avr-objcopy
+ifeq ($(MCU),atmega168)
+BAUD := 19200
+else
+BAUD := 57600
+endif