-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (33 loc) · 1 KB
/
Makefile
File metadata and controls
40 lines (33 loc) · 1 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
PREFIX ?= /usr/local
BINDIR := $(PREFIX)/bin
XSESSIONS := /usr/share/xsessions
USER_CONFIG := $(HOME)/.config/doWM
build:
go build -o doWM
@echo "Built successfully!"
install:
# Install binary locally
mkdir -p $(BINDIR)
sudo install -m755 doWM $(BINDIR)/doWM
# Install .desktop session file
mkdir -p $(XSESSIONS)
sudo install -m644 doWM.desktop $(XSESSIONS)/doWM.desktop
@echo "Installed successfully!"
config:
@echo "Setting up doWM user config..."
mkdir -p $(USER_CONFIG)
@if [ ! -f $(USER_CONFIG)/autostart.sh ]; then \
cp exampleConfig/autostart.sh $(USER_CONFIG)/autostart.sh && \
chmod +x $(USER_CONFIG)/autostart.sh && \
echo "Installed example autostart.sh"; \
else \
echo "autostart.sh already exists, skipping..."; \
fi
@if [ ! -f $(USER_CONFIG)/doWM.yml ]; then \
cp exampleConfig/doWM.yml $(USER_CONFIG)/doWM.yml && \
echo "Installed example doWM.yml"; \
else \
echo "doWM.yml already exists, skipping..."; \
fi
@echo "Config setup complete!"
.PHONY: all install uninstall