-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
69 lines (54 loc) · 2.05 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
58
59
60
61
62
63
64
65
66
67
68
69
SCHEDULER_PATH := $(shell pwd)
PYTHON_VER := 3.11
.PHONY: all scheduler facial manual movement controller chatbot
all: venv
make -j 4 scheduler facial movement controller
scheduler: venv
venv/bin/python scheduler.py
FACIAL_BIN := ../c1c0-facial-recognition/venv/bin
FACIAL_DIR := ../c1c0-facial-recognition
FACIAL_EXC := facial_comm.py
FACIAL_PRV := clients/facial.py
facial:
cd $(FACIAL_DIR) && $(FACIAL_BIN)/python $(FACIAL_EXC) $(SCHEDULER_PATH)
MANUAL_BIN := $(SCHEDULER_PATH)/venv/bin
MANUAL_DIR := temp
MANUAL_EXC := manual_comm.py
MANUAL_PRV := clients/manual.py
manual:
cd $(MANUAL_DIR) && $(MANUAL_BIN)/python $(MANUAL_EXC) $(SCHEDULER_PATH)
MVMENT_BIN := $(SCHEDULER_PATH)/venv/bin
MVMENT_DIR := ../c1c0-movement/c1c0-movement/Locomotion
MVMENT_EXC := movement_comm.py
MVMENT_PRV := clients/movement.py
movement:
cd $(MVMENT_DIR) && $(MVMENT_BIN)/python $(MVMENT_EXC) $(SCHEDULER_PATH)
CONTRL_BIN := $(SCHEDULER_PATH)/venv/bin
CONTRL_DIR := temp
CONTRL_EXC := controller_comm.py
CONTRL_PRV := clients/controller.py
controller:
cd $(CONTRL_DIR) && $(CONTRL_BIN)/python $(CONTRL_EXC) $(SCHEDULER_PATH)
CHATBT_BIN := ../c1c0-chatbot/venv/bin
CHATBT_DIR := ../c1c0-chatbot
CHATBT_EXC := chatbot_comm.py
CHATBT_PRV := clients/chatbot.py
chatbot:
cd $(CHATBT_DIR) && $(CHATBT_BIN)/python $(CHATBT_EXC) $(SCHEDULER_PATH)
build: venv
mkdir -p $(FACIAL_DIR) && cp $(FACIAL_PRV) $(FACIAL_DIR)/$(FACIAL_EXC)
mkdir -p $(MANUAL_DIR) && cp $(MANUAL_PRV) $(MANUAL_DIR)/$(MANUAL_EXC)
mkdir -p $(MVMENT_DIR) && cp $(MVMENT_PRV) $(MVMENT_DIR)/$(MVMENT_EXC)
mkdir -p $(CONTRL_DIR) && cp $(CONTRL_PRV) $(CONTRL_DIR)/$(CONTRL_EXC)
mkdir -p $(CHATBT_DIR) && cp $(CHATBT_PRV) $(CHATBT_DIR)/$(CHATBT_EXC)
clean:
rm -f $(FACIAL_DIR)/$(FACIAL_EXC)
rm -f $(MANUAL_DIR)/$(MANUAL_EXC)
rm -f $(MVMENT_DIR)/$(MVMENT_EXC)
rm -f $(CONTRL_DIR)/$(CONTRL_EXC)
rm -f $(CHATBT_DIR)/$(CHATBT_EXC)
sudo rm -rf */__pycache__/ temp/
venv:
python$(PYTHON_VER) -m venv --system-site-packages venv/
venv/bin/pip install --upgrade pip setuptools wheel
venv/bin/pip install -r requirements.txt