diff --git a/src/test/Makefile b/src/test/Makefile index 77710cd3c..e5de7bf72 100644 --- a/src/test/Makefile +++ b/src/test/Makefile @@ -1,11 +1,11 @@ -TARGETSS := all verify clean cleanall cleanlift recompile json cleanjson cleangts gts +TARGETSS := all verify clean cleanall cleanlift recompile json cleanjson cleangts gts reliftgts SUBTARGETS = $(wildcard correct/*/ incorrect/*/ correct_analyse/*/) .PHONY : $(TARGETSS) $(SUBTARGETS) correct incorrect $(TARGETSS): $(SUBTARGETS) -correct: $(realpath $(wildcard correct/*)) +correct: $(realpath $(wildcard correct/*)) $(realpath $(wildcard correct_analyse/*)) incorrect: $(realpath $(wildcard incorrect/*)) $(SUBTARGETS): diff --git a/src/test/make/lift-directories.mk b/src/test/make/lift-directories.mk index 2e9788df5..b26daec50 100644 --- a/src/test/make/lift-directories.mk +++ b/src/test/make/lift-directories.mk @@ -10,6 +10,7 @@ GIT_ROOT?=$(realpath ../../../../) GCC ?= aarch64-linux-gnu-gcc CLANG ?= clang-15 -target $(TARGET) +GTIRB_SEMANTICS ?= gtirb_semantics CC ?= $(GCC) #CFLAGS=-fno-pic -fno-plt TARGET=aarch64-linux-gnu @@ -29,7 +30,7 @@ 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 cleanjson cleangts cleantest recompile json gts +TARGETS := all verify clean cleanall cleanlift cleanjson cleangts cleantest recompile json gts reliftgts .PHONY : $(TARGETS) $(ENABLED_COMPILERS) $(TARGETS): $(ENABLED_COMPILERS) diff --git a/src/test/make/lift.mk b/src/test/make/lift.mk index 7c9ab52d3..0cf42a08b 100644 --- a/src/test/make/lift.mk +++ b/src/test/make/lift.mk @@ -5,7 +5,7 @@ $(LIFT_ARTEFACTS): a.out $(READELF) -s -r -W a.out > $(NAME).relf $(BAP) a.out -d adt:$(NAME).adt -d bir:$(NAME).bir ddisasm a.out --ir $(NAME).gtirb - gtirb-semantics $(NAME).gtirb $(NAME).gts + $(GTIRB_SEMANTICS) $(NAME).gtirb $(NAME).gts ifdef $(SPEC) BASIL_SPECARG = --spec $(SPEC) @@ -27,15 +27,18 @@ $(BASIL): a.out: $(C_SOURCE) $(CC) $(CFLAGS) $(C_SOURCE) -.PHONY=recompile verify clean cleanlift cleanall cleanbin cleantest cleangts json gts +.PHONY=recompile verify clean cleanlift cleanall cleanbin cleantest cleangts json gts reliftgts verify: $(NAME)_bap.bpl $(NAME)_gtirb.bpl recompile: a.out +reliftgts: + $(GTIRB_SEMANTICS) $(NAME).gts $(NAME)-2.gts + mv $(NAME)-2.gts $(NAME).gts + gts: a.out ddisasm a.out --ir $(NAME).gtirb gtirb-semantics $(NAME).gtirb $(NAME).gts - rm -rf $(NAME).gtirb json: debug-gts.py $(NAME).gts > $(NAME).json @@ -72,4 +75,4 @@ cleanlift: rm -rf $(NAME).gts cleangts: - rm -rf $(NAME).gts \ No newline at end of file + rm -rf $(NAME).gts