b15f/Makefile

37 lines
885 B
Makefile
Raw Normal View History

2019-03-22 14:51:52 +00:00
# Name: Makefile
# Project: B15F (board15 Famulus Edition)
2019-03-22 14:51:52 +00:00
# Author: Tristan Krause
# Creation Date: 2019-03-22
# Umgebungseinstellungen
COMPILER_PATH = C:\avr8-gnu-toolchain-win32_x86\bin\avr-g++.exe
OBJCOPY_PATH = C:\avr8-gnu-toolchain-win32_x86\bin\avr-objcopy.exe
2019-03-22 14:51:52 +00:00
OUTPUT = B15F.elf
HEX = B15F.hex
2019-03-22 14:51:52 +00:00
CFLAGS = -std=c++14 -mmcu=atmega1284 -DF_CPU=20000000
LDFLAGS =
OBJECTS = main.o spi.o
2019-03-22 14:51:52 +00:00
COMPILE = $(COMPILER_PATH) $(CFLAGS)
B15F: $(OBJECTS)
@echo "Linking..."
$(COMPILE) $(OBJECTS) -o $(OUTPUT) $(LDFLAGS)
$(OBJCOPY_PATH) -O ihex -R .eeprom -R .fuse -R .lock -R .signature $(OUTPUT) $(HEX)
2019-03-22 14:51:52 +00:00
help:
@echo "This Makefile has the following rules. Use one of the following:"
@echo "make B15F .... to compile (default)"
@echo "make clean ... to delete objects and hex file"
clean:
@echo "Cleaning..."
2019-03-22 14:51:52 +00:00
rm -f $(OBJECTS) $(OUTPUT)
.cpp.o:
$(COMPILE) -c $< -o $@