mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Makefile adjustments to match top make
Hopefully matches enough that any `make docs` call will work from the yosys being built, while still being overridable locally.
This commit is contained in:
		
							parent
							
								
									8203a01ba9
								
							
						
					
					
						commit
						9fcf353734
					
				
					 5 changed files with 24 additions and 10 deletions
				
			
		|  | @ -1,4 +1,6 @@ | |||
| YOSYS = ../../../yosys | ||||
| PROGRAM_PREFIX := | ||||
| 
 | ||||
| YOSYS ?= ../../../$(PROGRAM_PREFIX)yosys | ||||
| 
 | ||||
| all: select.pdf red_or3x1.pdf sym_mul.pdf mymul.pdf mulshift.pdf addshift.pdf \ | ||||
| 		macc_simple_xmap.pdf macc_xilinx_xmap.pdf | ||||
|  |  | |||
|  | @ -1,4 +1,6 @@ | |||
| YOSYS = ../../../yosys | ||||
| PROGRAM_PREFIX := | ||||
| 
 | ||||
| YOSYS ?= ../../../$(PROGRAM_PREFIX)yosys | ||||
| 
 | ||||
| all: scrambler_p01.pdf scrambler_p02.pdf equiv.log axis_test.log | ||||
| 
 | ||||
|  |  | |||
|  | @ -5,11 +5,15 @@ TARGETS += memory_01 memory_02 | |||
| TARGETS += techmap_01 | ||||
| TARGETS += abc_01 | ||||
| 
 | ||||
| PROGRAM_PREFIX := | ||||
| 
 | ||||
| YOSYS ?= ../../../$(PROGRAM_PREFIX)yosys | ||||
| 
 | ||||
| all: $(addsuffix .pdf,$(TARGETS)) | ||||
| 
 | ||||
| define make_pdf_template | ||||
| $(1).pdf: $(1)*.v $(1)*.ys | ||||
| 	../../../yosys -p 'script $(1).ys; show -notitle -prefix $(1) -format pdf' | ||||
| 	$(YOSYS) -p 'script $(1).ys; show -notitle -prefix $(1) -format pdf' | ||||
| endef | ||||
| 
 | ||||
| $(foreach trg,$(TARGETS),$(eval $(call make_pdf_template,$(trg)))) | ||||
|  |  | |||
|  | @ -1,8 +1,11 @@ | |||
| PROGRAM_PREFIX := | ||||
| 
 | ||||
| YOSYS ?= ../../../$(PROGRAM_PREFIX)yosys | ||||
| 
 | ||||
| all: counter_00.dot counter_01.dot counter_02.dot counter_03.dot | ||||
| 
 | ||||
| counter_00.dot: counter.v counter.ys mycells.lib | ||||
| 	../../../yosys counter_outputs.ys | ||||
| 	$(YOSYS) counter_outputs.ys | ||||
| 
 | ||||
| counter_01.dot: counter_00.dot | ||||
| counter_02.dot: counter_00.dot | ||||
|  |  | |||
|  | @ -1,21 +1,24 @@ | |||
| PROGRAM_PREFIX := | ||||
| 
 | ||||
| YOSYS ?= ../../../$(PROGRAM_PREFIX)yosys | ||||
| 
 | ||||
| all: test0.log test1.log test2.log | ||||
| 
 | ||||
| CXXFLAGS=$(shell ../../yosys-config --cxxflags) | ||||
| DATDIR=$(shell ../../yosys-config --datdir) | ||||
| CXXFLAGS=$(shell $(YOSYS)-config --cxxflags) | ||||
| DATDIR=$(shell $(YOSYS)-config --datdir) | ||||
| 
 | ||||
| my_cmd.so: my_cmd.cc | ||||
| 	../../yosys-config --exec --cxx $(subst $(DATDIR),../../share,$(CXXFLAGS)) --ldflags -o my_cmd.so -shared my_cmd.cc --ldlibs | ||||
| 	$(YOSYS)-config --exec --cxx $(subst $(DATDIR),../../share,$(CXXFLAGS)) --ldflags -o my_cmd.so -shared my_cmd.cc --ldlibs | ||||
| 
 | ||||
| test0.log: my_cmd.so | ||||
| 	../../yosys -Ql test0.log_new -m ./my_cmd.so -p 'my_cmd foo bar' absval_ref.v | ||||
| 	$(YOSYS) -Ql test0.log_new -m ./my_cmd.so -p 'my_cmd foo bar' absval_ref.v | ||||
| 	mv test0.log_new test0.log | ||||
| 
 | ||||
| test1.log: my_cmd.so | ||||
| 	../../yosys -Ql test1.log_new -m ./my_cmd.so -p 'clean; test1; dump' absval_ref.v | ||||
| 	$(YOSYS) -Ql test1.log_new -m ./my_cmd.so -p 'clean; test1; dump' absval_ref.v | ||||
| 	mv test1.log_new test1.log | ||||
| 
 | ||||
| test2.log: my_cmd.so | ||||
| 	../../yosys -Ql test2.log_new -m ./my_cmd.so -p 'hierarchy -top test; test2' sigmap_test.v | ||||
| 	$(YOSYS) -Ql test2.log_new -m ./my_cmd.so -p 'hierarchy -top test; test2' sigmap_test.v | ||||
| 	mv test2.log_new test2.log | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue