diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
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 |