From c1c13f3b3e14a392fbfbb63add2d55aa642f6018 Mon Sep 17 00:00:00 2001 From: Nathan Rossi Date: Mon, 3 Sep 2018 22:50:03 +1000 Subject: icetime: Add support for searching for chipdb relative to binary Like yosys and arachne-pnr, allow for searching for the desired chipdb file relative to the executing binaries directory. This allows for portable builds of icetime without needing to specify the exact path to the needed chipdb file with the -C arg. In order to support this icetime must be able to get the "proc_self_dirname" path just like yosys and arachne-pnr. As such copy the equivalent code to get this path information. To avoid cluttering the icetime.cc file with this code, place it in a separate iceutil.cc file. Signed-off-by: Nathan Rossi --- icetime/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'icetime/Makefile') diff --git a/icetime/Makefile b/icetime/Makefile index d260681..b1cd18d 100644 --- a/icetime/Makefile +++ b/icetime/Makefile @@ -26,10 +26,11 @@ share/$(CHIPDB_SUBDIR)/chipdb-5k.txt: ../icebox/chipdb-5k.txt override LDFLAGS += --embed-file share endif -icetime$(EXE): icetime.o +icetime$(EXE): icetime.o iceutil.o $(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS) icetime.o: icetime.cc timings.inc +iceutil.o: iceutil.cc timings.inc: timings.py ../icefuzz/timings_*.txt python3 timings.py > timings.inc.new -- cgit v1.2.3