This repository has been archived by the owner on Nov 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile
42 lines (32 loc) · 1.39 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
CXX=g++
CXXFLAGS=-std=c++2a -I./includes/ -I/usr/local/include/opencv4/ -I./sdk/ -L./libs -l:vmm.so -l:leechcore.so -l:leechcore_device_microvmi.so -L/usr/local/lib -l:libopencv_core.so -l:libopencv_dnn.so -Wno-multichar
LIBS=-lm -Wl,--no-as-needed -ldl -lpthread
OUTDIR=./build
OBJDIR=$(OUTDIR)/obj
$(shell mkdir -p $(OBJDIR))
$(shell cp libs/leechcore.so /usr/lib/)
$(shell cp libs/vmm.so /usr/lib/)
$(shell cp libs/libmicrovmi.so /usr/lib/)
$(shell cp libs/leechcore_device_microvmi.so /usr/lib/)
$(shell cp libs/libmemflow_qemu.x86_64.so $(OUTDIR)/)
%.o: %.cpp
$(CXX) -c -o $(OBJDIR)/$@ $< $(CXXFLAGS)
Memory.o: ./sdk/Memory.cpp
$(CXX) -c -o $(OBJDIR)/Memory.o ./sdk/Memory.cpp $(CXXFLAGS)
InputManager.o: ./sdk/InputManager.cpp
$(CXX) -c -o $(OBJDIR)/InputManager.o ./sdk/InputManager.cpp $(CXXFLAGS)
EasyWSClient.o: ./includes/easywsclient.cpp
$(CXX) -c -o $(OBJDIR)/EasyWSClient.o ./includes/easywsclient.cpp $(CXXFLAGS)
cs_dma: cs_dma.o game.o Memory.o InputManager.o EasyWSClient.o
$(CXX) -o $(OUTDIR)/$@ $(OBJDIR)/cs_dma.o $(OBJDIR)/game.o $(OBJDIR)/Memory.o $(OBJDIR)/InputManager.o $(OBJDIR)/EasyWSClient.o $(CXXFLAGS) $(LIBS)
rm -rf ./build/obj/
.PHONY: all
all: cs_dma
.DEFAULT_GOAL := all
clean:
rm -rf ./build/cs_dma
rm -rf /usr/lib/vmm.so
rm -rf /usr/lib/leechcore.so
rm -rf /usr/lib/leechcore_device_microvmi.so
rm -rf /usr/lib/libmicrovmi.so
rm -rf ./build/libmemflow_qemu.x86_64.so