AC_FUNC_MALLOC
AC_CHECK_FUNCS([gettimeofday munmap socket strerror strtol sched_getcpu sysconf])
-CFLAGS="-Wall $CFLAGS"
-
# URCU
# urcu - check if we just find the headers it out of the box.
AX_JNI_INCLUDE_DIR
for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
do
- CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
+ JNI_CPPFLAGS="$JNI_CPPFLAGS -I$JNI_INCLUDE_DIR"
done
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $JNI_CPPFLAGS"
AX_PROG_JAVAH
+ CPPFLAGS="$saved_CPPFLAGS"
])
AS_IF([test "x$java_agent_log4j" = "xyes"], [
_AC_DEFINE_AND_SUBST([LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS], [3000])
+AM_CFLAGS="-Wall"
+AC_SUBST(AM_CFLAGS)
+AC_SUBST(JNI_CPPFLAGS)
+
AC_CONFIG_FILES([
Makefile
doc/Makefile
rel_build_subdir="../"; \
fi; \
for subdir in $(SUBDIRS_PROXY); do \
- (cd $$subdir && $(MAKE) AM_CC="$(CC)" AM_CPPFLAGS="$(CPPFLAGS) -I$$rel_src_subdir$(top_srcdir)/include/ -I$$rel_build_subdir$(top_builddir)/include/" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../liblttng-ust/.libs -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
+ (cd $$subdir && $(MAKE) CC="$(CC)" CPPFLAGS="$(CPPLAGS)" AM_CPPFLAGS="$(AM_CPPFLAGS) -I$$rel_src_subdir$(top_srcdir)/include/ -I$$rel_build_subdir$(top_builddir)/include/" CFLAGS='$(CFLAGS)' AM_CFLAGS='$(AM_CFLAGS)' LDFLAGS="$(LDFLAGS)" AM_LDFLAGS='$(AM_LDFLAGS) -L../../../liblttng-ust/.libs -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
done; \
if [ x"$(SUBDIRS_JUL)" != x"" ]; then \
for subdir in $(SUBDIRS_JUL); do \
cmake \
-DCMAKE_INCLUDE_PATH="$(abs_top_srcdir)/include;$(abs_top_builddir)/include" \
-DCMAKE_LIBRARY_PATH="$(abs_top_builddir)/liblttng-ust/.libs" \
- -DCMAKE_C_FLAGS="$(CFLAGS) $(CPPFLAGS)" \
- -DCMAKE_CXX_FLAGS="$(CXXFLAGS) $(CPPFLAGS)" \
- -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" \
+ -DCMAKE_C_FLAGS="$(AM_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)" \
+ -DCMAKE_CXX_FLAGS="$(AM_CXXFLAGS) $(AM_CPPFLAGS) $(CXXFLAGS) $(CPPFLAGS)" \
+ -DCMAKE_EXE_LINKER_FLAGS="$(AM_LDFLAGS) $(LDFLAGS)" \
.. && \
$(MAKE) && \
cd .. \
#
# This makefile is purposefully kept simple to support GNU and BSD make.
-ifdef AM_CC
- CC = $(AM_CC)
-endif
-
LIBS = -ldl # On Linux
#LIBS = -lc # On BSD
LOCAL_CPPFLAGS += -I.
all: lttng-ust-clock-override-example.so
lttng-ust-clock-override-example.o: lttng-ust-clock-override-example.c
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -fpic -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -fpic -c -o $@ $<
lttng-ust-clock-override-example.so: lttng-ust-clock-override-example.o
- $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(AM_CFLAGS) lttng-ust-clock-override-example.o
+ $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(AM_CFLAGS) \
+ $(AM_LDFLAGS) $(CFLAGS) lttng-ust-clock-override-example.o
.PHONY: clean
clean:
#
# This makefile is purposefully kept simple to support GNU and BSD make.
-ifdef AM_CC
- CC = $(AM_CC)
-endif
-
LIBS = -ldl -llttng-ust # On Linux
#LIBS = -lc # On BSD
LOCAL_CPPFLAGS += -I.
all: demo-tracef
demo-tracef.o: demo-tracef.c
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -c -o $@ $<
demo-tracef: demo-tracef.o
- $(CC) $(LDFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+ $(CC) $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
-o $@ $< $(LIBS)
.PHONY: clean
#
# This makefile is purposefully kept simple to support GNU and BSD make.
-ifdef AM_CC
- CC = $(AM_CC)
-endif
-
LIBS = -ldl -llttng-ust # On Linux
#LIBS = -lc # On BSD
LOCAL_CPPFLAGS += -I.
all: demo-tracelog
demo-tracelog.o: demo-tracelog.c
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -c -o $@ $<
demo-tracelog: demo-tracelog.o
- $(CC) $(LDFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+ $(CC) $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
-o $@ $< $(LIBS)
.PHONY: clean
#
# This makefile is purposefully kept simple to support GNU and BSD make.
-ifdef AM_CC
- CC = $(AM_CC)
-endif
-
LIBS = -ldl # On Linux
#LIBS = -lc # On BSD
LOCAL_CPPFLAGS += -I.
all: demo lttng-ust-provider-ust-tests-demo.so lttng-ust-provider-ust-tests-demo3.so
tp.o: tp.c ust_tests_demo.h
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -fpic -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -fpic -c -o $@ $<
tp2.o: tp2.c ust_tests_demo2.h
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -fpic -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -fpic -c -o $@ $<
lttng-ust-provider-ust-tests-demo.so: tp.o tp2.o
- $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(AM_CFLAGS) -llttng-ust tp.o tp2.o
+ $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(AM_CFLAGS) \
+ $(AM_LDFLAGS) $(CFLAGS) -llttng-ust tp.o tp2.o
tp3.o: tp3.c ust_tests_demo3.h
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -fpic -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -fpic -c -o $@ $<
lttng-ust-provider-ust-tests-demo3.so: tp3.o
- $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(AM_CFLAGS) -llttng-ust tp3.o
+ $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(AM_CFLAGS) \
+ $(AM_LDFLAGS) $(CFLAGS) -llttng-ust tp3.o
demo.o: demo.c
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -c -o $@ $<
demo: demo.o
- $(CC) $(LDFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+ $(CC) $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
-o $@ demo.o $(LIBS)
.PHONY: clean
#
# This makefile is purposefully kept simple to support GNU and BSD make.
-ifdef AM_CC
- CC = $(AM_CC)
-endif
-
LIBS = -ldl -llttng-ust # On Linux
#LIBS = -lc -llttng-ust # On BSD
LOCAL_CPPFLAGS += -I.
all: sample
sample: sample.o tp.o
- $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+ $(CC) -o $@ $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
sample.o tp.o $(LIBS)
sample.o: sample.c sample_component_provider.h
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -c -o $@ $<
tp.o: tp.c sample_component_provider.h
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -c -o $@ $<
html: sample_component_provider.html sample.html tp.html
#
# This makefile is purposefully kept simple to support GNU and BSD make.
-ifdef AM_CC
- CC = $(AM_CC)
-endif
-
LIBS = -ldl -llttng-ust #On Linux
#LIBS = -lc -llttng-ust #On BSD
all: sample
sample: sample.o sample_tracepoint.o
- $(CC) $(LDFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+ $(CC) $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
-o $@ sample.o sample_tracepoint.o $(LIBS)
sample.o: sample.c sample_tracepoint.h
- $(CC) $(CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(AM_CFLAGS) \
+ $(CC) $(CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) $(CFLAGS) \
-c -o $@ $<
# Use this command to compile the .c manually
#sample_tracepoint.o: sample_tracepoint.c sample_tracepoint.h
-# $(CC) $(CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(AM_CFLAGS) \
+# $(CC) $(CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) $(CFLAGS) \
# -I. -c -o $@ $<
# This rule generate .o only and depends on rules for generating
# the .h and .c
%.o: %.tp %.c %.h
- CPPFLAGS="$(CPPFLAGS) $(AM_CPPFLAGS)" \
- CFLAGS="$(CFLAGS) $(AM_CFLAGS)" \
- LDFLAGS="$(LDFLAGS) $(AM_LDFLAGS)" \
+ CPPFLAGS="$(AM_CPPFLAGS) $(CPPFLAGS)" \
+ CFLAGS="$(AM_CFLAGS) $(CFLAGS)" \
+ LDFLAGS="$(AM_LDFLAGS) $(LDFLAGS)" \
CC="$(CC)" \
$(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
#
# This makefile is purposefully kept simple to support GNU and BSD make.
-ifdef AM_CC
- CC = $(AM_CC)
-endif
-
LIBS = -ldl # On Linux
#LIBS = -lc # On BSD
LOCAL_CPPFLAGS += -I.
all: lttng-ust-getcpu-override-example.so
lttng-ust-getcpu-override-example.o: lttng-ust-getcpu-override-example.c
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -fpic -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -fpic -c -o $@ $<
lttng-ust-getcpu-override-example.so: lttng-ust-getcpu-override-example.o
- $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(AM_CFLAGS) lttng-ust-getcpu-override-example.o
+ $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(AM_CFLAGS) \
+ $(AM_LDFLAGS) $(CFLAGS) lttng-ust-getcpu-override-example.o
.PHONY: clean
clean:
#
# This makefile is purposefully kept simple to support GNU and BSD make.
-ifdef AM_CC
- CC = $(AM_CC)
-endif
-
LOCAL_CPPFLAGS += -I.
LIBS = -ldl -llttng-ust # On Linux
#LIBS = -lc -llttng-ust # On BSD
all: hello
lttng-ust-provider-hello.o: tp.c ust_tests_hello.h
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -c -o $@ $<
lttng-ust-provider-hello.a: lttng-ust-provider-hello.o
ar -rc $@ lttng-ust-provider-hello.o
hello.o: hello.c
- $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
- $(AM_CFLAGS) -c -o $@ $<
+ $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+ $(CFLAGS) -c -o $@ $<
hello: hello.o lttng-ust-provider-hello.a
$(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
- hello.o lttng-ust-provider-hello.a $(LIBS)
+ $(CFLAGS) hello.o lttng-ust-provider-hello.a $(LIBS)
.PHONY: clean
clean:
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/liblttng-ust-comm -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
lib_LTLIBRARIES = liblttng-ust-ctl.la
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
lib_LTLIBRARIES = liblttng-ust-cyg-profile.la \
liblttng-ust-cyg-profile-fast.la
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
lib_LTLIBRARIES = liblttng-ust-dl.la
liblttng_ust_dl_la_SOURCES = \
liblttng_ust_dl_la_LIBADD += -lc
endif
-liblttng_ust_dl_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-dl -fno-strict-aliasing
+liblttng_ust_dl_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-dl $(AM_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
lib_LTLIBRARIES = liblttng-ust-fd.la
liblttng_ust_fd_la_SOURCES = \
liblttng_ust_fd_la_LIBADD += -lc
endif
-liblttng_ust_fd_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-fd -fno-strict-aliasing
+liblttng_ust_fd_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-fd $(AM_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
lib_LTLIBRARIES = liblttng-ust-fork.la
liblttng_ust_fork_la_SOURCES = ustfork.c
liblttng_ust_fork_la_LIBADD += -lc
endif
-liblttng_ust_fork_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-fork -fno-strict-aliasing
+liblttng_ust_fork_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-fork $(AM_CFLAGS)
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS)
lib_LTLIBRARIES = liblttng-ust-context-jni.la
liblttng_ust_context_jni_la_SOURCES = lttng_ust_context.c lttng_ust_context.h
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS)
lib_LTLIBRARIES = liblttng-ust-jul-jni.la
liblttng_ust_jul_jni_la_SOURCES = lttng_ust_jul.c \
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS)
lib_LTLIBRARIES = liblttng-ust-log4j-jni.la
liblttng_ust_log4j_jni_la_SOURCES = lttng_ust_log4j.c \
jar_DATA = $(jarfile)
BUILT_SOURCES = org_lttng_ust_LTTngUst.h
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS)
lib_LTLIBRARIES = liblttng-ust-java.la
liblttng_ust_java_la_SOURCES = LTTngUst.c lttng_ust_java.h
nodist_liblttng_ust_java_la_SOURCES = org_lttng_ust_LTTngUst.h
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
lib_LTLIBRARIES = liblttng-ust-libc-wrapper.la \
liblttng-ust-pthread-wrapper.la
# tracepoint provider: always built/installed (does not depend on Python per se)
AM_CPPFLAGS = -I$(top_srcdir)/include/ \
-I$(top_builddir)/include/
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
lib_LTLIBRARIES = liblttng-ust-python-agent.la
liblttng_ust_python_agent_la_SOURCES = lttng_ust_python.c lttng_ust_python.h
liblttng_ust_python_agent_la_LIBADD = -lc -llttng-ust \
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
noinst_LTLIBRARIES = liblttng-ust-runtime.la liblttng-ust-support.la
-lpthread \
$(top_builddir)/snprintf/libustsnprintf.la
liblttng_ust_tracepoint_la_LDFLAGS = -no-undefined -version-info $(LTTNG_UST_LIBRARY_VERSION)
-liblttng_ust_tracepoint_la_CFLAGS = -DUST_COMPONENT="liblttng_ust_tracepoint" -fno-strict-aliasing
+liblttng_ust_tracepoint_la_CFLAGS = -DUST_COMPONENT="liblttng_ust_tracepoint" $(AM_CFLAGS)
liblttng_ust_runtime_la_SOURCES = \
lttng-ust-comm.c \
liblttng-ust-tracepoint.la \
liblttng-ust-runtime.la liblttng-ust-support.la
-liblttng_ust_la_CFLAGS = -DUST_COMPONENT="liblttng_ust" -fno-strict-aliasing
+liblttng_ust_la_CFLAGS = -DUST_COMPONENT="liblttng_ust" $(AM_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
noinst_LTLIBRARIES = libringbuffer.la
-lpthread \
-lrt
-libringbuffer_la_CFLAGS = -DUST_COMPONENT="libringbuffer" -fno-strict-aliasing
+libringbuffer_la_CFLAGS = -DUST_COMPONENT="libringbuffer" $(AM_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libustcomm
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
noinst_LTLIBRARIES = libustsnprintf.la
libustsnprintf_la_SOURCES = \
patient_write.c
libustsnprintf_la_LDFLAGS = -no-undefined -static
-libustsnprintf_la_CFLAGS = -DUST_COMPONENT="lttng_ust_snprintf" -fPIC -fno-strict-aliasing
+libustsnprintf_la_CFLAGS = -DUST_COMPONENT="lttng_ust_snprintf" -fPIC $(AM_CFLAGS)
bench1_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
bench2_SOURCES = bench.c tp.c ust_tests_benchmark.h
bench2_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
-bench2_CFLAGS = -DTRACING
+bench2_CFLAGS = -DTRACING $(AM_CFLAGS)
dist_noinst_SCRIPTS = test_benchmark ptime
noinst_PROGRAMS = ctf-types
ctf_types_SOURCES = ctf-types.c tp.c ust_tests_ctf_types.h
ctf_types_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
-ctf_types_CFLAGS = -Werror=old-style-definition
+ctf_types_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS)
if LTTNG_UST_BUILD_WITH_LIBDL
ctf_types_LDADD += -ldl
noinst_PROGRAMS = hello
hello_SOURCES = hello.c tp.c ust_tests_hello.h
hello_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
-hello_CFLAGS = -Werror=old-style-definition
+hello_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS)
if LTTNG_UST_BUILD_WITH_LIBDL
hello_LDADD += -ldl
noinst_PROGRAMS = hello
hello_SOURCES = hello.c tp.c ust_tests_hello.h
hello_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
-hello_CFLAGS = -Werror=old-style-definition
+hello_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS)
if LTTNG_UST_BUILD_WITH_LIBDL
hello_LDADD += -ldl
trace_event_test_LDADD = $(top_builddir)/libust/libust.la \
$(top_builddir)/libust-initializer.o -lpthread -lrt
-CFLAGS_trace_event_test.o = -I$(src)
+CFLAGS_trace_event_test.o = -I$(src) $(AM_CFLAGS)
noinst_SCRIPTS = run
EXTRA_DIST = run
#FIXME: this test is broken:
#ust/tests/tracepoint/tracepoint_test.c:64: undefined reference to
#`register_trace_ust_event_msg'
-#CFLAGS_tracepoint_test.o = -I$(src)
+#CFLAGS_tracepoint_test.o = -I$(src) $(AM_CFLAGS)
noinst_SCRIPTS = run
EXTRA_DIST = run
tracepoint_benchmark_SOURCES = tracepoint_benchmark.c tracepoint_benchmark.h
tracepoint_benchmark_LDADD = $(top_builddir)/libust/libust.la $(top_builddir)/libust-initializer.o -lpthread
-CFLAGS_tracepoint_benchmark.o = -I$(src) -g
+CFLAGS_tracepoint_benchmark.o = -I$(src) -g $(AM_CFLAGS)
noinst_PROGRAMS = ust-variant
ust_variant_SOURCES = ust-variant.c
ust_variant_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
-ust_variant_CFLAGS = -Werror=old-style-definition
+ust_variant_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS)
if LTTNG_UST_BUILD_WITH_LIBDL
ust_variant_LDADD += -ldl