summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruint23 <[email protected]>2025-04-21 21:54:01 +0100
committerGitHub <[email protected]>2025-04-21 21:54:01 +0100
commitd0cd172229f74bca62dc8acf06b44493a1c3771e (patch)
tree7759fd1b117ab7e535729c5de8b40922583b35b2
parent81c9b0e554b303f41b33f48288f6b0b19890bdc4 (diff)
parent3f5e0fb8dc1532cebdb4341d0f9d987c8d700bc4 (diff)
Merge pull request #2 from elbachir-one/main
-rw-r--r--Makefile24
-rw-r--r--README.md24
2 files changed, 22 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index 5a727b5..8dfeea8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,18 @@
-CC ?= gcc
-CFLAGS ?= -std=c99 -Wall -Wextra -O3 -Isrc
-LDFLAGS ?= -lX11 -lXinerama
+CC ?= gcc
+CFLAGS ?= -std=c99 -Wall -Wextra -O3 -Isrc
+LDFLAGS ?= -lX11 -lXinerama
-PREFIX ?= /usr/local
-BIN ?= sxwm
-SRC_DIR := src
-OBJ_DIR := build
-SRC := $(wildcard $(SRC_DIR)/*.c)
-OBJ := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRC))
+PREFIX ?= /usr/local
+BIN := sxwm
+SRC_DIR := src
+OBJ_DIR := build
+SRC := $(wildcard $(SRC_DIR)/*.c)
+OBJ := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRC))
all: $(BIN)
$(BIN): $(OBJ)
- $(CC) -o $@ $^ $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR)
$(CC) $(CFLAGS) -c -o $@ $<
@@ -34,6 +34,4 @@ uninstall:
@rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
@echo "Uninstallation complete."
-clean-install: clean install
-
-.PHONY: all clean install uninstall clean-install
+.PHONY: all clean install uninstall
diff --git a/README.md b/README.md
index 345dcda..efde03a 100644
--- a/README.md
+++ b/README.md
@@ -108,7 +108,7 @@ Below are the available `make` targets for streamlining common tasks:
| `make clean` | Remove object files (`*.o`) and build artifacts. |
| `make install` | Install `sxwm` to `$(PREFIX)/bin` (default `/usr/local/bin`). |
| `make uninstall` | Remove the installed binary from `$(PREFIX)/bin`. |
-| `make clean-install` | Runs `make clean` then `make install`. |
+| `make clean install` | Runs `make clean` then `make install`. |
> You can override the install directory by specifying `PREFIX` or `DESTDIR`, for example:
> ```sh
@@ -119,29 +119,27 @@ Below are the available `make` targets for streamlining common tasks:
## Installation
-1. **Clone repository**
+### Arch linux - AUR
```bash
- git clone https://github.com/uint23/sxwm.git
- cd sxwm
+ yay -S sxwm
```
-2. **Build**
+### Build from source
+
+1. **Clone repository**
```bash
+ git clone --depth=1 https://github.com/uint23/sxwm.git
+ cd sxwm/
make
+ sudo make clean install
```
-3. **Install**
+2. **Run**
+ Add `sxwm` to `~/.xinitrc`:
```bash
- sudo make clean-install
- ```
-
-4. **Run**
-
- Add to `~/.xinitrc`:
- ```sh
exec sxwm
```