Simulation setup improvements:
[c4m-jtag.git] / sim / cocotb / controller / Makefile
index 336d7e55acbf600d1ddcd2adfdebcbb1baba8b65..708e50d930958d19da3546a612c1c88f2c537806 100644 (file)
@@ -1,5 +1,6 @@
-COCOTB=$(HOME)/eda/code/cocotb
-VHDLDIR=$(HOME)/eda/code/c4m_jtag/rtl/vhdl
+PWD=$(realpath .)
+TOPDIR=$(realpath ../../..)
+VHDLDIR=$(TOPDIR)/rtl/vhdl
 VHDL_SOURCES = \
   $(VHDLDIR)/c4m_jtag_pkg.vhdl \
   $(VHDLDIR)/c4m_jtag_tap_fsm.vhdl \
 VHDL_SOURCES = \
   $(VHDLDIR)/c4m_jtag_pkg.vhdl \
   $(VHDLDIR)/c4m_jtag_tap_fsm.vhdl \
@@ -15,5 +16,7 @@ SIM=ghdl
 GPI_IMPL=vhpi
 SIM_ARGS=--wave=test.ghw
 
 GPI_IMPL=vhpi
 SIM_ARGS=--wave=test.ghw
 
-include $(COCOTB)/makefiles/Makefile.inc
-include $(COCOTB)/makefiles/Makefile.sim
+COCOTBDIR=$(shell cocotb-path)
+
+include $(COCOTBDIR)/makefiles/Makefile.inc
+include $(COCOTBDIR)/makefiles/Makefile.sim