mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 19:52:31 +00:00 
			
		
		
		
	Use pkg-config for linking tcl-tk
Both MacPorts and Homebrew have a pkg-config file for TCL. So lets use it.
This commit is contained in:
		
							parent
							
								
									9eca3671ab
								
							
						
					
					
						commit
						422ffd5c06
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		
							
								
								
									
										8
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -71,6 +71,7 @@ CXXFLAGS += -I$(BREW_PREFIX)/readline/include | |||
| LDFLAGS += -L$(BREW_PREFIX)/readline/lib | ||||
| 
 | ||||
| PKG_CONFIG_PATH := $(BREW_PREFIX)/libffi/lib/pkgconfig:$(PKG_CONFIG_PATH) | ||||
| PKG_CONFIG_PATH := $(BREW_PREFIX)/tcl-tk/lib/pkgconfig:$(PKG_CONFIG_PATH) | ||||
| 
 | ||||
| export PATH := $(BREW_PREFIX)/bison/bin:$(BREW_PREFIX)/gettext/bin:$(BREW_PREFIX)/flex/bin:$(PATH) | ||||
| 
 | ||||
|  | @ -225,15 +226,16 @@ endif | |||
| endif | ||||
| 
 | ||||
| ifeq ($(ENABLE_PLUGINS),1) | ||||
| CXXFLAGS += -DYOSYS_ENABLE_PLUGINS $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --silence-errors --cflags libffi) | ||||
| CXXFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --silence-errors --cflags libffi) -DYOSYS_ENABLE_PLUGINS | ||||
| LDLIBS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --silence-errors --libs libffi || echo -lffi) -ldl | ||||
| endif | ||||
| 
 | ||||
| ifeq ($(ENABLE_TCL),1) | ||||
| TCL_VERSION ?= tcl$(shell bash -c "tclsh <(echo 'puts [info tclversion]')") | ||||
| TCL_INCLUDE ?= /usr/include/$(TCL_VERSION) | ||||
| CXXFLAGS += -I$(TCL_INCLUDE) -DYOSYS_ENABLE_TCL | ||||
| LDLIBS += -l$(TCL_VERSION) | ||||
| 
 | ||||
| CXXFLAGS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --silence-errors --cflags tcl || echo -I$(TCL_INCLUDE)) -DYOSYS_ENABLE_TCL | ||||
| LDLIBS += $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --silence-errors --libs tcl || echo -l$(TCL_VERSION)) | ||||
| endif | ||||
| 
 | ||||
| ifeq ($(ENABLE_GPROF),1) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue