summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0212a22
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+CC := gcc
+CFLAGS := $(CFLAGS) -I../inotail -W -Wall -pipe -D_USE_SOURCE \
+ -Wstrict-prototypes -Wsign-compare -Wshadow -Wchar-subscripts \
+ -Wmissing-declarations -Wpointer-arith -Wcast-align -Wmissing-prototypes
+
+# Compile with 'make DEBUG=true' to enable debugging
+DEBUG = false
+ifeq ($(strip $(DEBUG)),true)
+ CFLAGS += -g -DDEBUG -fmudflap
+ LDFLAGS += -lmudflap
+endif
+
+all: inotify-watch direct-append
+inotify-watch: inotify-watch.o
+direct-append: direct-append.o
+
+%.o: %.c %.h
+ $(CC) $(CFLAGS) -c $< -o $@
+
+clean:
+ rm -f inotify-watch direct-append *.o