diff --git a/tests/makefile/Makefile b/tests/makefile/Makefile index d3d7dd8eb..10aa776b6 100644 --- a/tests/makefile/Makefile +++ b/tests/makefile/Makefile @@ -2,7 +2,7 @@ LVGL_PATH := $(CURDIR)/../.. include ../../lvgl.mk CSRCS += test.c -CFLAGS += -DLV_CONF_SKIP=1 -I$(LVGL_PATH)/.. +CFLAGS += -DLV_CONF_SKIP=1 -DLV_BUILD_TEST=1 -I$(LVGL_PATH)/.. COBJS := $(patsubst %.c, %.o, $(CSRCS)) test_file: $(COBJS) diff --git a/tests/makefile/test.c b/tests/makefile/test.c index 6ae11c2f1..36379fdc2 100644 --- a/tests/makefile/test.c +++ b/tests/makefile/test.c @@ -1,3 +1,4 @@ +#if LV_BUILD_TEST #include #include "lvgl/lvgl.h" @@ -6,3 +7,4 @@ int main(void) lv_init(); return 0; } +#endif