mirror of https://github.com/YosysHQ/yosys.git
Add ENABLE_GLOB Makefile switch
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
ff4c2a14ae
commit
d9bb5f3637
5
Makefile
5
Makefile
|
@ -10,6 +10,7 @@ CONFIG := clang
|
||||||
# features (the more the better)
|
# features (the more the better)
|
||||||
ENABLE_TCL := 1
|
ENABLE_TCL := 1
|
||||||
ENABLE_ABC := 1
|
ENABLE_ABC := 1
|
||||||
|
ENABLE_GLOB := 1
|
||||||
ENABLE_PLUGINS := 1
|
ENABLE_PLUGINS := 1
|
||||||
ENABLE_READLINE := 1
|
ENABLE_READLINE := 1
|
||||||
ENABLE_EDITLINE := 0
|
ENABLE_EDITLINE := 0
|
||||||
|
@ -298,6 +299,10 @@ LDLIBS += -ldl
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_GLOB),1)
|
||||||
|
CXXFLAGS += -DYOSYS_ENABLE_GLOB
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ENABLE_TCL),1)
|
ifeq ($(ENABLE_TCL),1)
|
||||||
TCL_VERSION ?= tcl$(shell bash -c "tclsh <(echo 'puts [info tclversion]')")
|
TCL_VERSION ?= tcl$(shell bash -c "tclsh <(echo 'puts [info tclversion]')")
|
||||||
ifeq ($(OS), FreeBSD)
|
ifeq ($(OS), FreeBSD)
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
# include <dlfcn.h>
|
# include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32)
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
|
@ -41,13 +41,15 @@
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# include <dirent.h>
|
# include <dirent.h>
|
||||||
# include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
# include <glob.h>
|
|
||||||
#else
|
#else
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# include <dirent.h>
|
# include <dirent.h>
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
# include <sys/wait.h>
|
# include <sys/wait.h>
|
||||||
# include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(_WIN32) && defined(YOSYS_ENABLE_GLOB)
|
||||||
# include <glob.h>
|
# include <glob.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -564,7 +566,7 @@ std::vector<std::string> glob_filename(const std::string &filename_pattern)
|
||||||
{
|
{
|
||||||
std::vector<std::string> results;
|
std::vector<std::string> results;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) || !defined(YOSYS_ENABLE_GLOB)
|
||||||
results.push_back(filename_pattern);
|
results.push_back(filename_pattern);
|
||||||
#else
|
#else
|
||||||
glob_t globbuf;
|
glob_t globbuf;
|
||||||
|
|
Loading…
Reference in New Issue