all: tests 

CXX= ccache g++
CFLAGS= -g -O2 
CXXFLAGS = -g -Wall  -O2 
TESTOBJ8515= dummy.o wadotest.o serial.o simple.o iotest.om connect1.o connect2.o allops.o 

 
TESTOBJ128= mtimer1.om simple.om 


%.o: %.s
	avr-gcc -mmcu=at90s8515 -Wa,--gstabs,-D -xassembler-with-cpp -nostdlib $< -o $@ 

%.om: %.s
	avr-gcc -mmcu=atmega128 -Wa,--gstabs,-D -xassembler-with-cpp -nostdlib $< -o $@ 

%.om: %.c
	avr-gcc -Os -mmcu=atmega128 -g $< -o $@

%.o: %.c
	avr-gcc -Os -mmcu=at90s8515 -g $< -o $@


tests: $(TESTOBJ8515) $(TESTOBJ128)


clean:
	rm -f *.o simulavr *.bin *.srec *.oo *.om *binm *wrap.c *wrap.cxx *.so *_out *.o.go traceOut trace gmon.out irqstatistic


