###############################################################################
# Makefile for project 
###############################################################################

## General options
PROJECT = 
MCU = ATmega8
COMPILER = "WinAVR"
TARGET = Debug
SHELL = C:\Windows\system32\cmd.exe

## Tools general options
CCFLAGS=-Wall -gdwarf-2 -fsigned-char -MD -MP -DF_CPU=1000000 -O1 -mmcu=atmega8
LDFLAGS=-mmcu=atmega8

## Processing Tools
CC=avr-gcc.exe
ASM=avr-gcc.exe
LD=avr-gcc.exe
#  D:/ELECTRONICA/SOLDEERSTATION/station-9-hardy/eigen_soft/Debug/Debug.elf: TOOL=LD
#  Post: $(OBJ) avr-objcopy -O ihex -R .eeprom "./Debug.elf" "./Debug.hex"
#  Post: $(OBJ) avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex "./Debug.elf" "./Debug.eep" || exit 0 
#     D:/ELECTRONICA/SOLDEERSTATION/station-9-hardy/eigen_soft/Debug/loetstation.o: TOOL=CC
#        D:\ELECTRONICA\SOLDEERSTATION\station-9-hardy\eigen_soft\loetstation.c
#     D:/ELECTRONICA/SOLDEERSTATION/station-9-hardy/eigen_soft/Debug/lcd.o: TOOL=CC
#        D:/ELECTRONICA/SOLDEERSTATION/station-9-hardy/eigen_soft/lcd.c

# Build tree:
all:	Debug

Debug:	Debug.elf

Debug.elf:	loetstation.o lcd.o 
	$(LD) $(LDFLAGS)  -o "./Debug.elf" "loetstation.o" "lcd.o"
	$(OBJ) avr-objcopy -O ihex -R .eeprom "./Debug.elf" "./Debug.hex"
	$(OBJ) avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex "./Debug.elf" "./Debug.eep" || exit 0 

loetstation.o:	../LOETST~1.C 
	$(CC) $(CCFLAGS)  -o "loetstation.o" -c "../loetstation.c"

lcd.o:	../lcd.c 
	$(CC) $(CCFLAGS)  -o "lcd.o" -c "../lcd.c"

# tidy - delete all temporary files which are not involved in the target generation
tidy:
	rm -rf ./loetstation.d
	rm -rf ./lcd.d

# cleanup - delete all generated files
clean:	tidy
	rm -rf Debug.elf
	rm -rf loetstation.o
	rm -rf lcd.o

