-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (29 loc) · 918 Bytes
/
Makefile
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
CC = gcc
LD = gcc
CFLAGS := ${CFLAGS} -Wall -Werror -I"$(CURDIR)"
CFLAGS += $(shell gpgme-config --cflags)
CFLAGS += $(shell pkg-config fuse3 --cflags)
LIBS += $(shell gpgme-config --libs)
LIBS += $(shell pkg-config fuse3 --libs)
.PHONY = default format
default : rgpgfs
src/fs.o : src/fs.c src/fs.h
$(CC) $(CFLAGS) -c $< -o $@
src/gpgme.o : src/gpgme.c src/gpgme.h
$(CC) $(CFLAGS) -c $< -o $@
src/main.o : src/main.c src/fs.h src/gpgme.h src/str.h
$(CC) $(CFLAGS) -c $< -o $@
src/str.o : src/str.c src/str.h
$(CC) $(CFLAGS) -c $< -o $@
rgpgfs : src/fs.o src/gpgme.o src/main.o src/str.o
$(LD) $^ -o $@ $(LIBS)
tests/fs.o : tests/fs.c src/fs.h
$(CC) $(CFLAGS) -c $< -o $@
tests/fs : tests/fs.o src/fs.o
$(LD) $^ -o $@
tests/str.o : tests/str.c src/str.h
$(CC) $(CFLAGS) -c $< -o $@
tests/str : tests/str.o src/str.o
$(LD) $^ -o $@
format : src/*.h src/*.c tests/*.c
clang-format -i -verbose $^