aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2024-08-10 23:22:29 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2024-08-10 23:22:29 -0500
commit8e929bd44420ed9a3bc0b6a030cebbdfcafebf4d (patch)
tree62c41cbd55a958135ede2baebb3fddd7bc5eb6a7 /Makefile
downloadlowbat-8e929bd44420ed9a3bc0b6a030cebbdfcafebf4d.tar.xz
lowbat-8e929bd44420ed9a3bc0b6a030cebbdfcafebf4d.zip
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..180a311
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+# Define variables
+CC = gcc
+CFLAGS = -std=c99 -Wall $(shell pkg-config --cflags libnotify)
+LDFLAGS = $(shell pkg-config --libs libnotify)
+LIBS = -lnotify
+TARGET = lowbat
+SRCS = lowbat.c
+OBJS = $(SRCS:.c=.o)
+
+# Default target
+all: $(TARGET)
+
+# Build target
+$(TARGET): $(OBJS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
+
+# Compile source files
+%.o: %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+# Clean up build files
+clean:
+ rm -f $(TARGET) $(OBJS)
+
+# Phony targets
+.PHONY: all clean