This PR refactors how uarch related files are generated to make it able to cross compiling for WASM and Windows again.
Now when you type make uarch-with-linux-env it will build the following files:
uarch/uarch-rom.bin
uarch/uarch-pristine-hash.c
uarch/uarch-pristine-ram.c
This will be built inside the uarch Docker. Then when you do make -C src only the files uarch/uarch-pristine-hash.c and uarch/uarch-pristine-ram.c will be used from the uarch directory.
For the ones wanting to compile without Docker, downloading those two files should be enough.
Notice that if any source code in the emulator interpreter is changed, to make sure uarch-pristine-ram.c is correct, you have to explicit build it again by removing it or invoking make uarch-with-linux-env, because make timestamp dependency tree is not propagated from src to uarch directory, this is intentional to allow cross compiling.
This PR refactors how uarch related files are generated to make it able to cross compiling for WASM and Windows again.
Now when you type
make uarch-with-linux-env
it will build the following files:uarch/uarch-rom.bin
uarch/uarch-pristine-hash.c
uarch/uarch-pristine-ram.c
This will be built inside the uarch Docker. Then when you do
make -C src
only the filesuarch/uarch-pristine-hash.c
anduarch/uarch-pristine-ram.c
will be used from theuarch
directory. For the ones wanting to compile without Docker, downloading those two files should be enough.Notice that if any source code in the emulator interpreter is changed, to make sure
uarch-pristine-ram.c
is correct, you have to explicit build it again by removing it or invokingmake uarch-with-linux-env
, because make timestamp dependency tree is not propagated fromsrc
touarch
directory, this is intentional to allow cross compiling.Extra
This PR also refactor a little the
make install
, this target was split in multiple targets, to make easy to package more personalized packages, it is used in the wiki page https://github.com/cartesi/machine-emulator/wiki/Compiling-and-running-in-WASM