aboutsummaryrefslogtreecommitdiff
path: root/fetcha/Makefile
diff options
context:
space:
mode:
authorPolesznyák Márk <contact@pml68.dev>2025-09-23 17:05:25 +0200
committerPolesznyák Márk <contact@pml68.dev>2025-09-23 17:05:25 +0200
commitb089cc6ed9ae82bf7d94d2b6f02aa01e21d43793 (patch)
tree216156843f171edd7ba21d55ead33dfd08733966 /fetcha/Makefile
parentfeat(dmenu): add inlinePrompt patch (diff)
downloadsuckless-setup-b089cc6ed9ae82bf7d94d2b6f02aa01e21d43793.tar.gz
feat: switch from neofetch to Cryobs/fetcha
Diffstat (limited to '')
-rw-r--r--fetcha/Makefile56
1 files changed, 56 insertions, 0 deletions
diff --git a/fetcha/Makefile b/fetcha/Makefile
new file mode 100644
index 0000000..9af83ef
--- /dev/null
+++ b/fetcha/Makefile
@@ -0,0 +1,56 @@
+# Makefile for fetcha
+
+
+VERSION = 1.0.0
+
+CC = cc
+CCFLAGS = -Wall -Wextra -O2 -MMD
+LDLIBS = -lX11
+SRCS = fetcha.c modules.c
+OBJDIR = bin/obj
+OBJS = $(patsubst %.c,$(OBJDIR)/%.o,$(SRCS))
+DEPS = $(OBJS:.o=.d)
+BIN = bin/fetcha
+
+PREFIX = /usr/local
+DESTDIR =
+
+MANPREFIX = ${PREFIX}/share/man
+
+.PHONY: all clean install uninstall
+
+config.h:
+ cp config.def.h config.h
+
+all: $(BIN)
+
+$(BIN): $(OBJS)
+ @mkdir -p $(dir $@)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
+
+$(OBJDIR)/%.o: %.c
+ @mkdir -p $(OBJDIR)
+ $(CC) $(CFLAGS) -c $< -o $@
+
+-include $(DEPS)
+
+clean:
+ rm -rf $(OBJDIR) $(BIN)
+
+
+install: all
+ @echo installing executable file to ${DESTDIR}${PREFIX}/bin
+ @mkdir -p "$(DESTDIR)$(PREFIX)/bin"
+ @cp -f "$(BIN)" "$(DESTDIR)$(PREFIX)/bin/fetcha"
+ @chmod 755 "$(DESTDIR)$(PREFIX)/bin/fetcha"
+ @echo installing manual page to ${DESTDIR}${MANPREFIX}
+ @mkdir -p ${DESTDIR}${MANPREFIX}/man1
+ @sed "s/VERSION/${VERSION}/g" < fetcha.1 > ${DESTDIR}${MANPREFIX}/man1/fetcha.1
+ @chmod 644 ${DESTDIR}${MANPREFIX}/man1/fetcha.1
+
+uninstall:
+ @echo uninstalling executable file from ${DESTDIR}${PREFIX}/bin
+ @rm -f "$(DESTDIR)$(PREFIX)/bin/fetcha"
+
+ @echo uninstalling manual page from ${DESTDIR}${MANPREFIX}/man1
+ @rm -f "${DESTDIR}${MANPREFIX}/man1/fetcha.1"