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,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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue