diff --git a/GNUmakefile b/GNUmakefile index 14c2968a..ce74d750 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -64,6 +64,7 @@ example: libui examples: @$(MAKE) -f GNUmakefile example EXAMPLE=controlgallery @$(MAKE) -f GNUmakefile example EXAMPLE=histogram + @$(MAKE) -f GNUmakefile example EXAMPLE=cpp-multithread .PHONY: examples diff --git a/build/GNUmakefile.example b/build/GNUmakefile.example index daf36cce..f2653865 100644 --- a/build/GNUmakefile.example +++ b/build/GNUmakefile.example @@ -9,8 +9,13 @@ endif include $(OS)/GNUosspecific.mk +ifneq ($(findstring cpp-,$(EXAMPLE)),) +CXXFILES += \ + examples/$(EXAMPLE)/main.cpp +else CFILES += \ examples/$(EXAMPLE)/main.c +endif HFILES += \ ui.h diff --git a/test/queuemaintest.cpp b/examples/cpp-multithread/main.cpp similarity index 98% rename from test/queuemaintest.cpp rename to examples/cpp-multithread/main.cpp index 338c4716..f97bc6f2 100644 --- a/test/queuemaintest.cpp +++ b/examples/cpp-multithread/main.cpp @@ -6,7 +6,7 @@ #include #include #include -#include "../ui.h" +#include "../../ui.h" using namespace std; uiMultilineEntry *e;