diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-01-23 14:10:26 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-01-23 14:10:26 +0100 |
commit | da6ad20dba07ecb49b33323e9e3bf667786645b3 (patch) | |
tree | 81b188bf62e9446d39b1d00741b0f8cdc2e0aa8e /icetime | |
parent | b1475b9c07db01acbc2894ea6023366c2b738f7f (diff) | |
download | icestorm-da6ad20dba07ecb49b33323e9e3bf667786645b3.tar.gz icestorm-da6ad20dba07ecb49b33323e9e3bf667786645b3.tar.bz2 icestorm-da6ad20dba07ecb49b33323e9e3bf667786645b3.zip |
Improved icetime PREFIX handling
Diffstat (limited to 'icetime')
-rw-r--r-- | icetime/Makefile | 2 | ||||
-rw-r--r-- | icetime/icetime.cc | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/icetime/Makefile b/icetime/Makefile index de3b44b..9f8d047 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 -DPREFIX=$(PREFIX) +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 e9bfc55..086da8f 100644 --- a/icetime/icetime.cc +++ b/icetime/icetime.cc @@ -31,9 +31,6 @@ // 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; @@ -268,7 +265,7 @@ void read_config() void read_chipdb() { char buffer[1024]; - snprintf(buffer, 1024, TOSTRING(PREFIX) "/share/icebox/chipdb-%s.txt", config_device.c_str()); + snprintf(buffer, 1024, PREFIX "/share/icebox/chipdb-%s.txt", config_device.c_str()); FILE *fdb = fopen(buffer, "r"); if (fdb == nullptr) { |