I have a library written in C ++, but not using the stdC ++ library, because it is not available on some platforms.
However, I still have a dependency of the stdC ++ library in my libsmartrest.la, which does not allow linking all libraries depending on this library.
Here is my configure.ac and Makefile.am:
AC_INIT([Cumulocity SmartREST C++ Library], [1.0.0], [support@cumulocity.com], [libsmartrest], [https:
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
AC_PROG_CXX
AM_PROG_AR([act-if-fail])
LT_INIT
AC_TYPE_SIZE_T
AC_CHECK_FUNCS([strerror])
AC_FUNC_MALLOC
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
dnl Print configuration summary
cat <<EOF
=====================
$PACKAGE_NAME (version $PACKAGE_VERSION) is now configured.
You can now build, test and install $PACKAGE_NAME using the Makefile, by calling
\$ make
\$ make check
\$ make install
EOF
Makefile.am:
ACLOCAL_AMFLAGS = -I m4
lib_LTLIBRARIES = libsmartrest.la
libsmartrest_la_SOURCES = \
src/Aggregator.cpp\
src/CharValue.cpp\
src/FloatValue.cpp\
src/IntegerValue.cpp\
src/NullValue.cpp\
src/Parser.cpp\
src/ParsedRecord.cpp\
src/ParsedValue.cpp\
src/SmartRest.cpp\
src/Record.cpp\
src/ComposedRecord.cpp\
src/StaticData.cpp
libsmartrest_la_CXXFLAGS = -fPIC -Wall -Wextra -Wno-deprecated
libsmartrest_la_LDFLAGS = -version-info 1:0:0
libsmartrest_hdir = $(includedir)/smartrest
libsmartrest_h_HEADERS = \
src/AbstractClient.h\
src/AbstractDataSink.h\
src/AbstractDataSource.h\
src/Aggregator.h\
src/CharValue.h\
src/DataGenerator.h\
src/FloatValue.h\
src/IntegerValue.h\
src/NullValue.h\
src/Parser.h\
src/ParsedRecord.h\
src/ParsedValue.h\
src/SmartRest.h\
src/Record.h\
src/ComposedRecord.h\
src/StaticData.h\
src/Value.h
EXTRA_DIST = README \
LICENSE
TESTS = $(check_PROGRAMS)
check_PROGRAMS = values parser client
values_SOURCES = \
test/values/mainvalues.cpp\
test/mock/BufferedDataSink.cpp\
test/values/CharValueTest.cpp\
test/values/ParsedValueTest.cpp\
test/values/AggregatorTest.cpp\
test/values/IntegerValueTest.cpp\
test/values/FloatValueTest.cpp\
test/values/ComposedRecordTest.cpp
values_CXXFLAGS = -Wall -Wextra -I$(srcdir)/src
values_LDADD = -lsmartrest
parser_SOURCES = \
test/parser/mainparser.cpp\
test/mock/BufferedDataSource.cpp\
test/parser/ParserTest.cpp
parser_CXXFLAGS = -Wall -Wextra -I$(srcdir)/src
parser_LDADD = -lsmartrest
client_SOURCES = \
test/client/mainclient.cpp\
test/client/SmartRestTest.cpp\
test/mock/BufferedDataSource.cpp\
test/mock/BufferedDataSink.cpp\
test/mock/MockClient.cpp\
test/mock/MockSmartRest.cpp
client_CXXFLAGS = -Wall -Wextra -I$(srcdir)/src
client_LDADD = -lsmartrest
Compiling on my desktop system is going well. However, I get this in my .la file:
dependency_libs=' -L/home/ec2-user/SDK_Bovine_ntc_6200/libstage/lib /home/mattf/src/buildbot/sandbox/slave/release_ntc_6200/build/Bovine_src/staging_sdk/SDK_Bovine_ntc_6200/compiler/arm-cdcs-linux-gnueabi/lib/libstdc++.la'
Can someone tell me how to remove this dependency?
source
share