1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
ifeq ($(wildcard $(srcdir)/check-deps/clock_without_librt),)
LDFLAGS_libmcount.so += -lrt
endif
ifneq ($(wildcard $(srcdir)/check-deps/cc_has_mfentry),)
export HAVE_CC_MFENTRY = 1
endif
ifneq ($(wildcard $(srcdir)/check-deps/cxa_demangle),)
COMMON_CFLAGS += -DHAVE_CXA_DEMANGLE
COMMON_LDFLAGS += -lstdc++
endif
ifneq ($(wildcard $(srcdir)/check-deps/cc_has_mno_sse2),)
LIB_CFLAGS += -mno-sse2
endif
ifneq ($(wildcard $(srcdir)/check-deps/have_libpython2.7),)
COMMON_CFLAGS += -DHAVE_LIBPYTHON2
endif
ifneq ($(wildcard $(srcdir)/check-deps/perf_clockid),)
COMMON_CFLAGS += -DHAVE_PERF_CLOCKID
endif
ifneq ($(wildcard $(srcdir)/check-deps/perf_context_switch),)
COMMON_CFLAGS += -DHAVE_PERF_CTXSW
endif
ifneq ($(wildcard $(srcdir)/check-deps/arm_has_hardfp),)
COMMON_CFLAGS += -DHAVE_ARM_HARDFP
endif
ifneq ($(wildcard $(srcdir)/check-deps/have_libncurses),)
COMMON_CFLAGS += -DHAVE_LIBNCURSES $(shell pkg-config --cflags ncursesw)
UFTRACE_LDFLAGS += $(shell pkg-config --libs ncursesw)
TEST_LDFLAGS += $(shell pkg-config --libs ncursesw)
endif
ifneq ($(wildcard $(srcdir)/check-deps/cc_has_wstringop_truncation),)
COMMON_CFLAGS += -Wno-stringop-truncation
endif
ifneq ($(wildcard $(srcdir)/check-deps/have_libelf),)
COMMON_CFLAGS += -DHAVE_LIBELF
COMMON_LDFLAGS += -lelf
endif
ifneq ($(wildcard $(srcdir)/check-deps/have_libdw),)
COMMON_CFLAGS += -DHAVE_LIBDW
COMMON_CFLAGS += $(shell pkg-config --cflags libdw 2> /dev/null)
COMMON_LDFLAGS += $(shell pkg-config --libs libdw 2> /dev/null || echo "-ldw")
endif
|