-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
94 lines (79 loc) · 2.15 KB
/
Makefile
File metadata and controls
94 lines (79 loc) · 2.15 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
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# ===========================================
# Simple Makefile wrapper around CMake build
# ===========================================
# Build directories
BUILD_DIR := build
BIN_DIR := $(BUILD_DIR)/bin
LIB_DIR := $(BUILD_DIR)/lib
# -------------------------------------------
# Default target: configure & build
# -------------------------------------------
.PHONY: all
all:
@echo "🔧 Configuring and building with CMake..."
@cmake -S . -B $(BUILD_DIR)
@cmake --build $(BUILD_DIR) --parallel
# -------------------------------------------
# Run examples / demos
# -------------------------------------------
.PHONY: run-socket
run-socket:
@$(BIN_DIR)/socket_example
.PHONY: run-logging
run-logging:
@$(BIN_DIR)/logging_example
.PHONY: run-thread
run-thread:
@$(BIN_DIR)/thread_example
.PHONY: run-mem-pool
run-mem-pool:
@$(BIN_DIR)/mem_pool_example
.PHONY: run-lf-queue
run-lf-queue:
@$(BIN_DIR)/lf_queue_example
.PHONY: chat-server
chat-server:
@echo "🚀 Starting Chat Server..."
@$(BIN_DIR)/chat_server
.PHONY: chat-client
chat-client:
@echo "💬 Starting Chat Client..."
@$(BIN_DIR)/chat_client
.PHONY: mcast-publisher
mcast-publisher:
@echo "📡 Starting Multicast Publisher..."
@$(BIN_DIR)/mcast_publisher
.PHONY: mcast-subscriber
mcast-subscriber:
@echo "📻 Starting Multicast Subscriber..."
@$(BIN_DIR)/mcast_subscriber
# -------------------------------------------
# Clean / Rebuild targets
# -------------------------------------------
.PHONY: clean
clean:
@echo "🧹 Cleaning build directory..."
@rm -rf $(BUILD_DIR)
.PHONY: rebuild
rebuild: clean all
# -------------------------------------------
# Install targets (optional)
# -------------------------------------------
.PHONY: install
install:
@cmake --install $(BUILD_DIR)
# -------------------------------------------
# Utility shortcuts
# -------------------------------------------
.PHONY: list
list:
@echo "Available run targets:"
@echo " make run-socket"
@echo " make run-logging"
@echo " make run-thread"
@echo " make run-mem-pool"
@echo " make run-lf-queue"
@echo " make chat-server"
@echo " make chat-client"
@echo " make mcast-publisher"
@echo " make mcast-subscriber"