mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-10-04 07:57:45 +00:00
build: clean AM_CFLAGS and AM_CPPFLAGS usage around
also set commont include dirs. fPIC and DPIC are automatically detected and added as required by libtool. We don't need to carry it around. Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com> Reviewed-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
parent
fa92e4068a
commit
bb5946babb
@ -31,10 +31,6 @@
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
AM_CFLAGS = -fPIC \
|
||||
-I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/include
|
||||
|
||||
lib_LTLIBRARIES = libcorosync_common.la
|
||||
|
||||
libcorosync_common_la_SOURCES = error_conversion.c
|
||||
|
@ -536,12 +536,16 @@ if test "x${enable_user_flags}" = xyes; then
|
||||
EXTRA_WARNINGS=""
|
||||
fi
|
||||
|
||||
# define global include dirs
|
||||
INCLUDE_DIRS="$INCLUDE_DIRS -I\$(top_builddir)/include -I\$(top_srcdir)/include"
|
||||
INCLUDE_DIRS="$INCLUDE_DIRS -I\$(top_builddir)/include/corosync -I\$(top_srcdir)/include/corosync"
|
||||
|
||||
# final build of *FLAGS
|
||||
CFLAGS="$ENV_CFLAGS $OPT_CFLAGS $GDB_FLAGS \
|
||||
$COVERAGE_CFLAGS $EXTRA_WARNINGS \
|
||||
$WERROR_CFLAGS $NSS_CFLAGS $LIBQB_CFLAGS \
|
||||
$SNMP_INCLUDES"
|
||||
CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS"
|
||||
CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS $INCLUDE_DIRS"
|
||||
LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS"
|
||||
|
||||
# substitute what we need:
|
||||
|
@ -62,12 +62,6 @@ shm_leak_audit.sh: shm_leak_audit.sh.in
|
||||
sed -e 's#@''BASHPATH@#${BASHPATH}#g' $< > $@
|
||||
chmod 755 $@
|
||||
|
||||
AM_CPPFLAGS = -I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/include/corosync
|
||||
|
||||
AM_CFLAGS = -fPIC
|
||||
|
||||
cpg_test_agent_SOURCES = cpg_test_agent.c common_test_agent.c
|
||||
cpg_test_agent_CFLAGS = $(nss_CFLAGS)
|
||||
cpg_test_agent_LDADD = $(LIBQB_LIBS) $(nss_LIBS) \
|
||||
|
@ -31,13 +31,6 @@
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
AM_CFLAGS = -fPIC
|
||||
|
||||
AM_CPPFLAGS = -DLOGCONFIG_USE_ICMAP=1 \
|
||||
-I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/include \
|
||||
$(nss_CFLAGS) $(rdmacm_CFLAGS) $(ibverbs_CFLAGS)
|
||||
|
||||
noinst_HEADERS = apidef.h cs_queue.h logconfig.h main.h \
|
||||
quorum.h service.h timer.h totemconfig.h \
|
||||
totemmrp.h totemnet.h totemudp.h totemiba.h \
|
||||
@ -55,6 +48,7 @@ endif
|
||||
|
||||
lib_LTLIBRARIES = libtotem_pg.la
|
||||
libtotem_pg_la_SOURCES = $(TOTEM_SRC)
|
||||
libtotem_pg_la_CFLAGS = $(nss_CFLAGS) $(rdmacm_CFLAGS) $(ibverbs_CFLAGS)
|
||||
libtotem_pg_la_LDFLAGS = -version-number $(subst .,:,$(SONAME))
|
||||
libtotem_pg_la_LIBADD = -lpthread $(nss_LIBS) $(rdmacm_LIBS) $(ibverbs_LIBS)
|
||||
|
||||
@ -74,9 +68,11 @@ if BUILD_WATCHDOG
|
||||
corosync_SOURCES += wd.c
|
||||
endif
|
||||
|
||||
corosync_CPPFLAGS = -DLOGCONFIG_USE_ICMAP=1
|
||||
|
||||
corosync_LDADD = libtotem_pg.la ../common_lib/libcorosync_common.la \
|
||||
$(LIBQB_LIBS) $(statgrab_LIBS)
|
||||
corosync_DEPENDENCIES = libtotem_pg.la ../common_lib/libcorosync_common.la
|
||||
|
||||
lint:
|
||||
-splint $(AM_CPPFLAGS) $(LINT_FLAGS) $(CFLAGS) *.c
|
||||
-splint $(LINT_FLAGS) $(CPPFLAGS) $(CFLAGS) *.c
|
||||
|
@ -47,11 +47,6 @@ EXTRA_DIST = libcfg.versions libcfg.verso \
|
||||
|
||||
noinst_HEADERS = util.h
|
||||
|
||||
AM_CPPFLAGS = -I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/include
|
||||
|
||||
AM_CFLAGS = -fPIC
|
||||
|
||||
# override global LIBS that pulls in lots of craft we don't need here
|
||||
LIBS = -version-number $(call get_soname,$<) \
|
||||
-Wl,-version-script=$(srcdir)/lib$(call get_libname,$<).versions \
|
||||
|
@ -41,12 +41,6 @@ noinst_PROGRAMS = cpgverify testcpg testcpg2 cpgbench \
|
||||
|
||||
noinst_SCRIPTS = ploadstart
|
||||
|
||||
AM_CPPFLAGS = -I$(top_builddir)/include/corosync \
|
||||
-I$(top_srcdir)/include \
|
||||
$(nss_CFLAGS)
|
||||
|
||||
AM_CFLAGS = -fPIC
|
||||
|
||||
testcpg_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la
|
||||
testcpg2_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la
|
||||
testcpgzc_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la
|
||||
@ -57,6 +51,7 @@ stress_cpgcontext_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la
|
||||
testquorum_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libquorum.la
|
||||
testvotequorum1_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libvotequorum.la
|
||||
testvotequorum2_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libvotequorum.la
|
||||
cpgverify_CPPFLAGS = $(nss_CFLAGS)
|
||||
cpgverify_LDADD = $(LIBQB_LIBS) $(nss_LIBS) $(top_builddir)/lib/libcpg.la
|
||||
cpgbound_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la
|
||||
cpgbench_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la
|
||||
@ -71,7 +66,7 @@ LINT_FILES1:=$(filter-out sa_error.c, $(wildcard *.c))
|
||||
LINT_FILES:=$(filter-out testparse.c, $(LINT_FILES1))
|
||||
|
||||
lint:
|
||||
-for f in $(LINT_FILES) ; do echo Splint $$f ; splint $(AM_CPPFLAGS) $(LINT_FLAGS) $(CFLAGS) $$f ; done
|
||||
-for f in $(LINT_FILES) ; do echo Splint $$f ; splint $(LINT_FLAGS) $(CPPFLAGS) $(CFLAGS) $$f ; done
|
||||
|
||||
clean-local:
|
||||
rm -f ploadstart
|
||||
|
@ -54,11 +54,6 @@ corosync-xmlproc: corosync-xmlproc.sh
|
||||
corosync-blackbox: corosync-blackbox.sh
|
||||
sed -e 's#@''LOCALSTATEDIR@#${localstatedir}#g' $< > $@
|
||||
|
||||
AM_CPPFLAGS = -I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/include/corosync \
|
||||
$(DBUS_CFLAGS)
|
||||
|
||||
corosync_cmapctl_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcmap.la
|
||||
|
||||
corosync_cfgtool_LDADD = $(LIBQB_LIBS) $(top_builddir)/lib/libcfg.la
|
||||
@ -72,13 +67,14 @@ corosync_quorumtool_LDADD = $(LIBQB_LIBS) \
|
||||
$(top_builddir)/lib/libquorum.la \
|
||||
$(top_builddir)/lib/libvotequorum.la
|
||||
|
||||
corosync_notifyd_CPPFLAGS = $(DBUS_CFLAGS)
|
||||
corosync_notifyd_LDADD = $(LIBQB_LIBS) $(DBUS_LIBS) $(SNMP_LIBS) \
|
||||
$(top_builddir)/lib/libcmap.la \
|
||||
$(top_builddir)/lib/libcfg.la \
|
||||
$(top_builddir)/lib/libquorum.la
|
||||
|
||||
lint:
|
||||
-splint $(LINT_FLAGS) $(DBUS_CFLAGS) $(AM_CPPFLAGS) $(CFLAGS) *.c
|
||||
-splint $(LINT_FLAGS) $(DBUS_CFLAGS) $(CPPFLAGS) $(CFLAGS) *.c
|
||||
|
||||
clean-local:
|
||||
rm -f corosync-xmlproc corosync-blackbox
|
||||
|
Loading…
Reference in New Issue
Block a user