diff options
author | 2016-11-07 12:52:38 -0500 | |
---|---|---|
committer | 2016-11-07 12:52:38 -0500 | |
commit | 6f1816ab52fc57579a4ac30dbfb885118f4ab56f (patch) | |
tree | f631d33607b097c97ce8859e4c6202dfa07fd1d9 | |
parent | gcov support (diff) | |
download | firejail-6f1816ab52fc57579a4ac30dbfb885118f4ab56f.tar.gz firejail-6f1816ab52fc57579a4ac30dbfb885118f4ab56f.tar.zst firejail-6f1816ab52fc57579a4ac30dbfb885118f4ab56f.zip |
gcov support
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | src/firecfg/Makefile.in | 8 | ||||
-rw-r--r-- | src/lib/Makefile.in | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/Makefile.in b/Makefile.in index bc9f20bd0..1861fb7ca 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -225,7 +225,7 @@ test: test-profiles test-fs test-utils test-environment test-apps test-apps-x11 | |||
225 | echo "TEST COMPLETE" | 225 | echo "TEST COMPLETE" |
226 | 226 | ||
227 | gcov:; | 227 | gcov:; |
228 | lcov --capture -d src/firejail -d src/firemon -d src/fseccomp -d src/fnet -d src/ftee --output-file gcov-file | 228 | lcov --capture -d src/firejail -d src/firemon -d src/fseccomp -d src/fnet -d src/ftee -d src/lib -d src/firecfg --output-file gcov-file |
229 | rm -fr gcov-dir | 229 | rm -fr gcov-dir |
230 | genhtml gcov-file --output-directory gcov-dir | 230 | genhtml gcov-file --output-directory gcov-dir |
231 | 231 | ||
diff --git a/src/firecfg/Makefile.in b/src/firecfg/Makefile.in index 11f8b1e8d..f9fe08768 100644 --- a/src/firecfg/Makefile.in +++ b/src/firecfg/Makefile.in | |||
@@ -16,22 +16,24 @@ HAVE_NETWORK=@HAVE_NETWORK@ | |||
16 | HAVE_USERNS=@HAVE_USERNS@ | 16 | HAVE_USERNS=@HAVE_USERNS@ |
17 | HAVE_X11=@HAVE_X11@ | 17 | HAVE_X11=@HAVE_X11@ |
18 | HAVE_FILE_TRANSFER=@HAVE_FILE_TRANSFER@ | 18 | HAVE_FILE_TRANSFER=@HAVE_FILE_TRANSFER@ |
19 | HAVE_GCOV=@HAVE_GCOV@ | ||
20 | EXTRA_LDFLAGS +=@EXTRA_LDFLAGS@ | ||
19 | 21 | ||
20 | 22 | ||
21 | H_FILE_LIST = $(sort $(wildcard *.[h])) | 23 | H_FILE_LIST = $(sort $(wildcard *.[h])) |
22 | C_FILE_LIST = $(sort $(wildcard *.c)) | 24 | C_FILE_LIST = $(sort $(wildcard *.c)) |
23 | OBJS = $(C_FILE_LIST:.c=.o) | 25 | OBJS = $(C_FILE_LIST:.c=.o) |
24 | BINOBJS = $(foreach file, $(OBJS), $file) | 26 | BINOBJS = $(foreach file, $(OBJS), $file) |
25 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' $(HAVE_X11) $(HAVE_SECCOMP) $(HAVE_SECCOMP_H) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_BIND) $(HAVE_FILE_TRANSFER) -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -pie -Wformat -Wformat-security | 27 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' $(HAVE_GCOV) -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)/firejail"' -DLIBDIR='"$(libdir)"' $(HAVE_X11) $(HAVE_SECCOMP) $(HAVE_SECCOMP_H) $(HAVE_CHROOT) $(HAVE_NETWORK) $(HAVE_USERNS) $(HAVE_BIND) $(HAVE_FILE_TRANSFER) -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIE -pie -Wformat -Wformat-security |
26 | LDFLAGS += -pie -Wl,-z,relro -Wl,-z,now -lpthread | 28 | LDFLAGS += -pie -Wl,-z,relro -Wl,-z,now -lpthread |
27 | 29 | ||
28 | %.o : %.c $(H_FILE_LIST) ../include/common.h ../include/euid_common.h ../include/libnetlink.h ../include/pid.h | 30 | %.o : %.c $(H_FILE_LIST) ../include/common.h ../include/euid_common.h ../include/libnetlink.h ../include/pid.h |
29 | $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ | 31 | $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ |
30 | 32 | ||
31 | firecfg: $(OBJS) ../lib/common.o | 33 | firecfg: $(OBJS) ../lib/common.o |
32 | $(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o $(LIBS) | 34 | $(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o $(LIBS) $(EXTRA_LDFLAGS) |
33 | 35 | ||
34 | clean:; rm -f *.o firecfg firecfg.1 firecfg.1.gz | 36 | clean:; rm -f *.o firecfg firecfg.1 firecfg.1.gz *.gcov *.gcda *.gcno |
35 | 37 | ||
36 | distclean: clean | 38 | distclean: clean |
37 | rm -fr Makefile | 39 | rm -fr Makefile |
diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in index 71f96bab1..5549aca11 100644 --- a/src/lib/Makefile.in +++ b/src/lib/Makefile.in | |||
@@ -2,12 +2,14 @@ PREFIX=@prefix@ | |||
2 | VERSION=@PACKAGE_VERSION@ | 2 | VERSION=@PACKAGE_VERSION@ |
3 | NAME=@PACKAGE_NAME@ | 3 | NAME=@PACKAGE_NAME@ |
4 | HAVE_FATAL_WARNINGS=@HAVE_FATAL_WARNINGS@ | 4 | HAVE_FATAL_WARNINGS=@HAVE_FATAL_WARNINGS@ |
5 | HAVE_GCOV=@HAVE_GCOV@ | ||
6 | EXTRA_LDFLAGS +=@EXTRA_LDFLAGS@ | ||
5 | 7 | ||
6 | H_FILE_LIST = $(sort $(wildcard *.[h])) | 8 | H_FILE_LIST = $(sort $(wildcard *.[h])) |
7 | C_FILE_LIST = $(sort $(wildcard *.c)) | 9 | C_FILE_LIST = $(sort $(wildcard *.c)) |
8 | OBJS = $(C_FILE_LIST:.c=.o) | 10 | OBJS = $(C_FILE_LIST:.c=.o) |
9 | BINOBJS = $(foreach file, $(OBJS), $file) | 11 | BINOBJS = $(foreach file, $(OBJS), $file) |
10 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIC -Wformat -Wformat-security | 12 | CFLAGS += -ggdb $(HAVE_FATAL_WARNINGS) -O2 -DVERSION='"$(VERSION)"' $(HAVE_GCOV) -fstack-protector-all -D_FORTIFY_SOURCE=2 -fPIC -Wformat -Wformat-security |
11 | LDFLAGS:=-pic -Wl,-z,relro -Wl,-z,now | 13 | LDFLAGS:=-pic -Wl,-z,relro -Wl,-z,now |
12 | 14 | ||
13 | all: $(OBJS) | 15 | all: $(OBJS) |
@@ -15,7 +17,7 @@ all: $(OBJS) | |||
15 | %.o : %.c $(H_FILE_LIST) | 17 | %.o : %.c $(H_FILE_LIST) |
16 | $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ | 18 | $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@ |
17 | 19 | ||
18 | clean:; rm -f $(OBJS) | 20 | clean:; rm -f $(OBJS) *.gcov *.gcda *.gcno |
19 | 21 | ||
20 | distclean: clean | 22 | distclean: clean |
21 | rm -fr Makefile | 23 | rm -fr Makefile |