From 8e929bd44420ed9a3bc0b6a030cebbdfcafebf4d Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sat, 10 Aug 2024 23:22:29 -0500 Subject: initial commit --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3