aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2024-03-12 11:05:24 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2024-03-12 11:05:24 -0700
commit09b3b06ecff704b6b001d6398f506dce9456301f (patch)
treeb8c1582f0b60f769447979b9d814956fe6f265cb
parentfeat: systemd support (diff)
downloadfifo-cronolog-09b3b06ecff704b6b001d6398f506dce9456301f.tar.gz
fifo-cronolog-09b3b06ecff704b6b001d6398f506dce9456301f.tar.bz2
fifo-cronolog-09b3b06ecff704b6b001d6398f506dce9456301f.zip
build: cleanup Makefile
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index cca4e8b..3baecf8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,17 @@
CFLAGS += -Wall
+BIN = fifo-cronolog
+SRC = $(BIN).c
+OBJ = $(patsubst %.c,%.o,$(SRC))
-all: fifo-cronolog
+all: $(BIN)
-fifo-cronolog: fifo-cronolog.o
+$(BIN): $(OBJ)
$(CC) $(LDFLAGS) -o $@ $<
-fifo-cronolog.o: fifo-cronolog.c
+.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
clean:
- $(RM) fifo-cronolog{,.o}
+ $(RM) $(BIN) $(OBJ)
# vim: set ts=4 sw=4 tw=80: