Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

create directory in Makefile and start Bambu function, HELP ME PLEASE

this is my code in Makefile...and I want to get such a performer as a result:

In dir /sha256/:

make dir /bambu

after in dir /bambu/:

run this commandline:

/opt/panda/bin/bambu ../src/sha-256.c --top-fname=calc_sha_256 --generate-vcd --simulate --simulator=VERILATOR

DIR_TARGET=sha256/
    HBDIR=/bambu
    HDIR=$(subst /, /, $(dir $HBDIR))
    MDIR=../src/
    BDIR=/opt/panda/bin/
    
    _BNAME=bambu
    _MNAME=sha-256.c
    FNAME=calc_sha_256
    SIM=verilator
    
    R="="
    MD=mkdir
    
    TOPFNAME=$($(R),$(FNAME))
    SIMULATOR=$($(R),$(SIM))
    
    CFLAGS = -Wall -Wextra -Wpedantic
    CCFLAGS = -I$(MDIR)
    BFLAGS = --top-fname$(TOPFNAME) --generate-vcd --simulate --simulator$(SIMULATOR)
    
    BNAME = $(patsubst %, $(BDIR)/%,$(_BNAME))
    MNAME = $(patsubst %, $(MDIR)/%,$(_MNAME))
    
    
    .PHONY: all
    all: test
        ./test
    
    test: test.o sha-256.o
    
    $(DIR_TARGET): $(MD) -p $(HDIR) $(BNAME) $(MNAME) $(BFLAGS)
    
    .PHONY: clean
    clean:
        rm test *.o
question from:https://stackoverflow.com/questions/65906074/create-directory-in-makefile-and-start-bambu-function-help-me-please

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...