From 583f00e0b8efe2832f63efb478a51d3ad35e92ed Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sun, 7 Oct 2007 22:16:03 +0200 Subject: Included SI2E avr modules. Well, this need more works... --- digital/avr/modules/math/fixed/test/Makefile | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 digital/avr/modules/math/fixed/test/Makefile (limited to 'digital/avr/modules/math/fixed/test/Makefile') diff --git a/digital/avr/modules/math/fixed/test/Makefile b/digital/avr/modules/math/fixed/test/Makefile new file mode 100644 index 00000000..04aa4cff --- /dev/null +++ b/digital/avr/modules/math/fixed/test/Makefile @@ -0,0 +1,38 @@ +BASE = ../../../.. +PROGS = test_fixed +SIMU_PROGS = test_fixed +test_fixed_SOURCES = test_fixed.c +MODULES = uart proto utils math/fixed math/random +CONFIGFILE = avrconfig.h +# atmega8, atmega8535, atmega128... +AVR_MCU = atmega128 +# -O2 : speed +# -Os : size +OPTIMIZE = -O2 + +HOST_LIBS = -lm + +include $(BASE)/make/Makefile.gen + +# Automatic tests. + +TEST_FILES = test.mul test.div test.cos test.sqrt +TEST_FILES := $(TEST_FILES:%=%.host) $(TEST_FILES:%=%.simu) +code_mul = m +code_div = d +code_cos = c +code_sqrt = s +code = $(code_$(1:test.%.$(2)=%)) + +clean.test: + rm -f $(TEST_FILES) + +SIMULAVR = simulavr -d $(AVR_MCU) -W 0x22,- -R 0x20,- -T uart0_exit + +.PRECIOUS: $(TEST_FILES) + +test.%.host: test_fixed.host + echo '!$(call code,$@,host)' | ./$< > $@ + +test.%.simu: test_fixed.avr.simu.elf + echo '!$(call code,$@,simu)\r' | $(SIMULAVR) -f $< > $@ -- cgit v1.2.3