-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
55 lines (44 loc) · 1.37 KB
/
Makefile.in
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
55
DESTDIR=
prefix=@prefix@
exec_prefix=@exec_prefix@
sbindir=@sbindir@
datadir=@datadir@
sysconfdir=@sysconfdir@
localstatedir=@localstatedir@
cachedir=${localstatedir}/armsd
exampledir=${datadir}/armsd
CFLAGS= -O2 -Wall -Werror @DEFS@ @CPPFLAGS@ @CFLAGS@
CFLAGS_COV= $(CFLAGS) -fprofile-arcs -ftest-coverage
LDFLAGS= -lexpat -lssl -lcrypto @LDFLAGS@ @LIBS@
SRCS= armsd.c @SYSSRC@
OBJS= armsd.o @SYSOBJ@
TESTBIN= runtest
all: armsd
armsd.o: armsd.c armsd.h
$(CC) $(CFLAGS) -c -o $@ $<
@SYSOBJ@: @SYSSRC@ armsd.h
$(CC) $(CFLAGS) -c -o $@ $<
armsd: $(OBJS)
$(CC) -o armsd $(OBJS) $(LDFLAGS)
install:
install -d $(DESTDIR)${sbindir}
install -c -s armsd $(DESTDIR)${sbindir}
install -d $(DESTDIR)${sysconfdir}/armsd
install -d $(DESTDIR)${sysconfdir}/armsd/scripts
install -c -m 644 armsd.conf $(DESTDIR)${sysconfdir}/armsd/armsd.conf
install -d $(DESTDIR)${cachedir}
install -d $(DESTDIR)${exampledir}
install -c examples/* $(DESTDIR)${exampledir}
clean:
-rm -f armsd $(TESTBIN) *.o coverage.xml *.gcda *.gcno *.lcov
-rm -rf lcov
t test::
$(CC) $(CFLAGS) -DTEST -o $(TESTBIN) $(SRCS) $(LDFLAGS) -lcheck
./$(TESTBIN)
coverage::
$(CC) $(CFLAGS_COV) -DTEST -o $(TESTBIN) $(SRCS) $(LDFLAGS) -lcheck
-./$(TESTBIN)
gcovr -e '.*/test/' -e '/usr/include' -x -b -o coverage.xml
lcov -c -d . -o armsd-all.lcov
lcov -e armsd-all.lcov '*/armsd.c' -o armsd.lcov
genhtml -o lcov armsd.lcov