diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-01-23 14:08:12 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-01-23 14:08:12 +0100 |
commit | 7ef4cdc3c2e46ee882bb9cf758e8029564182ed2 (patch) | |
tree | 43b7bb13bd67ddc33638426e8c7637805d276399 | |
parent | 7a1e662a3f676f408f79127459be95b37e959f47 (diff) | |
parent | f22f94619cad9db5757320f731becf0a988998d6 (diff) | |
download | icestorm-7ef4cdc3c2e46ee882bb9cf758e8029564182ed2.tar.gz icestorm-7ef4cdc3c2e46ee882bb9cf758e8029564182ed2.tar.bz2 icestorm-7ef4cdc3c2e46ee882bb9cf758e8029564182ed2.zip |
Merge pull request #25 from SebastianBoe/chipdb_path_issue
icetime: fixed chipdb path issue for Arch Linux
-rw-r--r-- | icetime/Makefile | 2 | ||||
-rw-r--r-- | icetime/icetime.cc | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/icetime/Makefile b/icetime/Makefile index d2daee3..de3b44b 100644 --- a/icetime/Makefile +++ b/icetime/Makefile @@ -1,6 +1,6 @@ include ../config.mk LDLIBS = -lm -lstdc++ -CXXFLAGS = -MD -O0 -ggdb -Wall -std=c++11 -I/usr/local/include +CXXFLAGS = -MD -O0 -ggdb -Wall -std=c++11 -I/usr/local/include -DPREFIX=$(PREFIX) all: icetime diff --git a/icetime/icetime.cc b/icetime/icetime.cc index 0676a8b..e9bfc55 100644 --- a/icetime/icetime.cc +++ b/icetime/icetime.cc @@ -31,6 +31,9 @@ // add this number of ns as estimate for clock distribution mismatch #define GLOBAL_CLK_DIST_JITTER 0.1 +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) + FILE *fin = nullptr, *fout = nullptr, *frpt = nullptr; bool verbose = false; bool max_span_hack = false; @@ -265,7 +268,7 @@ void read_config() void read_chipdb() { char buffer[1024]; - snprintf(buffer, 1024, "/usr/local/share/icebox/chipdb-%s.txt", config_device.c_str()); + snprintf(buffer, 1024, TOSTRING(PREFIX) "/share/icebox/chipdb-%s.txt", config_device.c_str()); FILE *fdb = fopen(buffer, "r"); if (fdb == nullptr) { |