diff options
author | Josuah Demangeon <me@josuah.net> | 2022-07-16 00:47:00 +0200 |
---|---|---|
committer | Josuah Demangeon <me@josuah.net> | 2022-07-18 21:58:16 +0200 |
commit | 58fddf61ccd4715150f1dba40e62eac650ef9ee3 (patch) | |
tree | 417bda7938aeb18fbe8f352c9e127b01c31bc45f | |
parent | 6eba56fcf0c8f5e7bddfdf2d71fd157c71876ae8 (diff) | |
download | yosys-58fddf61ccd4715150f1dba40e62eac650ef9ee3.tar.gz yosys-58fddf61ccd4715150f1dba40e62eac650ef9ee3.tar.bz2 yosys-58fddf61ccd4715150f1dba40e62eac650ef9ee3.zip |
reduce the Makefile TCL compatibility code
-rw-r--r-- | Makefile | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -450,9 +450,12 @@ endif ifeq ($(ENABLE_TCL),1) TCL_VERSION ?= tcl$(shell bash -c "tclsh <(echo 'puts [info tclversion]')") ifeq ($(OS), $(filter $(OS),FreeBSD OpenBSD NetBSD)) +# BSDs usually use tcl8.6, but the lib is named "libtcl86" TCL_INCLUDE ?= /usr/local/include/$(TCL_VERSION) +TCL_LIBS ?= -l$(subst .,,$(TCL_VERSION)) else TCL_INCLUDE ?= /usr/include/$(TCL_VERSION) +TCL_LIBS ?= -l$(TCL_VERSION) endif ifeq ($(CONFIG),mxe) @@ -460,12 +463,7 @@ CXXFLAGS += -DYOSYS_ENABLE_TCL LDLIBS += -ltcl86 -lwsock32 -lws2_32 -lnetapi32 -lz -luserenv else CXXFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --silence-errors --cflags tcl || echo -I$(TCL_INCLUDE)) -DYOSYS_ENABLE_TCL -ifeq ($(OS), $(filter $(OS),FreeBSD OpenBSD NetBSD)) -# BSDs usually use tcl8.6, but the lib is named "libtcl86" -LDLIBS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --silence-errors --libs tcl || echo -l$(TCL_VERSION) | tr -d '.') -else -LDLIBS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --silence-errors --libs tcl || echo -l$(TCL_VERSION)) -endif +LDLIBS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --silence-errors --libs tcl || echo $(TCL_LIBS)) endif endif |