2021-07-03 15:29:13 +02:00
|
|
|
CC=g++ -O2
|
2021-07-09 09:39:59 +02:00
|
|
|
LFLAGS=-lfinal -lkeystone -lstdc++ -lm -lcapstone -lunicorn -lz
|
2021-07-08 12:06:23 +02:00
|
|
|
OPTIONS=-std=c++17
|
2021-07-15 23:29:31 +02:00
|
|
|
DOCKER=docker run --name maker --rm -v $$(pwd):/data maker
|
|
|
|
START=./start.sh
|
2021-07-03 15:29:13 +02:00
|
|
|
|
2021-07-15 23:29:31 +02:00
|
|
|
all: dockerfile files copy run
|
2021-07-03 15:29:13 +02:00
|
|
|
|
2021-07-08 12:06:23 +02:00
|
|
|
clean: dockerclean
|
|
|
|
|
2021-07-13 19:29:49 +02:00
|
|
|
clear:
|
|
|
|
clear
|
|
|
|
|
2021-07-08 12:06:23 +02:00
|
|
|
dockerclean:
|
|
|
|
(docker rmi $$(docker images | grep "^<none>" | awk '{print $$3}') --force;true)
|
2021-07-13 19:29:49 +02:00
|
|
|
(docker rmi maker;true)
|
2021-07-08 12:06:23 +02:00
|
|
|
docker image ls
|
|
|
|
|
2021-07-03 15:29:13 +02:00
|
|
|
dockerfile:
|
|
|
|
docker build . -t maker
|
|
|
|
|
2021-07-13 19:29:49 +02:00
|
|
|
dockerfile_force: dockerclean dockerfile
|
|
|
|
|
2021-07-06 01:09:46 +02:00
|
|
|
files: ./ia86
|
2021-07-03 15:29:13 +02:00
|
|
|
|
2021-07-06 01:09:46 +02:00
|
|
|
ia86: ./ia86.cpp
|
2021-07-08 12:06:23 +02:00
|
|
|
$(DOCKER) $(CC) $(OPTIONS) -o $@ $^ $(LFLAGS)
|
2021-07-03 15:29:13 +02:00
|
|
|
|
2021-07-13 19:29:49 +02:00
|
|
|
rerun:
|
2021-07-15 23:29:31 +02:00
|
|
|
$(START)
|
2021-07-03 15:29:13 +02:00
|
|
|
|
2021-07-13 19:29:49 +02:00
|
|
|
run: clear delete files rerun
|
2021-07-03 15:29:13 +02:00
|
|
|
|
2021-07-05 10:22:48 +02:00
|
|
|
stop:
|
|
|
|
docker stop maker
|
|
|
|
|
2021-07-03 15:29:13 +02:00
|
|
|
delete:
|
2021-07-06 01:09:46 +02:00
|
|
|
rm -rf ./ia86
|
2021-07-15 23:29:31 +02:00
|
|
|
|
2021-07-16 08:59:20 +02:00
|
|
|
copy: libcapstone.so.4 libunicorn.so.1 libfinal.so.0.7.2 libkeystone.so.0 libc.musl-x86_64.so.1 libstdc++.so.6.0.28 libz.so.1.2.11 libgcc_s.so.1
|
2021-07-15 23:29:31 +02:00
|
|
|
|
|
|
|
libcapstone.so.4:
|
|
|
|
${DOCKER} cp /usr/lib/libcapstone.so.4 /data/libcapstone.so.4
|
|
|
|
|
|
|
|
libunicorn.so.1:
|
|
|
|
${DOCKER} cp /usr/lib/libunicorn.so.1 /data/libunicorn.so.1
|
|
|
|
|
|
|
|
libfinal.so.0.7.2:
|
|
|
|
${DOCKER} cp /usr/lib/libfinal.so.0.7.2 /data/libfinal.so.0.7.2
|
|
|
|
ln -s ./libfinal.so.0.7.2 ./libfinal.so.0
|
|
|
|
|
|
|
|
libkeystone.so.0:
|
|
|
|
${DOCKER} cp /usr/lib64/libkeystone.so.0 /data/libkeystone.so.0
|
|
|
|
|
|
|
|
libc.musl-x86_64.so.1:
|
|
|
|
${DOCKER} cp /lib/libc.musl-x86_64.so.1 /data/libc.musl-x86_64.so.1
|
2021-07-16 08:59:20 +02:00
|
|
|
|
|
|
|
libz.so.1.2.11:
|
|
|
|
${DOCKER} cp /lib/libz.so.1.2.11 /data/libz.so.1.2.11
|
|
|
|
ln -s ./libz.so.1.2.11 ./libz.so.1
|
|
|
|
|
|
|
|
libstdc++.so.6.0.28:
|
|
|
|
${DOCKER} cp /usr/lib/libstdc++.so.6.0.28 /data/libstdc++.so.6.0.28
|
|
|
|
ln -s ./libstdc++.so.6.0.28 ./libstdc++.so.6
|
|
|
|
|
|
|
|
libgcc_s.so.1:
|
|
|
|
${DOCKER} cp /usr/lib/libgcc_s.so.1 /data/libgcc_s.so.1
|
|
|
|
|