-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (40 loc) · 1.18 KB
/
Makefile
File metadata and controls
48 lines (40 loc) · 1.18 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
# pacPrism Makefile
# Simple build system for Linux
CMAKE = cmake
CMAKE_BUILD_DIR = build
.PHONY: all clean release debug install deps
all: release
deps:
@echo "Installing dependencies..."
@sudo apt update
@sudo apt install -y \
build-essential \
cmake \
g++ \
libboost-dev \
libssl-dev \
nlohmann-json3-dev \
libcxxopts-dev
release:
@echo "Building pacPrism (Release)..."
@mkdir -p $(CMAKE_BUILD_DIR)
@cd $(CMAKE_BUILD_DIR) && $(CMAKE) -DCMAKE_BUILD_TYPE=Release ..
@$(CMAKE) --build $(CMAKE_BUILD_DIR) --parallel
@echo "Build complete. Binary: $(CMAKE_BUILD_DIR)/bin/pacprism"
debug:
@echo "Building pacPrism (Debug)..."
@mkdir -p $(CMAKE_BUILD_DIR)
@cd $(CMAKE_BUILD_DIR) && $(CMAKE) -DCMAKE_BUILD_TYPE=Debug ..
@$(CMAKE) --build $(CMAKE_BUILD_DIR) --parallel
@echo "Build complete. Binary: $(CMAKE_BUILD_DIR)/bin/pacprism"
clean:
@echo "Cleaning build directory..."
@rm -rf $(CMAKE_BUILD_DIR)
@echo "Clean complete."
install: release
@echo "Installing pacPrism..."
@mkdir -p $(DESTDIR)/usr/bin
@mkdir -p $(DESTDIR)/etc/pacprism
@cp $(CMAKE_BUILD_DIR)/bin/pacprism $(DESTDIR)/usr/bin/
@cp config/pacprism.conf $(DESTDIR)/etc/pacprism/
@echo "Install complete."