From 17b676e9b6decf3aaf3816454f66c1870ba0208f Mon Sep 17 00:00:00 2001 From: Jeremiah Orians Date: Sat, 27 May 2017 12:36:05 -0400 Subject: [PATCH] Upgraded make all to actually build everything including the roms --- makefile | 55 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/makefile b/makefile index 4f510df..286f1d6 100644 --- a/makefile +++ b/makefile @@ -18,11 +18,11 @@ VPATH = bin:roms # Collections of tools -all: libvm vm +all: libvm.so vm ALL-ROMS -production: libvm-production.so vm-production asm dis +production: libvm-production.so vm-production asm dis ALL-ROMS -development: vm libvm.so asm dis +development: vm libvm.so asm dis ALL-ROMS # VM Builds vm-minimal: vm.h vm_minimal.c vm_instructions.c vm_decode.c | bin @@ -37,12 +37,41 @@ vm-production: vm.h vm.c vm_instructions.c vm_decode.c | bin vm-trace: vm.h vm.c vm_instructions.c vm_decode.c tty.c dynamic_execution_trace.c | bin gcc -ggdb -Dtty_lib=true -DTRACE=true vm.h vm.c vm_instructions.c vm_decode.c tty.c dynamic_execution_trace.c -o bin/vm -# libVM Builds for Development tools -libvm.so: wrapper.c vm_instructions.c vm_decode.c vm.h tty.c - gcc -ggdb -Dtty_lib=true -shared -Wl,-soname,libvm.so -o libvm.so -fPIC wrapper.c vm_instructions.c vm_decode.c vm.h tty.c +# Build the roms +ALL-ROMS: stage0_monitor stage1_assembler-0 SET stage1_assembler-1 stage1_assembler-2 M0 CAT lisp forth -libvm-production.so: wrapper.c vm_instructions.c vm_decode.c vm.h - gcc -shared -Wl,-soname,libvm.so -o libvm-production.so -fPIC wrapper.c vm_instructions.c vm_decode.c vm.h +stage0_monitor: hex stage0/stage0_monitor.hex0 | roms + ./bin/hex < stage0/stage0_monitor.hex0 > roms/stage0_monitor + +stage1_assembler-0: hex stage1/stage1_assembler-0.hex0 | roms + ./bin/hex < stage1/stage1_assembler-0.hex0 > roms/stage1_assembler-0 + +SET: stage1_assembler-0 vm stage1/SET.hex0 | roms + ./bin/vm --rom roms/stage1_assembler-0 --tape_01 stage1/SET.hex0 --tape_02 roms/SET + +stage1_assembler-1: stage1_assembler-0 vm stage1/stage1_assembler-1.hex0 | roms + ./bin/vm --rom roms/stage1_assembler-0 --tape_01 stage1/stage1_assembler-1.hex0 --tape_02 roms/stage1_assembler-1 + +stage1_assembler-2: stage1_assembler-1 vm stage1/stage1_assembler-2.hex1 | roms + ./bin/vm --rom roms/stage1_assembler-1 --tape_01 stage1/stage1_assembler-2.hex1 --tape_02 roms/stage1_assembler-2 + +M0: stage1_assembler-2 vm stage1/M0-macro.hex2 | roms + ./bin/vm --rom roms/stage1_assembler-2 --tape_01 stage1/M0-macro.hex2 --tape_02 roms/M0 --memory 48K + +CAT: M0 stage1_assembler-2 vm High_level_prototypes/defs stage1/CAT.s | roms + cat High_level_prototypes/defs stage1/CAT.s >| temp + ./bin/vm --rom roms/M0 --tape_01 temp --tape_02 temp2 --memory 48K + ./bin/vm --rom roms/stage1_assembler-2 --tape_01 temp2 --tape_02 roms/CAT --memory 48K + +lisp: M0 stage1_assembler-2 vm High_level_prototypes/defs stage2/lisp.s | roms + cat High_level_prototypes/defs stage2/lisp.s > temp + ./bin/vm --rom roms/M0 --tape_01 temp --tape_02 temp2 --memory 256K + ./bin/vm --rom roms/stage1_assembler-2 --tape_01 temp2 --tape_02 roms/lisp --memory 48K + +forth: M0 stage1_assembler-2 vm High_level_prototypes/defs stage2/forth.s | roms + cat High_level_prototypes/defs stage2/forth.s > temp + ./bin/vm --rom roms/M0 --tape_01 temp --tape_02 temp2 --memory 128K + ./bin/vm --rom roms/stage1_assembler-2 --tape_01 temp2 --tape_02 roms/forth --memory 48K # Primitive development tools, not required but it was handy asm: High_level_prototypes/asm.c | bin @@ -51,6 +80,16 @@ asm: High_level_prototypes/asm.c | bin dis: High_level_prototypes/disasm.c | bin gcc -ggdb High_level_prototypes/disasm.c -o bin/dis +hex: Linux\ Bootstrap/hex.c | bin + gcc Linux\ Bootstrap/hex.c -o bin/hex + +# libVM Builds for Development tools +libvm.so: wrapper.c vm_instructions.c vm_decode.c vm.h tty.c + gcc -ggdb -Dtty_lib=true -shared -Wl,-soname,libvm.so -o libvm.so -fPIC wrapper.c vm_instructions.c vm_decode.c vm.h tty.c + +libvm-production.so: wrapper.c vm_instructions.c vm_decode.c vm.h + gcc -shared -Wl,-soname,libvm.so -o libvm-production.so -fPIC wrapper.c vm_instructions.c vm_decode.c vm.h + # Clean up after ourselves .PHONY: clean clean: