diff --git a/.gitignore b/.gitignore index ec905b5..a88abf1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ bin/ tmp/ +__pycache__/ +libvm.so +tape_* +z_disassembled + diff --git a/makefile b/makefile new file mode 100644 index 0000000..916e193 --- /dev/null +++ b/makefile @@ -0,0 +1,18 @@ +all: libvm vm + +libvm: wrapper.c vm_instructions.c vm_decode.c vm.h + gcc -ggdb -shared -Wl,-soname,libvm.so -o libvm.so -fPIC wrapper.c vm_instructions.c vm_decode.c vm.h + +vm: vm.h vm.c vm_instructions.c vm_decode.c + gcc -ggdb vm.h vm.c vm_instructions.c vm_decode.c -o bin/vm + +clean: + rm libvm.so bin/vm + +production: libvm-production vm-production + +libvm-production: wrapper.c vm_instructions.c vm_decode.c vm.h + gcc -shared -Wl,-soname,libvm.so -o libvm.so -fPIC wrapper.c vm_instructions.c vm_decode.c vm.h + +vm-production: vm.h vm.c vm_instructions.c vm_decode.c + gcc vm.h vm.c vm_instructions.c vm_decode.c -o vm