mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
xxd -n (set variable name) doesn't exist on all systems, use shell utilities to build the headers
Fixes #1
This commit is contained in:
parent
bee38ce935
commit
1c9e9296be
7 changed files with 24 additions and 6 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue