Add a vpp-dpdk-dev package, enable plugins to use dpdk APIs directly
[vpp.git] / build-data / platforms.mk
1 # Copyright (c) 2015 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 # Pick up per-platform makefile fragments
15 $(foreach d,$(SOURCE_PATH_BUILD_DATA_DIRS),     \
16   $(eval -include $(d)/platforms/*.mk))
17
18 .PHONY: install-deb
19 install-deb: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
20         @$(BUILD_ENV) ;                                                 \
21         set -eu$(BUILD_DEBUG) ;                                         \
22         $(MAKE) -C $(MU_BUILD_ROOT_DIR)                                 \
23             $(patsubst %,%-install,                                     \
24               $(ROOT_PACKAGES)) || exit 1;                              \
25                                                                         \
26         : generate file manifests ;                                     \
27         find $(INSTALL_PREFIX)$(ARCH)/*/bin -type f -print              \
28           | sed -e 's:.*:../& /usr/bin:'                                \
29             > deb/debian/vpp.install ;                                  \
30         find $(INSTALL_PREFIX)$(ARCH)/*/lib*  -type f -print            \
31           | egrep -e '*\.so\.*\.*\.*'                                   \
32           | sed -e 's:.*:../& /usr/lib/x86_64-linux-gnu:'               \
33             > deb/debian/vpp-lib.install ;                              \
34                                                                         \
35         : dev package ;                                                 \
36         ./scripts/find-dev-contents $(INSTALL_PREFIX)$(ARCH)            \
37          deb/debian/vpp-dev.install ;                                   \
38                                                                         \
39         : dpdk headers ;                                                \
40         ./scripts/find-dpdk-contents $(INSTALL_PREFIX)$(ARCH)           \
41          deb/debian/vpp-dpdk-dev.install ;                              \
42                                                                         \
43         : bin package needs startup config ;                            \
44         echo ../../vpp/conf/startup.conf /etc/vpp                       \
45            >> deb/debian/vpp.install ;                                  \
46                                                                         \
47         : and sysctl config ;                                           \
48         echo ../../vpp/conf/80-vpp.conf /etc/sysctl.d                   \
49            >> deb/debian/vpp.install ;                                  \
50                                                                         \
51         : dev package needs a couple of additions ;                     \
52         echo ../build-tool-native/vppapigen/vppapigen /usr/bin          \
53            >> deb/debian/vpp-dev.install ;                              \
54                                                                         \
55         : generate changelog;                                           \
56         ./scripts/generate-deb-changelog                                \
57                                                                         \
58         : Go fabricate the actual Debian packages ;                     \
59         (                                                               \
60         cd deb &&                                                       \
61         dpkg-buildpackage -us -uc -b                                    \
62         )
63
64 .PHONY: install-rpm
65 install-rpm: $(patsubst %,%-find-source,$(ROOT_PACKAGES))
66         @$(BUILD_ENV) ;                                                 \
67         set -eu$(BUILD_DEBUG) ;                                         \
68         $(MAKE) -C $(MU_BUILD_ROOT_DIR)                                 \
69             $(patsubst %,%-install,                                     \
70               $(ROOT_PACKAGES)) || exit 1;                              \
71                                                                         \
72         cd rpm ;                                                        \
73         rpmbuild -bb --define "_topdir $$PWD"  vpp.spec ;               \
74         mv $$(find RPMS -name \*.rpm -type f) ..
75