-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (33 loc) · 911 Bytes
/
Copy pathMakefile
File metadata and controls
45 lines (33 loc) · 911 Bytes
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
ifeq ($(OS),Windows_NT)
CLEAR = cls
else
CLEAR = clear
endif
CLIENT_ARGS = -p testtest123415 -k ./resources/privada.pem
DB_PATH = ./internal/storage/sqlite.db
help:
@echo "Comandos disponibles:"
@echo " sv - Lanza el servidor"
@echo " c1 - Cliente user1"
@echo " c2 - Cliente user2"
@echo " c3 - Cliente user3"
@echo " c4 - Cliente user4"
@echo " dbreset - vacia base de datos"
@echo " vclean - limpia consola"
.PHONY: vserver vc1 vc2 vc3 vc4 clear
# --- COMANDOS ---
sv:
go run . server
c1:
go run . client -u user1 $(CLIENT_ARGS)
c2:
go run . client -u user2 $(CLIENT_ARGS)
c3:
go run . client -u user3 $(CLIENT_ARGS)
c4:
go run . client -u user4 $(CLIENT_ARGS)
vclean:
$(CLEAR)
dbreset:
sqlite3 $(DB_PATH) "DELETE FROM users; DELETE FROM rooms; DELETE FROM participants;"
@echo " Base de datos limpiada (users, rooms, participants)."