summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorawy <awy@awy.one>2025-08-24 13:49:51 +0300
committerawy <awy@awy.one>2025-08-24 13:49:51 +0300
commit522fa7d08f288d77b5b057bf854d12428325e15f (patch)
tree8954919241dc03add6a95218cd019ad1d96c754a
parent9be08523c72dc95c48e1077758001580346a49e8 (diff)
move to other dir
zsh exports .local/bin path and you can autocomplete stuff like Makefile etc..
-rw-r--r--Makefile15
1 files changed, 9 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 834b60c..f965e66 100644
--- a/Makefile
+++ b/Makefile
@@ -2,25 +2,28 @@ CC := gcc
CFLAGS := -O3 -march=native -pipe -Wall -Wextra -std=c99
SRCDIR := src
-BINDIR := .
+BINDIR := $(HOME)/.local/bin/statusbar
SRCS := $(wildcard $(SRCDIR)/*.c)
PROGS := $(patsubst $(SRCDIR)/%.c,$(BINDIR)/%,$(SRCS))
.PHONY: all clean
-all: $(PROGS)
+all: $(BINDIR) $(PROGS)
-$(BINDIR)/stmusic: $(SRCDIR)/stmusic.c
+$(BINDIR):
+ mkdir -p $(BINDIR)
+
+$(BINDIR)/stmusic: $(SRCDIR)/stmusic.c | $(BINDIR)
$(CC) $(CFLAGS) -o $@ $< -lmpdclient
-$(BINDIR)/sttorrent: $(SRCDIR)/sttorrent.c
+$(BINDIR)/sttorrent: $(SRCDIR)/sttorrent.c | $(BINDIR)
$(CC) $(CFLAGS) -o $@ $(SRCDIR)/cjson/cJSON.c $< -lcurl
-$(BINDIR)/stweath: $(SRCDIR)/stweath.c
+$(BINDIR)/stweath: $(SRCDIR)/stweath.c | $(BINDIR)
$(CC) $(CFLAGS) -o $@ $(SRCDIR)/cjson/cJSON.c $< -lcurl
-$(BINDIR)/%: $(SRCDIR)/%.c
+$(BINDIR)/%: $(SRCDIR)/%.c | $(BINDIR)
$(CC) $(CFLAGS) -o $@ $<
clean: