aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: