aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in309
1 files changed, 0 insertions, 309 deletions
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index 4d9983672..000000000
--- a/Makefile.in
+++ /dev/null
@@ -1,309 +0,0 @@
1include config.mk
2
3ifneq ($(HAVE_MAN),no)
4MAN_TARGET = man
5MAN_SRC = src/man
6endif
7
8COMPLETIONDIRS = src/zsh_completion src/bash_completion
9
10.PHONY: all
11all: all_items mydirs $(MAN_TARGET) filters
12APPS = src/firecfg/firecfg src/firejail/firejail src/firemon/firemon src/profstats/profstats src/jailcheck/jailcheck
13SBOX_APPS = src/fbuilder/fbuilder src/ftee/ftee src/fids/fids
14SBOX_APPS_NON_DUMPABLE = src/fcopy/fcopy src/fldd/fldd src/fnet/fnet src/fnetfilter/fnetfilter src/fzenity/fzenity
15SBOX_APPS_NON_DUMPABLE += src/fsec-optimize/fsec-optimize src/fsec-print/fsec-print src/fseccomp/fseccomp
16SBOX_APPS_NON_DUMPABLE += src/fnettrace/fnettrace src/fnettrace-dns/fnettrace-dns src/fnettrace-sni/fnettrace-sni
17MYDIRS = src/lib $(MAN_SRC) $(COMPLETIONDIRS)
18MYLIBS = src/libpostexecseccomp/libpostexecseccomp.so src/libtrace/libtrace.so src/libtracelog/libtracelog.so
19COMPLETIONS = src/zsh_completion/_firejail src/bash_completion/firejail.bash_completion
20MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 firejail-users.5 jailcheck.1
21SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx seccomp.mdwx.32
22ALL_ITEMS = $(APPS) $(SBOX_APPS) $(SBOX_APPS_NON_DUMPABLE) $(MYLIBS)
23
24.PHONY: all_items $(ALL_ITEMS)
25all_items: $(ALL_ITEMS)
26$(ALL_ITEMS): $(MYDIRS)
27 $(MAKE) -C $(dir $@)
28
29.PHONY: mydirs $(MYDIRS)
30mydirs: $(MYDIRS)
31$(MYDIRS):
32 $(MAKE) -C $@
33
34$(MANPAGES): src/man
35 ./mkman.sh $(VERSION) src/man/$(basename $@).man $@
36
37man: $(MANPAGES)
38
39filters: $(SECCOMP_FILTERS) $(SBOX_APPS_NON_DUMPABLE)
40seccomp: src/fseccomp/fseccomp src/fsec-optimize/fsec-optimize
41 src/fseccomp/fseccomp default seccomp
42 src/fsec-optimize/fsec-optimize seccomp
43
44seccomp.debug: src/fseccomp/fseccomp src/fsec-optimize/fsec-optimize
45 src/fseccomp/fseccomp default seccomp.debug allow-debuggers
46 src/fsec-optimize/fsec-optimize seccomp.debug
47
48seccomp.32: src/fseccomp/fseccomp src/fsec-optimize/fsec-optimize
49 src/fseccomp/fseccomp secondary 32 seccomp.32
50 src/fsec-optimize/fsec-optimize seccomp.32
51
52seccomp.block_secondary: src/fseccomp/fseccomp
53 src/fseccomp/fseccomp secondary block seccomp.block_secondary
54
55seccomp.mdwx: src/fseccomp/fseccomp
56 src/fseccomp/fseccomp memory-deny-write-execute seccomp.mdwx
57
58seccomp.mdwx.32: src/fseccomp/fseccomp
59 src/fseccomp/fseccomp memory-deny-write-execute.32 seccomp.mdwx.32
60
61.PHONY: clean
62clean:
63 for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \
64 $(MAKE) -C $$dir clean; \
65 done
66 $(MAKE) -C test clean
67 rm -f $(MANPAGES) $(MANPAGES:%=%.gz) firejail*.rpm
68 rm -f $(SECCOMP_FILTERS)
69 rm -f test/utils/index.html*
70 rm -f test/utils/wget-log
71 rm -f test/utils/firejail-test-file*
72 rm -f test/utils/lstesting
73 rm -f test/environment/index.html*
74 rm -f test/environment/wget-log*
75 rm -fr test/environment/-testdir
76 rm -f test/environment/logfile*
77 rm -f test/environment/index.html
78 rm -f test/environment/wget-log
79 rm -f test/sysutils/firejail_t*
80 cd test/compile; ./compile.sh --clean; cd ../..
81
82.PHONY: distclean
83distclean: clean
84 for dir in $$(dirname $(ALL_ITEMS)) $(MYDIRS); do \
85 $(MAKE) -C $$dir distclean; \
86 done
87 $(MAKE) -C test distclean
88 rm -fr Makefile autom4te.cache config.log config.mk config.sh config.status src/common.mk mkdeb.sh
89
90realinstall:
91 # firejail executable
92 install -m 0755 -d $(DESTDIR)$(bindir)
93 install -m 0755 src/firejail/firejail $(DESTDIR)$(bindir)
94ifeq ($(HAVE_SUID),-DHAVE_SUID)
95 chmod u+s $(DESTDIR)$(bindir)/firejail
96endif
97 # firemon executable
98 install -m 0755 src/firemon/firemon $(DESTDIR)$(bindir)
99 # firecfg executable
100 install -m 0755 src/firecfg/firecfg $(DESTDIR)$(bindir)
101 # jailcheck executable
102 install -m 0755 src/jailcheck/jailcheck $(DESTDIR)$(bindir)
103 # libraries and plugins
104 install -m 0755 -d $(DESTDIR)$(libdir)/firejail
105 install -m 0755 -t $(DESTDIR)$(libdir)/firejail src/firecfg/firejail-welcome.sh
106 install -m 0644 -t $(DESTDIR)$(libdir)/firejail $(MYLIBS) $(SECCOMP_FILTERS)
107 install -m 0755 -t $(DESTDIR)$(libdir)/firejail $(SBOX_APPS)
108 install -m 0755 -t $(DESTDIR)$(libdir)/firejail src/profstats/profstats
109 # plugins w/o read permission (non-dumpable)
110 install -m 0711 -t $(DESTDIR)$(libdir)/firejail $(SBOX_APPS_NON_DUMPABLE)
111 install -m 0711 -t $(DESTDIR)$(libdir)/firejail src/fshaper/fshaper.sh
112 install -m 0644 -t $(DESTDIR)$(libdir)/firejail src/fnettrace/static-ip-map
113ifeq ($(HAVE_CONTRIB_INSTALL),yes)
114 # contrib scripts
115 install -m 0755 -t $(DESTDIR)$(libdir)/firejail contrib/*.py contrib/*.sh
116 # vim syntax
117 install -m 0755 -d $(DESTDIR)$(datarootdir)/vim/vimfiles/ftdetect
118 install -m 0755 -d $(DESTDIR)$(datarootdir)/vim/vimfiles/syntax
119 install -m 0644 contrib/vim/ftdetect/firejail.vim $(DESTDIR)$(datarootdir)/vim/vimfiles/ftdetect
120 install -m 0644 contrib/vim/syntax/firejail.vim $(DESTDIR)$(datarootdir)/vim/vimfiles/syntax
121endif
122 # documents
123 install -m 0755 -d $(DESTDIR)$(DOCDIR)
124 install -m 0644 -t $(DESTDIR)$(DOCDIR) COPYING README RELNOTES etc/templates/*
125 # profiles and settings
126 install -m 0755 -d $(DESTDIR)$(sysconfdir)/firejail
127 install -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail src/firecfg/firecfg.config
128 install -m 0644 -t $(DESTDIR)$(sysconfdir)/firejail etc/profile-a-l/*.profile etc/profile-m-z/*.profile etc/inc/*.inc etc/net/*.net etc/firejail.config etc/ids.config
129 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;"
130ifeq ($(BUSYBOX_WORKAROUND),yes)
131 ./mketc.sh $(DESTDIR)$(sysconfdir)/firejail/disable-common.inc
132endif
133ifeq ($(HAVE_APPARMOR),-DHAVE_APPARMOR)
134 # install apparmor profile
135 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d; fi;"
136 install -m 0644 etc/apparmor/firejail-default $(DESTDIR)$(sysconfdir)/apparmor.d
137 # install apparmor profile customization file
138 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/local ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/local; fi;"
139 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default ]; then install -c -m 0644 etc/apparmor/firejail-local $(DESTDIR)/$(sysconfdir)/apparmor.d/local/firejail-default; fi;"
140 # install apparmor base abstraction drop-in
141 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions; fi;"
142 sh -c "if [ ! -d $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions/base.d ]; then install -d -m 755 $(DESTDIR)/$(sysconfdir)/apparmor.d/abstractions/base.d; fi;"
143 install -m 0644 etc/apparmor/firejail-base $(DESTDIR)$(sysconfdir)/apparmor.d/abstractions/base.d
144endif
145ifneq ($(HAVE_MAN),no)
146 # man pages
147 install -m 0755 -d $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5
148 for man in $(MANPAGES); do \
149 rm -f $$man.gz; \
150 gzip -9n $$man; \
151 case "$$man" in \
152 *.1) install -m 0644 $$man.gz $(DESTDIR)$(mandir)/man1/; ;; \
153 *.5) install -m 0644 $$man.gz $(DESTDIR)$(mandir)/man5/; ;; \
154 esac; \
155 done
156 rm -f $(MANPAGES) $(MANPAGES:%=%.gz)
157endif
158 # bash completion
159 install -m 0755 -d $(DESTDIR)$(datarootdir)/bash-completion/completions
160 install -m 0644 src/bash_completion/firejail.bash_completion $(DESTDIR)$(datarootdir)/bash-completion/completions/firejail
161 install -m 0644 src/bash_completion/firemon.bash_completion $(DESTDIR)$(datarootdir)/bash-completion/completions/firemon
162 install -m 0644 src/bash_completion/firecfg.bash_completion $(DESTDIR)$(datarootdir)/bash-completion/completions/firecfg
163 # zsh completion
164 install -m 0755 -d $(DESTDIR)$(datarootdir)/zsh/site-functions
165 install -m 0644 src/zsh_completion/_firejail $(DESTDIR)$(datarootdir)/zsh/site-functions/
166
167install: all
168 $(MAKE) realinstall
169
170install-strip: all
171 strip $(ALL_ITEMS)
172 $(MAKE) realinstall
173
174uninstall:
175 rm -f $(DESTDIR)$(bindir)/firejail
176 rm -f $(DESTDIR)$(bindir)/firemon
177 rm -f $(DESTDIR)$(bindir)/firecfg
178 rm -fr $(DESTDIR)$(libdir)/firejail
179 rm -fr $(DESTDIR)$(libdir)/jailcheck
180 rm -fr $(DESTDIR)$(datarootdir)/doc/firejail
181 for man in $(MANPAGES); do \
182 rm -f $(DESTDIR)$(mandir)/man5/$$man*; \
183 rm -f $(DESTDIR)$(mandir)/man1/$$man*; \
184 done
185 rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firejail
186 rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firemon
187 rm -f $(DESTDIR)$(datarootdir)/bash-completion/completions/firecfg
188 @echo "If you want to install a different version of firejail, you might also need to run 'rm -fr $(DESTDIR)$(sysconfdir)/firejail', see #2038."
189
190DISTFILES = \
191COPYING \
192Makefile.in \
193README \
194RELNOTES \
195config.mk.in \
196config.sh.in \
197configure \
198configure.ac \
199contrib \
200etc \
201install.sh \
202m4 \
203mkdeb.sh.in \
204mketc.sh \
205mkman.sh \
206platform \
207src
208
209DISTFILES_TEST = test/Makefile.in test/apps test/apps-x11 test/apps-x11-xorg test/root test/private-lib test/fnetfilter test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/fs test/sysutils test/chroot
210
211dist:
212 mv config.sh config.sh.old
213 mv config.status config.status.old
214 mv mkdeb.sh mkdeb.sh.old
215 make distclean
216 mv mkdeb.sh.old mkdeb.sh
217 mv config.status.old config.status
218 mv config.sh.old config.sh
219 rm -fr $(NAME)-$(VERSION) $(NAME)-$(VERSION).tar.xz
220 mkdir -p $(NAME)-$(VERSION)/test
221 cp -a $(DISTFILES) $(NAME)-$(VERSION)
222 cp -a $(DISTFILES_TEST) $(NAME)-$(VERSION)/test
223 rm -rf $(NAME)-$(VERSION)/src/tools
224 find $(NAME)-$(VERSION) -name .svn -delete
225 tar -cJvf $(NAME)-$(VERSION).tar.xz $(NAME)-$(VERSION)
226 rm -fr $(NAME)-$(VERSION)
227
228asc:; ./mkasc.sh $(VERSION)
229
230deb: dist
231 ./mkdeb.sh
232
233deb-apparmor: dist
234 ./mkdeb.sh -apparmor --enable-apparmor
235
236test-compile: dist
237 cd test/compile; ./compile.sh $(NAME)-$(VERSION)
238
239.PHONY: rpms
240rpms: src/man
241 ./platform/rpm/mkrpm.sh $(NAME) $(VERSION)
242
243extras: all
244 $(MAKE) -C extras/firetools
245
246cppcheck: clean
247 cppcheck --force --error-exitcode=1 --enable=warning,performance .
248
249scan-build: clean
250 NO_EXTRA_CFLAGS="yes" scan-build make
251
252#
253# make test
254#
255
256TESTS=profiles private-lib apps apps-x11 apps-x11-xorg sysutils utils environment filters fs fcopy fnetfilter
257TEST_TARGETS=$(patsubst %,test-%,$(TESTS))
258
259$(TEST_TARGETS):
260 $(MAKE) -C test $(subst test-,,$@)
261
262test: test-profiles test-private-lib test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters
263 echo "TEST COMPLETE"
264
265test-noprofiles: test-private-lib test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters
266 echo "TEST COMPLETE"
267
268test-github: test-profiles test-fcopy test-fnetfilter test-fs test-utils test-sysutils test-environment
269 echo "TEST COMPLETE"
270
271##########################################
272# Individual tests, some of them require root access
273# The tests are very intrusive, by the time you are done
274# with them you will need to restart your computer.
275##########################################
276
277# a firejail-test account is required, public/private key setup
278test-ssh:
279 $(MAKE) -C test $(subst test-,,$@)
280
281# requires root access
282test-chroot:
283 $(MAKE) -C test $(subst test-,,$@)
284
285# Huge appimage files, not included in "make dist" archive
286test-appimage:
287 $(MAKE) -C test $(subst test-,,$@)
288
289# Root access, network devices are created before the test
290# restart your computer to get rid of these devices
291test-network:
292 $(MAKE) -C test $(subst test-,,$@)
293
294# requires the same setup as test-network
295test-stress:
296 $(MAKE) -C test $(subst test-,,$@)
297
298# Tests running a root user
299test-root:
300 $(MAKE) -C test $(subst test-,,$@)
301
302# OverlayFS is not available on all platforms
303test-overlay:
304 $(MAKE) -C test $(subst test-,,$@)
305
306# For testing hidepid system, the command to set it up is "mount -o remount,rw,hidepid=2 /proc"
307
308test-all: test-root test-chroot test-network test-appimage test-overlay
309 echo "TEST COMPLETE"