-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
54 lines (36 loc) · 964 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
44
45
46
47
48
49
50
51
52
53
54
NAME = pubkeyfs
CC = gcc -Wall
CFLAGS = -std=c99 -pthread -D_GNU_SOURCE
LIBS = -lldap -llber -lfuse -lconfig
FUSE_CFLAGS = -D_FILE_OFFSET_BITS=64
VERSION = 0.0.1
PREFIX = /usr
OBJECTS = ldapapi.o utils.o pkfs.o
vpath %.c src
vpath %.h src
all: pkfs
pkfs: $(OBJECTS)
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
pkfs.o: pkfs.c ldapapi.h utils.h
$(CC) $(FUSE_CFLAGS) -c $<
ldapapi.o: ldapapi.c ldapapi.h
$(CC) $(CFLAGS) -c $<
utils.o: utils.c utils.h
$(CC) -c $<
.PHONEY: clean cleanrpm cleantarball cleandeb
clean: cleanrpm cleantarball cleandeb
rm -rf $(OBJECTS) pkfs
cleandeb:
rm -rf debian/pubkeyfs* *.deb
cleanrpm:
rm -rf BUILD SRPMS RPMS *.rpm SOURCES SPECS
cleantarball:
rm -rf *.tar.gz
.PHONEY: install
install: pkfs
mkdir -p $(DESTDIR)/$(PREFIX)/bin
install -m0755 pkfs $(DESTDIR)/$(PREFIX)/bin
.PHONEY: tarball srpm deb
include ext/Makefile.tarball
include ext/Makefile.rpm
include ext/Makefile.deb