OLD | NEW |
1 #!/usr/bin/make -f | 1 #!/usr/bin/make -f |
2 # -*- makefile -*- | 2 # -*- makefile -*- |
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Uncomment this to turn on verbose mode. | 7 # Uncomment this to turn on verbose mode. |
8 #export DH_VERBOSE=1 | 8 #export DH_VERBOSE=1 |
9 | 9 |
10 # The number of jobs to pass to tools that can run in parallel (such as make | 10 # The number of jobs to pass to tools that can run in parallel (such as make |
11 # and dpkg-buildpackage | 11 # and dpkg-buildpackage |
12 NUM_JOBS=`cat /proc/cpuinfo | grep processor | awk '{a++} END {print a}'` | 12 NUM_JOBS=`cat /proc/cpuinfo | grep processor | awk '{a++} END {print a}'` |
13 | 13 |
14 build: build-stamp | 14 build: build-stamp |
15 build-stamp: | 15 build-stamp: |
16 dh_testdir | 16 dh_testdir |
17 » scons -j$(NUM_JOBS) minijail libminijail.so | 17 » scons -j$(NUM_JOBS) minijail libminijail.so minijail_benchmarks |
18 touch $@ | 18 touch $@ |
19 | 19 |
20 clean: | 20 clean: |
21 dh_testdir | 21 dh_testdir |
22 dh_testroot | 22 dh_testroot |
23 rm -f build-stamp | 23 rm -f build-stamp |
24 scons -c | 24 scons -c |
25 dh_clean | 25 dh_clean |
26 | 26 |
27 install: build | 27 install: build |
28 dh_testdir | 28 dh_testdir |
29 dh_testroot | 29 dh_testroot |
30 dh_prep | 30 dh_prep |
31 dh_installdirs | 31 dh_installdirs |
32 mkdir -p $(CURDIR)/debian/chromeos-minijail/lib/security | 32 mkdir -p $(CURDIR)/debian/chromeos-minijail/lib/security |
33 # TODO(wad) add versioning to minijail to match the package version. | 33 # TODO(wad) add versioning to minijail to match the package version. |
34 cp $(CURDIR)/libminijail.so $(CURDIR)/debian/chromeos-minijail/lib/libm
inijail.so | 34 cp $(CURDIR)/libminijail.so $(CURDIR)/debian/chromeos-minijail/lib/libm
inijail.so |
35 mkdir -p $(CURDIR)/debian/chromeos-minijail/sbin | 35 mkdir -p $(CURDIR)/debian/chromeos-minijail/sbin |
36 cp $(CURDIR)/minijail $(CURDIR)/debian/chromeos-minijail/sbin/minijail | 36 cp $(CURDIR)/minijail $(CURDIR)/debian/chromeos-minijail/sbin/minijail |
| 37 # TODO(wad) make a separate benchmarks package since we don't need |
| 38 # them on every install. |
| 39 mkdir -p $(CURDIR)/debian/chromeos-minijail/usr/share/chromeos-minijail |
| 40 cp $(CURDIR)/minijail_benchmarks $(CURDIR)/debian/chromeos-minijail/usr
/share/chromeos-minijail/minijail_benchmarks |
37 | 41 |
38 # Build architecture-dependent files here. | 42 # Build architecture-dependent files here. |
39 binary-arch: install | 43 binary-arch: install |
40 dh_testdir | 44 dh_testdir |
41 dh_testroot | 45 dh_testroot |
42 dh_link | 46 dh_link |
43 dh_strip | 47 dh_strip |
44 dh_compress | 48 dh_compress |
45 dh_fixperms | 49 dh_fixperms |
46 dh_installdeb | 50 dh_installdeb |
47 dh_shlibdeps | 51 dh_shlibdeps |
48 dh_gencontrol | 52 dh_gencontrol |
49 dh_md5sums | 53 dh_md5sums |
50 dh_builddeb | 54 dh_builddeb |
51 | 55 |
52 binary: binary-arch | 56 binary: binary-arch |
53 | 57 |
54 .PHONY: build clean install binary-arch binary | 58 .PHONY: build clean install binary-arch binary |
OLD | NEW |