-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
47 lines (36 loc) · 859 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
TARGET=entente
CFLAGS += \
-std=gnu11 \
-Wall -Wextra -Wpedantic \
-Wno-extended-offsetof \
-Wno-unused-parameter \
-Wstrict-overflow -fno-strict-aliasing \
-Wno-missing-field-initializers \
-DASN_PDU_COLLECTION -Iasn1/ -Ildap/
LDFLAGS += -lev -lpam
SOURCES= \
$(wildcard asn1/*.c) \
$(wildcard ldap/*.c) \
$(wildcard src/*.c)
OBJS=${SOURCES:.c=.o}
all: compile
compile: $(TARGET)
$(TARGET): ${OBJS}
$(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET) ${OBJS}
install:
mkdir -p $(DESTDIR)/usr/sbin
cp entente $(DESTDIR)/usr/sbin/
clean:
rm -rf \
$(TARGET) $(OBJS) \
debian/*.debhelper.log debian/*.debhelper \
debian/*.substvars debian/files \
debian/entente
build-deb:
dpkg-buildpackage -rfakeroot -D -us -uc
clang-format:
find -name '*.[ch]' | xargs -n 1 clang-format -i
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$(CC) $(CFLAGS) -o $@ -c $<