-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (33 loc) · 1.07 KB
/
Copy pathMakefile
File metadata and controls
40 lines (33 loc) · 1.07 KB
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
# --- Configuration ---
CC = gcc
CFLAGS = -Wall -Wextra -O3 -I./protocol
LDFLAGS = -pthread
# Dossiers
SRV_DIR = relay-node
BNCH_DIR = benchmarks
BUILD_DIR = build
# Cibles
all: prepare server benchmark
# 1. Création du dossier de build
prepare:
@mkdir -p $(BUILD_DIR)
# 2. Compilation du Serveur Relay
# Note : Ajoute -lcuda -lnvidia-ml si tu compiles avec le support GPU réel
server: prepare
$(CC) $(CFLAGS) $(SRV_DIR)/*.c -o $(BUILD_DIR)/vram_relay_node $(LDFLAGS)
@echo "✅ Serveur compilé dans $(BUILD_DIR)/vram_relay_node"
# 3. Compilation des outils de Benchmark
benchmark: prepare
$(CC) $(CFLAGS) $(BNCH_DIR)/latency_test.c -o $(BUILD_DIR)/latency_test $(LDFLAGS)
@echo "✅ Benchmark compilé dans $(BUILD_DIR)/latency_test"
# 4. Nettoyage
clean:
rm -rf $(BUILD_DIR)
@echo "🧹 Dossier build nettoyé"
# 5. Aide
help:
@echo "Usage:"
@echo " make all : Compile le serveur et les tests"
@echo " make server : Compile uniquement le serveur"
@echo " make benchmark : Compile l'outil de latence"
@echo " make clean : Supprime les fichiers compilés"