Skip to content

Commit

Permalink
fixmakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
ailrst committed Sep 16, 2024
1 parent 9abd740 commit 84389f7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions examples/csmith/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ CHECKSUMS=$(addsuffix .checksum,$(SOURCENAMES))

CSMITH_HEADER = "/nix/store/6rawnpny818v7wki6zlr3i0f3phmysyb-csmith-2.3.0/include/csmith-2.3.0/"

%.out : $(SOURCES)
%.out : %.c
aarch64-suse-linux-gcc $< -w -I $(CSMITH_HEADER) -o $@


%.relf : $(OUTS)
readelf -s -r -w $< > $@
%.relf : %.out
aarch64-suse-linux-readelf -s -r -W $< > $@

%.adt: $(OUTS)
bap $< -d adt:$@ -d bir:$@
%.adt: %.out
bap $< -d adt:$@

%.checksum : $(SOURCES)
%.checksum : %.c
clang -w -I $(CSMITH_HEADER) $< -o $<.out && ./$<.out || true

default : $(ADTS) $(RELFS)
Expand All @@ -27,3 +27,6 @@ default : $(ADTS) $(RELFS)
.PHONY=checksum
checksum: $(CHECKSUMS)

clean:
rm -f *.out *.relf *.adt *.bir *.checksum

0 comments on commit 84389f7

Please sign in to comment.