diff options
author | 2020-04-09 20:02:26 -0500 | |
---|---|---|
committer | 2020-04-09 20:02:26 -0500 | |
commit | 0f18c1bb2cf47a05b9936e3b54ece62360d45daa (patch) | |
tree | 1d3a32a9ab8413dfeeab0f38f4decdd432e935e8 | |
parent | Add /usr/share/games to whitelist (diff) | |
parent | Build improvements (diff) | |
download | firejail-0f18c1bb2cf47a05b9936e3b54ece62360d45daa.tar.gz firejail-0f18c1bb2cf47a05b9936e3b54ece62360d45daa.tar.zst firejail-0f18c1bb2cf47a05b9936e3b54ece62360d45daa.zip |
Merge pull request #3337 from topimiettinen/build-fixing
Build improvements
-rw-r--r-- | Makefile.in | 81 |
1 files changed, 27 insertions, 54 deletions
diff --git a/Makefile.in b/Makefile.in index ecbbb5600..13ee3a401 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -1,9 +1,14 @@ | |||
1 | all: apps man filters | 1 | all: all_items man filters |
2 | MYLIBS = src/lib | 2 | APPS = src/firecfg/firecfg src/firejail/firejail src/firemon/firemon |
3 | APPS = src/firejail src/firemon src/fsec-print src/fsec-optimize src/firecfg src/fnetfilter src/libtrace src/libtracelog src/ftee \ | 3 | SBOX_APPS = src/faudit/faudit src/fbuilder/fbuilder src/fcopy/fcopy src/fldd/fldd src/fnet/fnet src/fnetfilter/fnetfilter src/ftee/ftee |
4 | src/faudit src/fnet src/fseccomp src/fbuilder src/fcopy src/fldd src/libpostexecseccomp src/profstats | 4 | MYDIRS = src/lib src/profstats |
5 | MYLIBS = src/libpostexecseccomp/libpostexecseccomp.so src/libtrace/libtrace.so src/libtracelog/libtracelog.so | ||
5 | MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 firejail-users.5 | 6 | MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 firejail-users.5 |
7 | ifeq ($(HAVE_SECCOMP),-DHAVE_SECCOMP) | ||
8 | SBOX_APPS += src/fsec-optimize/fsec-optimize src/fsec-print/fsec-print src/fseccomp/fseccomp | ||
6 | SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx seccomp.mdwx.32 | 9 | SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx seccomp.mdwx.32 |
10 | endif | ||
11 | ALL_ITEMS = $(APPS) $(SBOX_APPS) $(MYLIBS) | ||
7 | 12 | ||
8 | prefix=@prefix@ | 13 | prefix=@prefix@ |
9 | exec_prefix=@exec_prefix@ | 14 | exec_prefix=@exec_prefix@ |
@@ -23,14 +28,14 @@ HAVE_CONTRIB_INSTALL=@HAVE_CONTRIB_INSTALL@ | |||
23 | BUSYBOX_WORKAROUND=@BUSYBOX_WORKAROUND@ | 28 | BUSYBOX_WORKAROUND=@BUSYBOX_WORKAROUND@ |
24 | HAVE_SUID=@HAVE_SUID@ | 29 | HAVE_SUID=@HAVE_SUID@ |
25 | 30 | ||
26 | .PHONY: mylibs $(MYLIBS) | 31 | .PHONY: apps filters man mylibs |
27 | mylibs: $(MYLIBS) | 32 | all_items: $(ALL_ITEMS) |
28 | $(MYLIBS): | 33 | $(ALL_ITEMS): |
29 | $(MAKE) -C $@ | 34 | $(MAKE) -C $(dir $@) |
30 | 35 | ||
31 | .PHONY: apps $(APPS) | 36 | .PHONY: mydirs |
32 | apps: $(APPS) | 37 | mydirs: $(MYDIRS) |
33 | $(APPS): $(MYLIBS) | 38 | $(MYDIRS): |
34 | $(MAKE) -C $@ | 39 | $(MAKE) -C $@ |
35 | 40 | ||
36 | $(MANPAGES): $(wildcard src/man/*.txt) | 41 | $(MANPAGES): $(wildcard src/man/*.txt) |
@@ -38,8 +43,9 @@ $(MANPAGES): $(wildcard src/man/*.txt) | |||
38 | 43 | ||
39 | man: $(MANPAGES) | 44 | man: $(MANPAGES) |
40 | 45 | ||
41 | filters: src/fseccomp | 46 | filters: $(SECCOMP_FILTERS) $(SBOX_APPS) |
42 | ifeq ($(HAVE_SECCOMP),-DHAVE_SECCOMP) | 47 | ifeq ($(HAVE_SECCOMP),-DHAVE_SECCOMP) |
48 | $(SECCOMP_FILTERS): $(SBOX_APPS) | ||
43 | src/fseccomp/fseccomp default seccomp | 49 | src/fseccomp/fseccomp default seccomp |
44 | src/fsec-optimize/fsec-optimize seccomp | 50 | src/fsec-optimize/fsec-optimize seccomp |
45 | src/fseccomp/fseccomp default seccomp.debug allow-debuggers | 51 | src/fseccomp/fseccomp default seccomp.debug allow-debuggers |
@@ -52,7 +58,7 @@ ifeq ($(HAVE_SECCOMP),-DHAVE_SECCOMP) | |||
52 | endif | 58 | endif |
53 | 59 | ||
54 | clean: | 60 | clean: |
55 | for dir in $(APPS) $(MYLIBS); do \ | 61 | for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \ |
56 | $(MAKE) -C $$dir clean; \ | 62 | $(MAKE) -C $$dir clean; \ |
57 | done | 63 | done |
58 | rm -f $(MANPAGES) $(MANPAGES:%=%.gz) firejail*.rpm | 64 | rm -f $(MANPAGES) $(MANPAGES:%=%.gz) firejail*.rpm |
@@ -70,7 +76,7 @@ clean: | |||
70 | cd test/compile; ./compile.sh --clean; cd ../.. | 76 | cd test/compile; ./compile.sh --clean; cd ../.. |
71 | 77 | ||
72 | distclean: clean | 78 | distclean: clean |
73 | for dir in $(APPS) $(MYLIBS); do \ | 79 | for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \ |
74 | $(MAKE) -C $$dir distclean; \ | 80 | $(MAKE) -C $$dir distclean; \ |
75 | done | 81 | done |
76 | rm -fr Makefile autom4te.cache config.log config.status config.h src/common.mk | 82 | rm -fr Makefile autom4te.cache config.log config.status config.h src/common.mk |
@@ -88,30 +94,12 @@ endif | |||
88 | install -c -m 0755 src/firecfg/firecfg $(DESTDIR)/$(bindir)/. | 94 | install -c -m 0755 src/firecfg/firecfg $(DESTDIR)/$(bindir)/. |
89 | # libraries and plugins | 95 | # libraries and plugins |
90 | install -m 0755 -d $(DESTDIR)/$(libdir)/firejail | 96 | install -m 0755 -d $(DESTDIR)/$(libdir)/firejail |
91 | install -c -m 0644 src/libtrace/libtrace.so $(DESTDIR)/$(libdir)/firejail/. | 97 | for file in $(MYLIBS) $(SECCOMP_FILTERS); do \ |
92 | install -c -m 0644 src/libtracelog/libtracelog.so $(DESTDIR)/$(libdir)/firejail/. | 98 | install -c -m 0644 $$file $(DESTDIR)/$(libdir)/firejail/; \ |
93 | install -c -m 0644 src/libpostexecseccomp/libpostexecseccomp.so $(DESTDIR)/$(libdir)/firejail/. | 99 | done |
94 | install -c -m 0755 src/ftee/ftee $(DESTDIR)/$(libdir)/firejail/. | 100 | for app in $(SBOX_APPS); do \ |
95 | install -c -m 0755 src/fshaper/fshaper.sh $(DESTDIR)/$(libdir)/firejail/. | 101 | install -c -m 0755 $$app $(DESTDIR)/$(libdir)/firejail/; \ |
96 | 102 | done | |
97 | install -c -m 0644 src/firecfg/firecfg.config $(DESTDIR)/$(libdir)/firejail/. | ||
98 | install -c -m 0755 src/faudit/faudit $(DESTDIR)/$(libdir)/firejail/. | ||
99 | install -c -m 0755 src/fnet/fnet $(DESTDIR)/$(libdir)/firejail/. | ||
100 | install -c -m 0755 src/fnetfilter/fnetfilter $(DESTDIR)/$(libdir)/firejail/. | ||
101 | install -c -m 0755 src/fcopy/fcopy $(DESTDIR)/$(libdir)/firejail/. | ||
102 | install -c -m 0755 src/fldd/fldd $(DESTDIR)/$(libdir)/firejail/. | ||
103 | install -c -m 0755 src/fbuilder/fbuilder $(DESTDIR)/$(libdir)/firejail/. | ||
104 | ifeq ($(HAVE_SECCOMP),-DHAVE_SECCOMP) | ||
105 | install -c -m 0755 src/fsec-print/fsec-print $(DESTDIR)/$(libdir)/firejail/. | ||
106 | install -c -m 0755 src/fsec-optimize/fsec-optimize $(DESTDIR)/$(libdir)/firejail/. | ||
107 | install -c -m 0755 src/fseccomp/fseccomp $(DESTDIR)/$(libdir)/firejail/. | ||
108 | install -c -m 0644 seccomp $(DESTDIR)/$(libdir)/firejail/. | ||
109 | install -c -m 0644 seccomp.debug $(DESTDIR)/$(libdir)/firejail/. | ||
110 | install -c -m 0644 seccomp.32 $(DESTDIR)/$(libdir)/firejail/. | ||
111 | install -c -m 0644 seccomp.block_secondary $(DESTDIR)/$(libdir)/firejail/. | ||
112 | install -c -m 0644 seccomp.mdwx $(DESTDIR)/$(libdir)/firejail/. | ||
113 | install -c -m 0644 seccomp.mdwx.32 $(DESTDIR)/$(libdir)/firejail/. | ||
114 | endif | ||
115 | ifeq ($(HAVE_CONTRIB_INSTALL),yes) | 103 | ifeq ($(HAVE_CONTRIB_INSTALL),yes) |
116 | install -c -m 0755 contrib/fix_private-bin.py $(DESTDIR)/$(libdir)/firejail/. | 104 | install -c -m 0755 contrib/fix_private-bin.py $(DESTDIR)/$(libdir)/firejail/. |
117 | install -c -m 0755 contrib/fjclip.py $(DESTDIR)/$(libdir)/firejail/. | 105 | install -c -m 0755 contrib/fjclip.py $(DESTDIR)/$(libdir)/firejail/. |
@@ -167,22 +155,7 @@ install: all | |||
167 | $(MAKE) realinstall | 155 | $(MAKE) realinstall |
168 | 156 | ||
169 | install-strip: all | 157 | install-strip: all |
170 | strip src/firejail/firejail | 158 | strip $(APPS) |
171 | strip src/firemon/firemon | ||
172 | strip src/firecfg/firecfg | ||
173 | strip src/libtrace/libtrace.so | ||
174 | strip src/libtracelog/libtracelog.so | ||
175 | strip src/libpostexecseccomp/libpostexecseccomp.so | ||
176 | strip src/ftee/ftee | ||
177 | strip src/faudit/faudit | ||
178 | strip src/fnet/fnet | ||
179 | strip src/fnetfilter/fnetfilter | ||
180 | strip src/fseccomp/fseccomp | ||
181 | strip src/fsec-print/fsec-print | ||
182 | strip src/fsec-optimize/fsec-optimize | ||
183 | strip src/fcopy/fcopy | ||
184 | strip src/fldd/fldd | ||
185 | strip src/fbuilder/fbuilder | ||
186 | $(MAKE) realinstall | 159 | $(MAKE) realinstall |
187 | 160 | ||
188 | uninstall: | 161 | uninstall: |