Skip to content

Commit

Permalink
edit make files to allow so json not automatically created, gts can b…
Browse files Browse the repository at this point in the history
…e created and removed separately
  • Loading branch information
l-kent committed Feb 20, 2024
1 parent 5477e6d commit 5068242
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/test/make/lift-directories.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ BASIL_FLAGS ?=
#BOOGIE_FLAGS=/proverOpt:O:smt.array.extensional=false
BOOGIE_FLAGS ?= /useArrayAxioms

LIFT_ARTEFACTS=$(NAME).adt $(NAME).bir $(NAME).relf $(NAME).gts $(NAME).json
LIFT_ARTEFACTS=$(NAME).adt $(NAME).bir $(NAME).relf $(NAME).gts

ENABLED_COMPILERS ?= clang clang_O2 clang_pic clang_no_plt_no_pic gcc gcc_O2 gcc_no_plt_no_pic gcc_pic

TARGETS := all verify clean cleanall cleanlift recompile json
TARGETS := all verify clean cleanall cleanlift cleanjson cleangts cleantest recompile json gts
.PHONY : $(TARGETS) $(ENABLED_COMPILERS)

$(TARGETS): $(ENABLED_COMPILERS)
Expand Down
19 changes: 14 additions & 5 deletions src/test/make/lift.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ $(LIFT_ARTEFACTS): a.out
$(BAP) a.out -d adt:$(NAME).adt -d bir:$(NAME).bir
ddisasm a.out --ir $(NAME).gtirb
gtirb-semantics-nix $(NAME).gtirb $(NAME).gts
debug-gts.py $(NAME).gts > $(NAME).json

ifdef $(SPEC)
BASIL_SPECARG = --spec $(SPEC)
Expand All @@ -28,11 +27,16 @@ $(BASIL):
a.out: $(C_SOURCE)
$(CC) $(CFLAGS) $(C_SOURCE)

.PHONY=recompile verify clean cleanlift cleanall cleanbin json
.PHONY=recompile verify clean cleanlift cleanall cleanbin cleantest cleangts json gts
verify: $(NAME)_bap.bpl $(NAME)_gtirb.bpl

recompile: a.out

gts: a.out
ddisasm a.out --ir $(NAME).gtirb
gtirb-semantics-nix $(NAME).gtirb $(NAME).gts
rm -rf $(NAME).gtirb

json:
debug-gts.py $(NAME).gts > $(NAME).json

Expand All @@ -42,7 +46,7 @@ $(NAME)bap_result.txt: $(NAME)_bap.bpl $(EXTRA_SPEC)
$(NAME)gtirb_result.txt: $(NAME)_gtirb.bpl $(EXTRA_SPEC)
bash -c "time boogie $(NAME)_gtirb.bpl $(EXTRA_SPEC) $(BOOGIE_FLAGS) | tee $(NAME)_result.txt"

cleanall: clean cleanlift cleanbin cleantest
cleanall: clean cleanlift cleanbin cleantest cleanjson

cleantest:
rm -rf $(NAME).bpl
Expand All @@ -56,11 +60,16 @@ cleanbin:
rm -rf a.out
rm -rf $(NAME).gtirb

clean: cleanlift cleanbin
clean: cleanlift cleanbin cleanjson

cleanjson:
rm -rf $(NAME).json

cleanlift:
rm -rf $(NAME).adt
rm -rf $(NAME).bir
rm -rf $(NAME).relf
rm -rf $(NAME).json
rm -rf $(NAME).gts

cleangts:
rm -rf $(NAME).gts

0 comments on commit 5068242

Please sign in to comment.