Merge branch 'master' of github.com:cliffordwolf/icestorm

This commit is contained in:
Clifford Wolf 2016-01-23 14:08:23 +01:00
commit b1475b9c07
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
include ../config.mk include ../config.mk
LDLIBS = -lm -lstdc++ 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 all: icetime

View File

@ -31,6 +31,9 @@
// add this number of ns as estimate for clock distribution mismatch // add this number of ns as estimate for clock distribution mismatch
#define GLOBAL_CLK_DIST_JITTER 0.1 #define GLOBAL_CLK_DIST_JITTER 0.1
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
FILE *fin = nullptr, *fout = nullptr, *frpt = nullptr; FILE *fin = nullptr, *fout = nullptr, *frpt = nullptr;
bool verbose = false; bool verbose = false;
bool max_span_hack = false; bool max_span_hack = false;
@ -265,7 +268,7 @@ void read_config()
void read_chipdb() void read_chipdb()
{ {
char buffer[1024]; 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"); FILE *fdb = fopen(buffer, "r");
if (fdb == nullptr) { if (fdb == nullptr) {