summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelbachir-one <[email protected]>2025-04-21 20:15:27 +0100
committerelbachir-one <[email protected]>2025-04-21 20:15:27 +0100
commit3f5e0fb8dc1532cebdb4341d0f9d987c8d700bc4 (patch)
treedf1089930311b86075d5ccec3b596b8b2c643acd
parent8b4ac08b77a84cc4d5dcdfcc2898c020394fd8a4 (diff)
Fixed the Makefile also updated the README.md
-rw-r--r--Makefile24
-rw-r--r--README.md8
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
```