summaryrefslogtreecommitdiff
path: root/Makefile
blob: 0212a223bdabaaa532a6bd355d726007af6aefd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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