perf tools: Convert to NEWT_SUPPORT
[firefly-linux-kernel-4.4.55.git] / tools / perf / Makefile
index 99b2bb371bcd364db840cbf6468efc08ba5cb8cb..3d2181c57507d13912b1c79b9177bf81cf1a0b6a 100644 (file)
@@ -554,16 +554,14 @@ ifndef NO_LIBAUDIT
        endif
 endif
 
-ifdef NO_NEWT
-       BASIC_CFLAGS += -DNO_NEWT_SUPPORT
-else
+ifndef NO_NEWT
        FLAGS_NEWT=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lnewt
        ifneq ($(call try-cc,$(SOURCE_NEWT),$(FLAGS_NEWT)),y)
                msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev);
-               BASIC_CFLAGS += -DNO_NEWT_SUPPORT
        else
                # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h
                BASIC_CFLAGS += -I/usr/include/slang
+               BASIC_CFLAGS += -DNEWT_SUPPORT
                EXTLIBS += -lnewt -lslang
                LIB_OBJS += $(OUTPUT)ui/setup.o
                LIB_OBJS += $(OUTPUT)ui/browser.o
@@ -603,7 +601,7 @@ else
                LIB_OBJS += $(OUTPUT)ui/gtk/util.o
                LIB_OBJS += $(OUTPUT)ui/gtk/helpline.o
                # Make sure that it'd be included only once.
-               ifneq ($(findstring -DNO_NEWT_SUPPORT,$(BASIC_CFLAGS)),)
+               ifeq ($(findstring -DNEWT_SUPPORT,$(BASIC_CFLAGS)),)
                        LIB_OBJS += $(OUTPUT)ui/setup.o
                        LIB_OBJS += $(OUTPUT)ui/util.o
                endif