Makefile.am cleanup

- remove unused stuff
 - add --quiet flag to libtool
 - avoid building some tests programs when tests are not enabled

Change-Id: Ie34aeec1a598ad811256a00354f66cfddae9d0b9
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2017-01-11 11:11:00 +01:00
committed by Dave Barach
parent 1c5ee872b1
commit 724f64ccf6
10 changed files with 12 additions and 143 deletions

View File

@ -66,7 +66,7 @@ Or, generate each file individually:
$ mkdir build $ mkdir build
$ cd build $ cd build
$ ../configure --with-plugin-toolkit $ ../configure
$ make $ make
$ sudo make install $ sudo make install

View File

@ -1,40 +0,0 @@
#!/bin/bash
set -eux
build_tarball() {
for dir in vppinfra dpdk svm vlib-api vlib vnet vpp vpp-api-test
do
tar -C install-$1/$dir/include -cf - . | tar -C $tmp_dir/include -xf -
done
tar -C ../sample-plugin -cf - . \
| tar -C $tmp_dir/src/sample-plugin -xf -
cp tools/bin/vppapigen $tmp_dir/tools/bin
echo Created by `id -u -n` on `hostname` at `date` > \
$tmp_dir/toolkit-version-stamp
cp scripts/vpp-plugin-toolkit-readme $tmp_dir/README
tar -C $tmp_dir -zcf $PWD/vpp-plugin-toolkit-$1.tar.gz .
}
if [ `basename $PWD` != "build-root" ] ; then
echo Please run this script from build-root
exit 1
fi
echo Pull additional tookit repos
make PLATFORM=vpp sample-plugin-find-source
make PLATFORM=vpp TAG=vpp wipe-all
echo Build vpp forwarder production package
make PLATFORM=vpp TAG=vpp strip_sumbols=yes install-packages
tmp_dir="`mktemp -d /tmp/plugin-XXXXXX`"
trap "rm -rf $tmp_dir" err
echo Create vpp forwarder production plugin toolkit tarball
mkdir -p $tmp_dir/tools/bin $tmp_dir/include $tmp_dir/lib64 \
$tmp_dir/src/sample-plugin
build_tarball vpp-native
rm -rf $tmp_dir
exit 0

View File

@ -17,6 +17,7 @@
AUTOMAKE_OPTIONS = foreign subdir-objects AUTOMAKE_OPTIONS = foreign subdir-objects
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
AM_LIBTOOLFLAGS = --quiet
AM_CFLAGS = -Wall AM_CFLAGS = -Wall

View File

@ -16,6 +16,7 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir} AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir}
AM_LDFLAGS = -module -shared -avoid-version AM_LDFLAGS = -module -shared -avoid-version
AM_LIBTOOLFLAGS = --quiet
SUFFIXES = .api.h .api .api.json SUFFIXES = .api.h .api .api.json
API_FILES = API_FILES =
BUILT_SOURCES = BUILT_SOURCES =

View File

@ -11,8 +11,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
lib_LTLIBRARIES += libvnet.la
libvnet_la_SOURCES = libvnet_la_SOURCES =
libvnetplugin_la_SOURCES =
libvnet_la_LIBADD = libvppinfra.la libsvm.la libvnet_la_LIBADD = libvppinfra.la libsvm.la
libvnet_la_DEPENDENCIES = libvppinfra.la libvlib.la libsvmdb.la libsvm.la libvlibapi.la libvlibmemory.la libvlibmemoryclient.la libvnet_la_DEPENDENCIES = libvppinfra.la libvlib.la libsvmdb.la libsvm.la libvlibapi.la libvlibmemory.la libvlibmemoryclient.la
@ -966,15 +967,9 @@ nobase_include_HEADERS += \
# Plugin client library # Plugin client library
######################################## ########################################
libvnetplugin_la_SOURCES += \
vnet/plugin/p1.c
nobase_include_HEADERS += \ nobase_include_HEADERS += \
vnet/plugin/plugin.h vnet/plugin/plugin.h
libvnetdir = ${libdir}
libvnet_LTLIBRARIES = libvnet.la libvnetplugin.la
pcap2pg_SOURCES = \ pcap2pg_SOURCES = \
vnet/unix/pcap2pg.c \ vnet/unix/pcap2pg.c \
vnet/unix/pcap.h vnet/unix/pcap.h

View File

@ -1,52 +0,0 @@
/*
* Copyright (c) 2015 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* This file and in fact the entire directory shouldn't even exist.
*
* Unfortunately, various things malfunction when we try to go there.
* Plugin DLL's end up with their own copies of critical
* data structures. No one of these problems would be tough to fix,
* but there are quite a number of them.
*/
/*
* Make certain that plugin .dll's which reference the following functions
* can find them...
*/
#if DPDK > 0
#define foreach_dpdk_plugin_reference \
_(rte_calloc) \
_(rte_free) \
_(rte_malloc) \
_(rte_zmalloc) \
_(rte_malloc_virt2phy) \
_(rte_eal_get_configuration)
#else
#define foreach_dpdk_plugin_reference
#endif
#define _(a) void a (void);
foreach_dpdk_plugin_reference
#undef _
void *vnet_library_plugin_references[] =
{
#define _(a) &a,
foreach_dpdk_plugin_reference
#undef _
};
void vnet_library_plugin_reference(void) { }

View File

@ -13,6 +13,7 @@
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
AM_LIBTOOLFLAGS = --quiet
AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir} \ AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir} \
-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \ -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \

View File

@ -13,6 +13,7 @@
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
AM_LIBTOOLFLAGS = --quiet
AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir} AM_CFLAGS = -Wall -I${top_srcdir} -I${top_builddir}
BUILT_SOURCES = BUILT_SOURCES =
@ -48,6 +49,7 @@ install-exec-local:
# #
# Test client # Test client
# #
if ENABLE_TESTS
noinst_PROGRAMS += test_pneum noinst_PROGRAMS += test_pneum
test_pneum_SOURCES = pneum/pneum.c pneum/test_pneum.c test_pneum_SOURCES = pneum/pneum.c pneum/test_pneum.c
test_pneum_LDADD = \ test_pneum_LDADD = \
@ -56,5 +58,4 @@ test_pneum_LDADD = \
$(top_builddir)/libvlibapi.la \ $(top_builddir)/libvlibapi.la \
$(top_builddir)/libsvm.la \ $(top_builddir)/libsvm.la \
-lpthread -lm -lrt -lpthread -lm -lrt
endif

View File

@ -68,39 +68,6 @@ VPP_VERSION = $(shell $(srcdir)/scripts/version)
echo "#define VPP_BUILD_VER \"$(VPP_VERSION)\"" >> $$f ;\ echo "#define VPP_BUILD_VER \"$(VPP_VERSION)\"" >> $$f ;\
fi fi
# Generate a plugin configuration script. Misconfiguring a
# plugin can cause very subtle problems.
bin_SCRIPTS = vpp_plugin_configure
BUILT_SOURCES += vpp_plugin_configure
.PHONY: vpp_plugin_configure
if WITH_DPDK
PLUGIN_DPDK_ARG="--with-dpdk"
else
PLUGIN_DPDK_ARG=""
endif
vpp_plugin_configure:
@echo "PLUGIN CFG" $@
@echo "#!/bin/bash" > $@
@echo " " >> $@
@echo "set +eu" >> $@
@echo " " >> $@
@echo "if [ -f ./configure ] ; then" >> $@
@echo " CFLAGS='$(CFLAGS) $(AM_CFLAGS) -I/usr/include/vpp-dpdk' ./configure --with-plugin-toolkit $(PLUGIN_DPDK_ARG)" >> $@
@echo "else" >> $@
@echo " if [ -f ../configure ] ; then" >> $@
@echo " CFLAGS='$(CFLAGS) $(AM_CFLAGS) -I/usr/include/vpp-dpdk' ../configure --with-plugin-toolkit $(PLUGIN_DPDK_ARG)" >> $@
@echo " else" >> $@
@echo " echo Couldnt find ./configure or ../configure " >> $@
@echo " exit 1" >> $@
@echo " fi" >> $@
@echo "fi" >> $@
bin_vpp_LDADD = \ bin_vpp_LDADD = \
libvlibapi.la \ libvlibapi.la \
libvlibmemory.la \ libvlibmemory.la \
@ -108,12 +75,12 @@ bin_vpp_LDADD = \
libvnet.la \ libvnet.la \
libsvm.la \ libsvm.la \
libsvmdb.la \ libsvmdb.la \
libvnetplugin.la \
-lrt -lrt
bin_vpp_LDFLAGS = $(DPDK_LD_FLAGS) bin_vpp_LDFLAGS = $(DPDK_LD_FLAGS)
bin_vpp_LDADD += libvppinfra.la -lm -lpthread -ldl $(DPDK_LD_ADD) bin_vpp_LDADD += libvppinfra.la -lm -lpthread -ldl $(DPDK_LD_ADD)
if ENABLE_TESTS
noinst_PROGRAMS += bin/test_client noinst_PROGRAMS += bin/test_client
bin_test_client_SOURCES = \ bin_test_client_SOURCES = \
@ -138,6 +105,7 @@ bin_test_ha_LDADD = \
libsvm.la \ libsvm.la \
libvppinfra.la \ libvppinfra.la \
-lpthread -lm -lrt -lpthread -lm -lrt
endif
noinst_PROGRAMS += bin/summary_stats_client noinst_PROGRAMS += bin/summary_stats_client

View File

@ -11,13 +11,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
libvppinfradir = ${libdir} lib_LTLIBRARIES += libvppinfra.la
if WITH_UNIX
libvppinfra_LTLIBRARIES = libvppinfra.la
endif
lib_LIBRARIES =
TESTS = TESTS =