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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…