From 2eb36c5f07b46a809e3441e441a71637a9e06c98 Mon Sep 17 00:00:00 2001 From: astoria-d Date: Fri, 30 Aug 2013 11:43:51 +0900 Subject: [PATCH] removed unneccesary target in Makefile to speed up make time. renamed dev directory to apu --- simulation/Makefile | 9 ++++++--- simulation/{dev => apu}/Makefile | 7 ++++--- simulation/{dev => apu}/apu.vhd | 0 simulation/{dev => apu}/testbench_apu.vhd | 0 simulation/cpu/Makefile | 8 +++++--- simulation/mem/Makefile | 7 ++++--- simulation/ppu/Makefile | 8 +++++--- 7 files changed, 24 insertions(+), 15 deletions(-) rename simulation/{dev => apu}/Makefile (81%) rename simulation/{dev => apu}/apu.vhd (100%) rename simulation/{dev => apu}/testbench_apu.vhd (100%) diff --git a/simulation/Makefile b/simulation/Makefile index 78b1446..567ea29 100644 --- a/simulation/Makefile +++ b/simulation/Makefile @@ -1,4 +1,4 @@ -DIRS=clock mem ppu dev cpu +DIRS=clock mem ppu apu cpu MODULES=address_decoder.vhd motones_sim.vhd WORKDIR=work TEST_MODULE = testbench_motones_sim.vhd @@ -25,9 +25,12 @@ $(BIN): $(DIRS) $(OBJS) clean: -rm $(OBJS) -rm $(BIN) - -rm $(patsubst $(WORKDIR)/,$(WORKDIR)/e~, $(OBJS)) - -rm *.o *.cf *.vcd + -rm $(subst .vhd,,$(WORKDIR)/e~$(TEST_MODULE)).o + -rm testbench.vcd* rclean: clean + for dir in $(DIRS); do \ + make -C $(ROOT_DIR)/$$dir clean; \ + done -rm $(WORKDIR)/* diff --git a/simulation/dev/Makefile b/simulation/apu/Makefile similarity index 81% rename from simulation/dev/Makefile rename to simulation/apu/Makefile index 27d2802..4403646 100644 --- a/simulation/dev/Makefile +++ b/simulation/apu/Makefile @@ -13,7 +13,8 @@ BIN=$(subst .vhd,, $(TEST_MODULE)) OBJS = $(addprefix $(WORKDIR)/,$(addsuffix .o,$(basename $(MODULES) $(TEST_MODULE)))) -all: $(BIN) +all: $(OBJS) +test: $(BIN) $(WORKDIR)/%.o: %.vhd ghdl -a $(GHDL_OPTION) $(subst .o,.vhd, $(subst $(WORKDIR)/,, $@)) @@ -24,6 +25,6 @@ $(BIN): $(OBJS) clean: -rm $(OBJS) -rm $(BIN) - -rm $(patsubst $(WORKDIR)/,$(WORKDIR)/e~, $(OBJS)) - -rm *.o *.cf testbench.vcd* + -rm $(subst .vhd,,$(WORKDIR)/e~$(TEST_MODULE)).o + -rm testbench.vcd* diff --git a/simulation/dev/apu.vhd b/simulation/apu/apu.vhd similarity index 100% rename from simulation/dev/apu.vhd rename to simulation/apu/apu.vhd diff --git a/simulation/dev/testbench_apu.vhd b/simulation/apu/testbench_apu.vhd similarity index 100% rename from simulation/dev/testbench_apu.vhd rename to simulation/apu/testbench_apu.vhd diff --git a/simulation/cpu/Makefile b/simulation/cpu/Makefile index 549706e..902beea 100644 --- a/simulation/cpu/Makefile +++ b/simulation/cpu/Makefile @@ -14,7 +14,9 @@ BIN=$(subst .vhd,, $(TEST_MODULE)) OBJS = $(addprefix $(WORKDIR)/,$(addsuffix .o,$(basename $(MODULES) $(TEST_MODULE)))) -all: $(BIN) +all: $(OBJS) + +test: $(BIN) $(WORKDIR)/%.o: %.vhd ghdl -a $(GHDL_OPTION) $(subst .o,.vhd, $(subst $(WORKDIR)/,, $@)) @@ -25,6 +27,6 @@ $(BIN): $(OBJS) clean: -rm $(OBJS) -rm $(BIN) - -rm $(patsubst $(WORKDIR)/,$(WORKDIR)/e~, $(OBJS)) - -rm *.o *.cf *.vcd + -rm $(subst .vhd,,$(WORKDIR)/e~$(TEST_MODULE)).o + -rm testbench.vcd* diff --git a/simulation/mem/Makefile b/simulation/mem/Makefile index 98e49d2..b3a9c79 100644 --- a/simulation/mem/Makefile +++ b/simulation/mem/Makefile @@ -12,7 +12,8 @@ BIN=$(subst .vhd,, $(TEST_MODULE)) OBJS = $(addprefix $(WORKDIR)/,$(addsuffix .o,$(basename $(MODULES) $(TEST_MODULE)))) -all: $(BIN) +all: $(OBJS) +test: $(BIN) $(WORKDIR)/%.o: %.vhd ghdl -a $(GHDL_OPTION) $(subst .o,.vhd, $(subst $(WORKDIR)/,, $@)) @@ -23,6 +24,6 @@ $(BIN): $(OBJS) clean: -rm $(OBJS) -rm $(BIN) - -rm $(patsubst $(WORKDIR)/,$(WORKDIR)/e~, $(OBJS)) - -rm *.o *.cf *.vcd + -rm $(subst .vhd,,$(WORKDIR)/e~$(TEST_MODULE)).o + -rm testbench.vcd* diff --git a/simulation/ppu/Makefile b/simulation/ppu/Makefile index 513784b..c9909ee 100644 --- a/simulation/ppu/Makefile +++ b/simulation/ppu/Makefile @@ -13,7 +13,9 @@ BIN=$(subst .vhd,, $(TEST_MODULE)) OBJS = $(addprefix $(WORKDIR)/,$(addsuffix .o,$(basename $(MODULES) $(TEST_MODULE)))) -all: $(BIN) +all: $(OBJS) + +test: $(BIN) $(WORKDIR)/%.o: %.vhd ghdl -a $(GHDL_OPTION) $(subst .o,.vhd, $(subst $(WORKDIR)/,, $@)) @@ -24,6 +26,6 @@ $(BIN): $(OBJS) clean: -rm $(OBJS) -rm $(BIN) - -rm $(patsubst $(WORKDIR)/,$(WORKDIR)/e~, $(OBJS)) - -rm *.o *.cf testbench.vcd* + -rm $(subst .vhd,,$(WORKDIR)/e~$(TEST_MODULE)).o + -rm testbench.vcd* -- 2.11.0