-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 898 Bytes
/
Makefile
File metadata and controls
37 lines (29 loc) · 898 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
# === Compiler & Flags ===
CXX = g++
CXXFLAGS = -std=c++17 -Wall -Iinclude
# === Projektdateien ===
SRCS = src/main.cpp src/ui.cpp src/geo.cpp
TARGET = geofetch
# === Installationsverzeichnis (User-local!) ===
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
# === Default-Ziel: compile + build ===
all: $(TARGET)
$(TARGET): $(SRCS)
$(CXX) $(CXXFLAGS) $(SRCS) -o $(TARGET)
# === Installiere das Executable nach ~/.local/bin ===
install: geofetch
sudo cp geofetch $(BINDIR)/
sudo chmod +x $(BINDIR)/geofetch
@echo "✅ Installed to $(BINDIR)/geofetch"
# === Entferne das Executable aus ~/.local/bin ===
uninstall:
@rm -f $(BINDIR)/$(TARGET)
@echo "🗑️ Uninstalled from $(BINDIR)"
# === Lösche erzeugte Binaries im Projektverzeichnis ===
clean:
@rm -f $(TARGET)
@echo "🧹 Cleaned build artifacts"
# === Optional: direkt ausführen (z. B. für dev) ===
run: $(TARGET)
./$(TARGET)