1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
|
CC = gcc
CFLAGS = -Wall -Werror -W -pthread -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
LDFLAGS = -pthread
LIBS = -lpthread
PREFIX = /usr/local
prefix = $(PREFIX)
bindir = $(prefix)/bin
mandir = $(prefix)/share/man
all: filed
filed: filed.o
$(CC) $(CFLAGS) $(LDFLAGS) -o "$@" $^ $(LIBS)
filed.o: filed.c
install: filed filed.1
test -d "$(DESTDIR)$(mandir)/man1" || mkdir -p "$(DESTDIR)$(mandir)/man1"
test -d "$(DESTDIR)$(bindir)" || mkdir -p "$(DESTDIR)$(bindir)"
cp filed.1 "$(DESTDIR)$(mandir)/man1/"
cp filed "$(DESTDIR)$(bindir)/"
clean:
rm -f filed filed.o
distclean: clean
.PHONY: clean distclean
.PHONY: all install clean distclean
|