diff --git a/apps/self/Makefile b/apps/self/Makefile index 41c70f1..f372ab4 100644 --- a/apps/self/Makefile +++ b/apps/self/Makefile @@ -3,7 +3,11 @@ PROJECT:=$(shell basename ${PWD}) SRCS=${PROJECT}.c ${TOPDIR}/apps/common/crt0.S ${TOPDIR}/uvm32/uvm32.c CFLAGS=-DUVM32_MEMORY_SIZE=8192 -DCUSTOM_STDLIB_H=\"uvm32_target.h\" -I../../uvm32 all: - xxd -n mandel -i ${TOPDIR}/precompiled/mandel.bin | sed -e "s/unsigned char/const unsigned char/" > mandel.h + @echo "const unsigned char mandel[] = {" > mandel.h + @cat ${TOPDIR}/precompiled/mandel.bin | xxd -i >> mandel.h + @echo "};\nunsigned int mandel_len = " >> mandel.h + @wc -c ${TOPDIR}/precompiled/mandel.bin | awk '{print $$1}' >> mandel.h + @echo ";" >> mandel.h make all_common test: test_common clean: clean_common diff --git a/apps/self/mandel.h b/apps/self/mandel.h index 21f8d81..73d6532 100644 --- a/apps/self/mandel.h +++ b/apps/self/mandel.h @@ -25,4 +25,6 @@ const unsigned char mandel[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00 }; -unsigned int mandel_len = 300; +unsigned int mandel_len = +300 +; diff --git a/hosts/host-mini/Makefile b/hosts/host-mini/Makefile index 88a76a3..b55e6ef 100644 --- a/hosts/host-mini/Makefile +++ b/hosts/host-mini/Makefile @@ -1,7 +1,11 @@ TOPDIR=../.. all: - xxd -n mandel -i ${TOPDIR}/precompiled/mandel.bin | sed -e "s/unsigned char/const unsigned char/" > mandel.h + @echo "const unsigned char mandel[] = {" > mandel.h + @cat ${TOPDIR}/precompiled/mandel.bin | xxd -i >> mandel.h + @echo "};\nunsigned int mandel_len = " >> mandel.h + @wc -c ${TOPDIR}/precompiled/mandel.bin | awk '{print $$1}' >> mandel.h + @echo ";" >> mandel.h gcc -Wall -DUVM32_ERROR_STRINGS -DUVM32_MEMORY_SIZE=512 -O2 -I${TOPDIR}/uvm32 -I${TOPDIR}/common -o host-mini ${TOPDIR}/uvm32/uvm32.c host-mini.c clean: diff --git a/hosts/host-mini/mandel.h b/hosts/host-mini/mandel.h index 21f8d81..73d6532 100644 --- a/hosts/host-mini/mandel.h +++ b/hosts/host-mini/mandel.h @@ -25,4 +25,6 @@ const unsigned char mandel[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00 }; -unsigned int mandel_len = 300; +unsigned int mandel_len = +300 +; diff --git a/hosts/host-parallel/Makefile b/hosts/host-parallel/Makefile index f8ea5ff..df3ef4d 100644 --- a/hosts/host-parallel/Makefile +++ b/hosts/host-parallel/Makefile @@ -1,6 +1,10 @@ TOPDIR = ../.. all: - xxd -n fib -i ${TOPDIR}/precompiled/fib.bin | sed -e "s/unsigned char/const unsigned char/" > fib.h + @echo "const unsigned char fib[] = {" > fib.h + @cat ${TOPDIR}/precompiled/fib.bin | xxd -i >> fib.h + @echo "};\nunsigned int fib_len = " >> fib.h + @wc -c ${TOPDIR}/precompiled/fib.bin | awk '{print $$1}' >> fib.h + @echo ";" >> fib.h gcc -Wall -DUVM32_ERROR_STRINGS -DUVM32_MEMORY_SIZE=16386 -I${TOPDIR}/uvm32 -I${TOPDIR}/common -o host-parallel ${TOPDIR}/uvm32/uvm32.c host-parallel.c clean: diff --git a/hosts/host-parallel/fib.h b/hosts/host-parallel/fib.h index 86d6a85..0681605 100644 --- a/hosts/host-parallel/fib.h +++ b/hosts/host-parallel/fib.h @@ -40,4 +40,6 @@ const unsigned char fib[] = { 0x29, 0x20, 0x6c, 0x6f, 0x6f, 0x70, 0x00, 0x00, 0x66, 0x69, 0x62, 0x28, 0x29, 0x20, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x00 }; -unsigned int fib_len = 480; +unsigned int fib_len = +480 +; diff --git a/precompiled/self.bin b/precompiled/self.bin index d25ca78..585953a 100755 Binary files a/precompiled/self.bin and b/precompiled/self.bin differ