From 8b4ac08b77a84cc4d5dcdfcc2898c020394fd8a4 Mon Sep 17 00:00:00 2001 From: elbachir-one Date: Mon, 21 Apr 2025 20:04:41 +0100 Subject: Updated README.md to include the AUR and corrected the installation instructions --- README.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 345dcda..593fb0f 100644 --- a/README.md +++ b/README.md @@ -119,28 +119,26 @@ 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 ``` - -2. **Build** - - ```bash - make + yay -S sxwm ``` -3. **Install** +### Build from source + +1. **Clone repository** ```bash + git clone --depth=1 https://github.com/uint23/sxwm.git + cd sxwm/ + make sudo make clean-install ``` -4. **Run** +2. **Run** - Add to `~/.xinitrc`: + Add `sxwm` to `~/.xinitrc`: ```sh exec sxwm ``` -- cgit v1.2.3 From 3f5e0fb8dc1532cebdb4341d0f9d987c8d700bc4 Mon Sep 17 00:00:00 2001 From: elbachir-one Date: Mon, 21 Apr 2025 20:15:27 +0100 Subject: Fixed the Makefile also updated the README.md --- Makefile | 24 +++++++++++------------- README.md | 8 ++++---- 2 files changed, 15 insertions(+), 17 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 593fb0f..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 @@ -121,7 +121,7 @@ Below are the available `make` targets for streamlining common tasks: ### Arch linux - AUR - ``` + ```bash yay -S sxwm ``` @@ -133,13 +133,13 @@ Below are the available `make` targets for streamlining common tasks: git clone --depth=1 https://github.com/uint23/sxwm.git cd sxwm/ make - sudo make clean-install + sudo make clean install ``` 2. **Run** Add `sxwm` to `~/.xinitrc`: - ```sh + ```bash exec sxwm ``` -- cgit v1.2.3