summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorawy <awy@awy.one>2025-08-18 19:17:30 +0300
committerawy <awy@awy.one>2025-08-18 19:17:30 +0300
commitb3526d31b40dbdf37ea4b314c8e9aa94d39b7f8c (patch)
treef262a162e13d28f8915d09d9406f5c08f9729841 /Makefile
init
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..54c19ff
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+CC := gcc
+CFLAGS := -O3 -march=native -pipe -Wall -Wextra -std=c99
+
+SRCDIR := src
+BINDIR := .
+
+SRCS := $(wildcard $(SRCDIR)/*.c)
+PROGS := $(patsubst $(SRCDIR)/%.c,$(BINDIR)/%,$(SRCS))
+
+.PHONY: all clean
+
+all: $(PROGS)
+
+$(BINDIR)/stmusic: $(SRCDIR)/stmusic.c
+ $(CC) $(CFLAGS) -o $@ $< -lmpdclient
+
+$(BINDIR)/%: $(SRCDIR)/%.c
+ $(CC) $(CFLAGS) -o $@ $<
+
+clean:
+ rm -f $(PROGS)