about summary refs log tree commit diff
path: root/qemu_mode/hooking_bridge/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'qemu_mode/hooking_bridge/Makefile')
-rw-r--r--qemu_mode/hooking_bridge/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/qemu_mode/hooking_bridge/Makefile b/qemu_mode/hooking_bridge/Makefile
new file mode 100644
index 00000000..dcc6f12a
--- /dev/null
+++ b/qemu_mode/hooking_bridge/Makefile
@@ -0,0 +1,18 @@
+.PHONY: clean
+
+all: plugin
+SRC=./src
+BLD=./build
+INC=-I./inc -I../qemuafl/include -I$(GLIB_H) -I$(GLIB_CONFIG_H)
+# CC=gcc
+
+$(BLD)/patching.o:$(SRC)/patching.c
+	$(CC) -c -fPIC $(INC) -o $(BLD)/patching.o $(SRC)/patching.c
+	
+plugin:$(SRC)/main.c $(BLD)/patching.o
+	$(CC) -c -fPIC $(INC) -o $(BLD)/plugin.o $(SRC)/main.c
+	$(CC) -shared -o $(BLD)/plugin.so $(BLD)/plugin.o $(BLD)/patching.o
+
+clean:
+	rm -rf $(BLD)/*.o
+	rm -rf $(BLD)/*.so
\ No newline at end of file