Build fix for *NIX.

This commit is contained in:
Gunnar Beutner 2012-04-13 11:32:19 +02:00
parent d5be7a0b4f
commit 27d008f1ce
19 changed files with 58 additions and 34 deletions

View File

@ -5,9 +5,10 @@ SUBDIRS = ltdl \
base \
cJSON \
jsonrpc \
libicinga \
icinga \
configfilecomponent \
configrpccomponent \
icinga
configrpccomponent
icinga2docdir = ${prefix}/doc/icinga2
icinga2doc_DATA = \
@ -50,4 +51,4 @@ dist-hook: icinga-version.stamp
if test -f "icinga-version.h"; then \
$(SED) -e 's|^#undef GIT_IS_DIST.*|#define GIT_IS_DIST 1|' \
"icinga-version.h" > "$(distdir)/icinga-version.h"; \
fi
fi

View File

@ -1,17 +1,17 @@
## Process this file with automake to produce Makefile.in
pkglib_LTLIBRARIES = \
libconfigfilecomponent.la
configfilecomponent.la
libconfigfilecomponent_la_SOURCES = \
configfilecomponent_la_SOURCES = \
configfilecomponent.cpp \
configfilecomponent.h \
i2-configfilecomponent.h
libconfigfilecomponent_la_CXXFLAGS = -I${top_srcdir}/base \
configfilecomponent_la_CXXFLAGS = -I${top_srcdir}/base \
-I${top_srcdir}/jsonrpc \
-I${top_srcdir}/cJSON
libconfigfilecomponent_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined
libconfigfilecomponent_la_LIBADD = ${top_builddir}/base/libbase.la \
${top_builddir}/cJSON/libcJSON.la
configfilecomponent_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined
configfilecomponent_la_LIBADD = ${top_builddir}/base/libbase.la \
${top_builddir}/cJSON/libcJSON.la

View File

@ -1,20 +1,20 @@
## Process this file with automake to produce Makefile.in
pkglib_LTLIBRARIES = \
libconfigrpccomponent.la
configrpccomponent.la
libconfigrpccomponent_la_SOURCES = \
configrpccomponent_la_SOURCES = \
configrpccomponent.cpp \
configrpccomponent.h \
i2-configrpccomponent.h
libconfigrpccomponent_la_CXXFLAGS = -I${top_srcdir}/base \
configrpccomponent_la_CXXFLAGS = -I${top_srcdir}/base \
-I${top_srcdir}/jsonrpc \
-I${top_srcdir}/cJSON \
-I${top_srcdir}/icinga
-I${top_srcdir}/libicinga
libconfigrpccomponent_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined -pthread
libconfigrpccomponent_la_LIBADD = ${top_builddir}/base/libbase.la \
configrpccomponent_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined -pthread
configrpccomponent_la_LIBADD = ${top_builddir}/base/libbase.la \
${top_builddir}/jsonrpc/libjsonrpc.la \
${top_builddir}/cJSON/libcJSON.la \
${top_builddir}/icinga/icinga
${top_builddir}/libicinga/libicinga.la

View File

@ -46,6 +46,7 @@ base/Makefile
cJSON/Makefile
configfilecomponent/Makefile
configrpccomponent/Makefile
libicinga/Makefile
icinga/Makefile
jsonrpc/Makefile

View File

@ -5,25 +5,17 @@ bin_PROGRAMS = \
icinga
icinga_SOURCES = \
endpoint.cpp \
endpoint.h \
endpointmanager.cpp \
endpointmanager.h \
icingaapplication.cpp \
icingaapplication.h \
i2-icinga.h \
jsonrpcendpoint.cpp \
jsonrpcendpoint.h \
virtualendpoint.cpp \
virtualendpoint.h
icinga.cpp
icinga_CFLAGS = -DI2_ICINGA_BUILD
icinga_CFLAGS = -DI2_ICINGALAUNCHER_BUILD
icinga_CXXFLAGS = -DI2_ICINGA_BUILD -I${top_srcdir}/base \
icinga_CXXFLAGS = -DI2_ICINGALAUNCHER_BUILD -I${top_srcdir}/base \
-I${top_srcdir}/jsonrpc \
-I${top_srcdir}/cJSON \
-I${top_srcdir}/libicinga \
-I${top_srcdir}
icinga_LDFLAGS = $(top_builddir)/jsonrpc/libjsonrpc.la \
icinga_LDFLAGS = $(top_builddir)/libicinga/libicinga.la \
$(top_builddir)/jsonrpc/libjsonrpc.la \
$(top_builddir)/base/libbase.la \
${top_builddir}/cJSON/libcJSON.la
${top_builddir}/cJSON/libcJSON.la

3
icinga/icinga.cpp Normal file
View File

@ -0,0 +1,3 @@
#include <i2-icinga.h>
SET_START_CLASS(icinga::IcingaApplication);

29
libicinga/Makefile.am Normal file
View File

@ -0,0 +1,29 @@
## Process this file with automake to produce Makefile.in
pkglib_LTLIBRARIES = \
libicinga.la
libicinga_la_SOURCES = \
endpoint.cpp \
endpoint.h \
endpointmanager.cpp \
endpointmanager.h \
icingaapplication.cpp \
icingaapplication.h \
i2-icinga.h \
jsonrpcendpoint.cpp \
jsonrpcendpoint.h \
virtualendpoint.cpp \
virtualendpoint.h
libicinga_la_CFLAGS = -DI2_ICINGA_BUILD
libicinga_la_CXXFLAGS = -DI2_ICINGA_BUILD -I${top_srcdir}/base \
-I${top_srcdir}/jsonrpc \
-I${top_srcdir}/cJSON \
-I${top_srcdir}
libicinga_la_LDFLAGS = $(top_builddir)/jsonrpc/libjsonrpc.la \
$(top_builddir)/base/libbase.la \
${top_builddir}/cJSON/libcJSON.la

View File

@ -85,7 +85,7 @@ int IcingaApplication::NewComponentHandler(ConfigObjectEventArgs::Ptr ea)
#ifdef _WIN32
path = object->GetName() + ".dll";
#else /* _WIN32 */
path = "lib" + object->GetName() + ".la";
path = object->GetName() + ".la";
#endif /* _WIN32 */
// TODO: try to figure out where the component is located */
@ -152,5 +152,3 @@ int IcingaApplication::DeletedRpcConnectionHandler(ConfigObjectEventArgs::Ptr ea
return 0;
}
SET_START_CLASS(icinga::IcingaApplication);