-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.linux
49 lines (32 loc) · 1.08 KB
/
Makefile.linux
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
CC=gcc
CFLAGS=-g -Wall
#CFLAGS=-g -Wall -fsanitize=address
#APPS= dupmerge checkattr pathnames mergefiles construct rmdups
APPS= checkattr dupmerge file_monitor mergefiles
all: $(APPS)
rmdups: rmdups.o
$(CC) $(CFLAGS) -o rmdups rmdups.o
construct: construct.o library.o
$(CC) $(CFLAGS) -o construct construct.o library.o -l crypto
mergefiles: mergefiles.o
$(CC) $(CFLAGS) -o mergefiles mergefiles.o -l bsd
checkattr: checkattr.o library.a
$(CC) $(CFLAGS) -o checkattr checkattr.o library.a -l crypto
dupmerge: dupmerge.o library.o
$(CC) $(CFLAGS) -o dupmerge dupmerge.o library.o -l crypto
pathnames: pathnames.o
$(CC) $(CFLAGS) -o pathnames pathnames.o
file_monitor: file_monitor.o library.a
$(CC) $(CFLAGS) -o file_monitor file_monitor.o library.a -l crypto
library.a: library.o
ar -rv library.a library.o
dupmerge.o: dupmerge.c filehash.h
checkattr.o: checkattr.c filehash.h
library.o: library.c filehash.h
file_monitor.o: file_monitor.c filehash.h
install: $(APPS)
install -b -m 0755 -S -v $^ /usr/local/bin
clean:
rm -f *.o *.a $(APPS)
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<