aboutsummaryrefslogtreecommitdiff
path: root/works/life/computer-organization-experiment/Makefile
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-02-12 15:55:21 +0800
committerYuqian Yang <crupest@crupest.life>2025-02-12 15:55:21 +0800
commit10eb95869601e145b1d8bc909424777c25752d51 (patch)
tree49449a4076ded9bd937a51679318edbe2a532cae /works/life/computer-organization-experiment/Makefile
parent29ba3e88b1a7425fe00af0005b8a8228103aa21c (diff)
parentf8c10dd1fc55e60f35286475356e48c4f642eb63 (diff)
downloadcrupest-10eb95869601e145b1d8bc909424777c25752d51.tar.gz
crupest-10eb95869601e145b1d8bc909424777c25752d51.tar.bz2
crupest-10eb95869601e145b1d8bc909424777c25752d51.zip
import(life): IMPORT crupest/life COMPLETE.
Diffstat (limited to 'works/life/computer-organization-experiment/Makefile')
-rw-r--r--works/life/computer-organization-experiment/Makefile51
1 files changed, 51 insertions, 0 deletions
diff --git a/works/life/computer-organization-experiment/Makefile b/works/life/computer-organization-experiment/Makefile
new file mode 100644
index 0000000..0b4db7f
--- /dev/null
+++ b/works/life/computer-organization-experiment/Makefile
@@ -0,0 +1,51 @@
+build/cpu_test_bench: build/cpu.o
+ ghdl elaborate -g --std=08 --workdir=build -fsynopsys -o build/cpu_test_bench cpu_test_bench
+
+build/cpu.o: build cpu.vhdl
+ ghdl analyze -g --std=08 --workdir=build -fsynopsys cpu.vhdl
+
+all: build/test_bench
+
+build:
+ mkdir -p build
+
+build/adder_1.o: build adder_1.vhdl
+ ghdl analyze --std=08 --workdir=build -fsynopsys adder_1.vhdl
+
+build/adder_8.o: build adder_8.vhdl
+ ghdl analyze --std=08 --workdir=build -fsynopsys adder_8.vhdl
+
+build/adder_32.o: build adder_32.vhdl
+ ghdl analyze --std=08 --workdir=build -fsynopsys adder_32.vhdl
+
+build/alu.o: build alu.vhdl
+ ghdl analyze --std=08 --workdir=build -fsynopsys alu.vhdl
+
+build/counter_4.o: build counter_4.vhdl
+ ghdl analyze --std=08 --workdir=build -fsynopsys counter_4.vhdl
+
+build/full_adder_1.o: build full_adder_1.vhdl
+ ghdl analyze --std=08 --workdir=build -fsynopsys full_adder_1.vhdl
+
+build/multiplexer_1_2.o: build multiplexer_1_2.vhdl
+ ghdl analyze --std=08 --workdir=build -fsynopsys multiplexer_1_2.vhdl
+
+build/multiplexer_8_2.o: build multiplexer_8_2.vhdl
+ ghdl analyze --std=08 --workdir=build -fsynopsys multiplexer_8_2.vhdl
+
+build/multiplexer_32_2.o: build multiplexer_32_2.vhdl
+ ghdl analyze --std=08 --workdir=build -fsynopsys multiplexer_32_2.vhdl
+
+build/shift_32.o: build shift_32.vhdl
+ ghdl analyze --std=08 --workdir=build -fsynopsys shift_32.vhdl
+
+build/test_bench.o: build test_bench.vhdl build/counter_4.o build/full_adder_1.o build/multiplexer_1_2.o build/multiplexer_8_2.o build/multiplexer_32_2.o build/adder_1.o build/adder_8.o build/adder_32.o build/shift_32.o build/alu.o
+ ghdl analyze --std=08 --workdir=build -fsynopsys test_bench.vhdl
+
+build/test_bench: build/test_bench.o
+ ghdl elaborate --std=08 --workdir=build -fsynopsys -o build/test_bench test_bench
+
+.PHONY: all clean
+
+clean:
+ rm -r build