-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
57 lines (48 loc) · 1.58 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.PHONY: binary objdump mcsema Initrand Rand Try Doit Queens main
ifndef BIN_OPT
BIN_OPT=O0
INDIR=binary/
else
ifeq (${BIN_OPT},O0)
INDIR=binary/
else
INDIR=binary_${BIN_OPT}/
endif
endif
all: binary objdump mcsema Initrand Rand Try Doit Queens main
compd: Initrand Rand Try Doit Queens main
compd_opt: Initrand Rand Try Doit Queens main
match: Initrand Rand Try Doit Queens main
binary:
mkdir -p ${INDIR}
/usr/bin/clang-6.0 -${BIN_OPT} -lm -lpthread src/test.ll -o ${INDIR}test
reloc_binary:
/usr/bin/clang-6.0 -Wl,-emit-relocs -${BIN_OPT} -lm -lpthread src/test.ll -o ${INDIR}test.reloc
objdump:
objdump -d ${INDIR}test > ${INDIR}/test.objdump
mcsema:
#mcsema-disass --disassembler ${HOME}/ida-6.95/idal64 --os linux --arch amd64_avx --output ${INDIR}test.mcsema.cfg --binary ${INDIR}/test --entrypoint main
#mcsema-lift-4.0 --os linux --arch amd64_avx --cfg ${INDIR}test.mcsema.cfg --output ${INDIR}test.mcsema.bc -disable_dead_store_elimination -disable_optimizer
#llvm-dis ${INDIR}test.mcsema.bc -o ${INDIR}test.mcsema.ll
../../../scripts/remove_definitions.pl --file ${INDIR}test.mcsema.ll --out ${INDIR}test.mcsema.calls_renamed.ll
opt -S -inline ${INDIR}test.mcsema.calls_renamed.ll -o ${INDIR}test.mcsema.inline.ll
Initrand:
@echo
${MAKE} -C Initrand $(MAKECMDGOALS)
Rand:
@echo
${MAKE} -C Rand $(MAKECMDGOALS)
Try:
@echo
${MAKE} -C Try $(MAKECMDGOALS)
Doit:
@echo
${MAKE} -C Doit $(MAKECMDGOALS)
Queens:
@echo
${MAKE} -C Queens $(MAKECMDGOALS)
main:
@echo
${MAKE} -C main $(MAKECMDGOALS)
clean:
rm ${INDIR}test ${INDIR}test.mcsema.* ${INDIR}test.objdump