# Simple Makefile
# Volker Oth (c) 1999

include $(AVR)/include/make1

########### change this lines according to your project ##################

#put the name of the target mcu here (at90s8515, at90s8535, attiny22, atmega603 etc.)
    MCU = atmega163
    
#put the name of the target file here (without extension)
	TRG	= start
	
#put your C sourcefiles here 
	SRC	= $(TRG).c uart.c lcd.c interpreter.c getPCData.c tools.c

#put additional assembler source file here
	ASRC = 
	
#additional libraries and object files to link
	LIB	=

#additional includes to compile
	INC	= 

#compiler flags
	CPFLAGS	= -g -Os -Wall -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst)

#linker flags
	LDFLAGS = -Wl,-Map=$(TRG).map,--cref

########### you should not need to change the following line #############
include $(AVR)/include/make2
		  
###### dependecies, add any dependencies you need here ###################

#--- link: instructions to create elf output file from object files
#%elf:	%o
#	$(CC) $^ $(LIB) $(LDFLAGS) -o $@
	
start.elf:	start.o lcd.o tools.o i2c.o interpreter.o uart.o GetPCData.o
	$(CC) $^ $(LIB) $(LDFLAGS) -o $@	
	

$(TRG).o: $(TRG).c uart.h
uart.o: uart.c uart.h 
start.o: start.c
uart.o: uart.c uart.h
lcd.o: lcd.c lcd.h
tools.o: tools.h
interpreter.o: interpreter.c
getpcdata.o: getpcdata.o



