diff --git a/graphics/NxWidgets/ChangeLog.txt b/graphics/NxWidgets/ChangeLog.txt index 6762520d3..55cde0e1b 100644 --- a/graphics/NxWidgets/ChangeLog.txt +++ b/graphics/NxWidgets/ChangeLog.txt @@ -647,4 +647,6 @@ * Fix a dependency in Kconfig: CONFIG_NXWIDGET_SERVERINIT is definitely supported in the PROTECTED and KERNEL build modes (2018-01-18). -1.20 2018-xx-xx Gregory Nutt +After Nuttx-7.26, the NxWidgets repository was merged into the apps/ +repository. See the apps/ChangeLot.txt for changes since that time. + diff --git a/graphics/NxWidgets/UnitTests/CButton/Make.defs b/graphics/NxWidgets/UnitTests/CButton/Make.defs index a8bdf19ca..094cac770 100644 --- a/graphics/NxWidgets/UnitTests/CButton/Make.defs +++ b/graphics/NxWidgets/UnitTests/CButton/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CButton/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,7 @@ # ############################################################################ -CONFIGURED_APPS += external +if ($(CONFIG_NXWIDGETS_UNITTEST_CBUTTON) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CButton +endif diff --git a/graphics/NxWidgets/UnitTests/CButton/Makefile b/graphics/NxWidgets/UnitTests/CButton/Makefile index 055e8edfa..4bbd5ebb5 100644 --- a/graphics/NxWidgets/UnitTests/CButton/Makefile +++ b/graphics/NxWidgets/UnitTests/CButton/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/Unitests/CButton/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CButton unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = cbuttontest.cxx +MAINSRC = cbutton_main.cxx -# Hello, World! C++ Example +APPNAME = cbutton +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = cbutton_main.cxx cbuttontest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CBUTTON -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = cbutton -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CButtonArray/Make.defs b/graphics/NxWidgets/UnitTests/CButtonArray/Make.defs index 4ff1ed8b8..66bfc997c 100644 --- a/graphics/NxWidgets/UnitTests/CButtonArray/Make.defs +++ b/graphics/NxWidgets/UnitTests/CButtonArray/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CButtonArray/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,7 @@ # ############################################################################ -CONFIGURED_APPS += external +if ($(CONFIG_NXWIDGETS_UNITTEST_CBUTTONARRAY) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CButtonArray +endif diff --git a/graphics/NxWidgets/UnitTests/CButtonArray/Makefile b/graphics/NxWidgets/UnitTests/CButtonArray/Makefile index 393a937e7..4f4e67c18 100644 --- a/graphics/NxWidgets/UnitTests/CButtonArray/Makefile +++ b/graphics/NxWidgets/UnitTests/CButtonArray/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CButtonArray/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CButtonArray unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = cbuttonarraytest.cxx +MAINSRC = cbuttonarray_main.cxx -# Hello, World! C++ Example +APPNAME = cbuttonarray +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = cbuttonarray_main.cxx cbuttonarraytest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CBUTTONARRAY -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = cbuttonarray -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CCheckBox/Make.defs b/graphics/NxWidgets/UnitTests/CCheckBox/Make.defs index 7efb540af..91bc38043 100644 --- a/graphics/NxWidgets/UnitTests/CCheckBox/Make.defs +++ b/graphics/NxWidgets/UnitTests/CCheckBox/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CCheckBox/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,7 @@ # ############################################################################ -CONFIGURED_APPS += external +if ($(CONFIG_NXWIDGETS_UNITTEST_CCHECKBOX) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CCheckBox +endif diff --git a/graphics/NxWidgets/UnitTests/CCheckBox/Makefile b/graphics/NxWidgets/UnitTests/CCheckBox/Makefile index 5a7d03327..804a2745e 100644 --- a/graphics/NxWidgets/UnitTests/CCheckBox/Makefile +++ b/graphics/NxWidgets/UnitTests/CCheckBox/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CCheckBox/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CCheckBox unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = ccheckboxtest.cxx +MAINSRC = ccheckbox_main.cxx -# Hello, World! C++ Example +APPNAME = ccheckbox +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = ccheckbox_main.cxx ccheckboxtest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CCHECKBOX -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = ccheckbox -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CGlyphButton/Make.defs b/graphics/NxWidgets/UnitTests/CGlyphButton/Make.defs index 50e421abf..16f4ba140 100644 --- a/graphics/NxWidgets/UnitTests/CGlyphButton/Make.defs +++ b/graphics/NxWidgets/UnitTests/CGlyphButton/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CGlyphButton/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CGLYPHBUTTON) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CGlyphButton +endif diff --git a/graphics/NxWidgets/UnitTests/CGlyphButton/Makefile b/graphics/NxWidgets/UnitTests/CGlyphButton/Makefile index 1d5552d43..957b6c571 100644 --- a/graphics/NxWidgets/UnitTests/CGlyphButton/Makefile +++ b/graphics/NxWidgets/UnitTests/CGlyphButton/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CGlyphButton/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CGlyphButton unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = cglyphbuttontest.cxx +MAINSRC = cglyphbutton_main.cxx -# Hello, World! C++ Example +APPNAME = cglyphbutton +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = cglyphbutton_main.cxx cglyphbuttontest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CGLYPHBUTTON -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = cglyphbutton -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Make.defs b/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Make.defs index b84778793..3ab057bf0 100644 --- a/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Make.defs +++ b/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,7 @@ # ############################################################################ -CONFIGURED_APPS += external +if ($(CONFIG_NXWIDGETS_UNITTEST_CGLYPHSLIDERHORIZONTAL) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal +endif diff --git a/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Makefile b/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Makefile index 8be3db1dc..83a60c13b 100644 --- a/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Makefile +++ b/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CGlyphSliderHorizontal unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = cglyphsliderhorizontaltest.cxx +MAINSRC = cglyphsliderhorizontal_main.cxx -# Hello, World! C++ Example +APPNAME = cglyphsliderhorizontal +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = cglyphsliderhorizontal_main.cxx cglyphsliderhorizontaltest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CGLYPHSLIDERHORIZONTAL -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = cglyphsliderhorizontal -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CImage/Make.defs b/graphics/NxWidgets/UnitTests/CImage/Make.defs index d9aac8f0e..e786e9a18 100644 --- a/graphics/NxWidgets/UnitTests/CImage/Make.defs +++ b/graphics/NxWidgets/UnitTests/CImage/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CImage/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CIMAGE) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CImage +endif diff --git a/graphics/NxWidgets/UnitTests/CImage/Makefile b/graphics/NxWidgets/UnitTests/CImage/Makefile index 005e0824e..443a2c21e 100644 --- a/graphics/NxWidgets/UnitTests/CImage/Makefile +++ b/graphics/NxWidgets/UnitTests/CImage/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CImage/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CImage unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = cimagetest.cxx +MAINSRC = cimage_main.cxx -# Hello, World! C++ Example +APPNAME = cimage +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = cimage_main.cxx cimagetest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CIMAGE -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = cimage -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CKeypad/Make.defs b/graphics/NxWidgets/UnitTests/CKeypad/Make.defs index a4ad1424f..3b91403e6 100644 --- a/graphics/NxWidgets/UnitTests/CKeypad/Make.defs +++ b/graphics/NxWidgets/UnitTests/CKeypad/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CKeypad/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CKEYPAD) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CKeypad +endif diff --git a/graphics/NxWidgets/UnitTests/CKeypad/Makefile b/graphics/NxWidgets/UnitTests/CKeypad/Makefile index 2d5ca749b..3407206ce 100644 --- a/graphics/NxWidgets/UnitTests/CKeypad/Makefile +++ b/graphics/NxWidgets/UnitTests/CKeypad/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CKeyPad/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CKeyPad unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = ckeypadtest.cxx +MAINSRC = ckeypad_main.cxx -# Hello, World! C++ Example +APPNAME = ckeypad +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = ckeypad_main.cxx ckeypadtest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CKEYPAD -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = ckeypad -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CLabel/Make.defs b/graphics/NxWidgets/UnitTests/CLabel/Make.defs index 7b41aa8e1..c64b598ff 100644 --- a/graphics/NxWidgets/UnitTests/CLabel/Make.defs +++ b/graphics/NxWidgets/UnitTests/CLabel/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CLabel/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CLABEL) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CLabel +endif diff --git a/graphics/NxWidgets/UnitTests/CLabel/Makefile b/graphics/NxWidgets/UnitTests/CLabel/Makefile index 4f8200f18..be66c9606 100644 --- a/graphics/NxWidgets/UnitTests/CLabel/Makefile +++ b/graphics/NxWidgets/UnitTests/CLabel/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CLabel/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CLabel unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = clabeltest.cxx +MAINSRC = clabel_main.cxx -# Hello, World! C++ Example +APPNAME = clabel +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = clabel_main.cxx clabeltest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CLABEL -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = clabel -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CLatchButton/Make.defs b/graphics/NxWidgets/UnitTests/CLatchButton/Make.defs index 7ae8e25e2..e467c6c93 100644 --- a/graphics/NxWidgets/UnitTests/CLatchButton/Make.defs +++ b/graphics/NxWidgets/UnitTests/CLatchButton/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CLatchButton/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CLATCHBUTTON) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CLatchButton +endif diff --git a/graphics/NxWidgets/UnitTests/CLatchButton/Makefile b/graphics/NxWidgets/UnitTests/CLatchButton/Makefile index e4ed8387b..348ed929c 100644 --- a/graphics/NxWidgets/UnitTests/CLatchButton/Makefile +++ b/graphics/NxWidgets/UnitTests/CLatchButton/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CLatchButton/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CLatchButton unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = clatchbuttontest.cxx +MAINSRC = clatchbutton_main.cxx -# Hello, World! C++ Example +APPNAME = clatchbutton +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = clatchbutton_main.cxx clatchbuttontest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CLATCHBUTTON -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = clatchbutton -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CLatchButtonArray/Make.defs b/graphics/NxWidgets/UnitTests/CLatchButtonArray/Make.defs index 3bdc4c7f1..1bbabb369 100644 --- a/graphics/NxWidgets/UnitTests/CLatchButtonArray/Make.defs +++ b/graphics/NxWidgets/UnitTests/CLatchButtonArray/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CLatchButtonArray/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,7 @@ # ############################################################################ -CONFIGURED_APPS += external +if ($(CONFIG_NXWIDGETS_UNITTEST_CLATCHBUTTONARRAY) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CLatchButtonArray +endif diff --git a/graphics/NxWidgets/UnitTests/CLatchButtonArray/Makefile b/graphics/NxWidgets/UnitTests/CLatchButtonArray/Makefile index 9d9d580b7..f1deb6adf 100644 --- a/graphics/NxWidgets/UnitTests/CLatchButtonArray/Makefile +++ b/graphics/NxWidgets/UnitTests/CLatchButtonArray/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CLatchButtonArray/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CLatchButtonArray unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = clatchbuttonarraytest.cxx +MAINSRC = clatchbuttonarray_main.cxx -# Hello, World! C++ Example +APPNAME = clatchbuttonarray +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = clatchbuttonarray_main.cxx clatchbuttonarraytest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CLATCHBUTTONARRAY -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = clatchbuttonarray -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CListBox/Make.defs b/graphics/NxWidgets/UnitTests/CListBox/Make.defs index b1fdadfc4..5bcca20c9 100644 --- a/graphics/NxWidgets/UnitTests/CListBox/Make.defs +++ b/graphics/NxWidgets/UnitTests/CListBox/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CListBox/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CLISTBOX) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CListBox +endif diff --git a/graphics/NxWidgets/UnitTests/CListBox/Makefile b/graphics/NxWidgets/UnitTests/CListBox/Makefile index 9ce2dd5f6..4b60f6a9a 100644 --- a/graphics/NxWidgets/UnitTests/CListBox/Makefile +++ b/graphics/NxWidgets/UnitTests/CListBox/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CListBox/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CListBox unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = clistboxtest.cxx +MAINSRC = clistbox_main.cxx -# Hello, World! C++ Example +APPNAME = clistbox +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = clistbox_main.cxx clistboxtest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CLISTBOX -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = clistbox -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CProgressBar/Make.defs b/graphics/NxWidgets/UnitTests/CProgressBar/Make.defs index e250fe81b..1afa77080 100644 --- a/graphics/NxWidgets/UnitTests/CProgressBar/Make.defs +++ b/graphics/NxWidgets/UnitTests/CProgressBar/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CProgressBar/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CPROGRESSBAR) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CProgressBar +endif diff --git a/graphics/NxWidgets/UnitTests/CProgressBar/Makefile b/graphics/NxWidgets/UnitTests/CProgressBar/Makefile index 044bc7be4..b71076339 100644 --- a/graphics/NxWidgets/UnitTests/CProgressBar/Makefile +++ b/graphics/NxWidgets/UnitTests/CProgressBar/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CProgressBar/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CProgressBar unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = cprogressbartest.cxx +MAINSRC = cprogressbar_main.cxx -# Hello, World! C++ Example +APPNAME = cprogressbar +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = cprogressbar_main.cxx cprogressbartest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CPROGRESSBAR -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = cprogressbar -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CRadioButton/Make.defs b/graphics/NxWidgets/UnitTests/CRadioButton/Make.defs index 6e2672712..7de733952 100644 --- a/graphics/NxWidgets/UnitTests/CRadioButton/Make.defs +++ b/graphics/NxWidgets/UnitTests/CRadioButton/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CRadioButton/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CRADIOBUTTON) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CRadioButton +endif diff --git a/graphics/NxWidgets/UnitTests/CRadioButton/Makefile b/graphics/NxWidgets/UnitTests/CRadioButton/Makefile index 579bad705..77c4abf2e 100644 --- a/graphics/NxWidgets/UnitTests/CRadioButton/Makefile +++ b/graphics/NxWidgets/UnitTests/CRadioButton/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CRadioButton/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CRadioButton unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = cradiobuttontest.cxx +MAINSRC = cradiobutton_main.cxx -# Hello, World! C++ Example +APPNAME = cradiobutton +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = cradiobutton_main.cxx cradiobuttontest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CRADIOBUTTON -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = cradiobutton -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Make.defs b/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Make.defs index 884a26753..8b24d9930 100644 --- a/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Make.defs +++ b/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CSCROLLBARHORIZONTAL) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CScrollbarHorizontal +endif diff --git a/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile b/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile index 23293655c..45e170d56 100644 --- a/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile +++ b/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CScrollbarHorizontal unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = cscrollbarhorizontaltest.cxx +MAINSRC = cscrollbarhorizontal_main.cxx -# Hello, World! C++ Example +APPNAME = cscrollbarhorizontal +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = cscrollbarhorizontal_main.cxx cscrollbarhorizontaltest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CSCROLLBARHORIZONTAL -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = cscrollbarhorizontal -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - @$(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - @touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CScrollbarVertical/Make.defs b/graphics/NxWidgets/UnitTests/CScrollbarVertical/Make.defs index e0cf793ac..51b2df8fc 100644 --- a/graphics/NxWidgets/UnitTests/CScrollbarVertical/Make.defs +++ b/graphics/NxWidgets/UnitTests/CScrollbarVertical/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CScrollbarVertical/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,7 @@ # ############################################################################ -CONFIGURED_APPS += external +if ($(CONFIG_NXWIDGETS_UNITTEST_CSCROLLBARVERTICAL) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CScrollbarVertical +endif diff --git a/graphics/NxWidgets/UnitTests/CScrollbarVertical/Makefile b/graphics/NxWidgets/UnitTests/CScrollbarVertical/Makefile index 2b9f941a5..3966eb1a8 100644 --- a/graphics/NxWidgets/UnitTests/CScrollbarVertical/Makefile +++ b/graphics/NxWidgets/UnitTests/CScrollbarVertical/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CScrollbarVertical/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CScrollbarVertical unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = cscrollbarverticaltest.cxx +MAINSRC = cscrollbarvertical_main.cxx -# Hello, World! C++ Example +APPNAME = cscrollbarvertical +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = cscrollbarvertical_main.cxx cscrollbarverticaltest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CSCROLLBARVERTICAL -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = cscrollbarvertical -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CSliderHorizonal/Make.defs b/graphics/NxWidgets/UnitTests/CSliderHorizonal/Make.defs index 6d08e4a14..fb775b8ff 100644 --- a/graphics/NxWidgets/UnitTests/CSliderHorizonal/Make.defs +++ b/graphics/NxWidgets/UnitTests/CSliderHorizonal/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CSliderHorizonal/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CSLIDERHORIZONAL) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CSliderHorizonal +endif diff --git a/graphics/NxWidgets/UnitTests/CSliderHorizonal/Makefile b/graphics/NxWidgets/UnitTests/CSliderHorizonal/Makefile index 8558e06e5..a15c3e4a9 100644 --- a/graphics/NxWidgets/UnitTests/CSliderHorizonal/Makefile +++ b/graphics/NxWidgets/UnitTests/CSliderHorizonal/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CSliderHorizontal/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CSliderHorizontal unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = csliderhorizontaltest.cxx +MAINSRC = csliderhorizontal_main.cxx -# Hello, World! C++ Example +APPNAME = csliderhorizontal +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = csliderhorizontal_main.cxx csliderhorizontaltest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CSLIDERHORIZONAL -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = csliderhorizontal -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CSliderVertical/Make.defs b/graphics/NxWidgets/UnitTests/CSliderVertical/Make.defs index ad6267f05..97136138a 100644 --- a/graphics/NxWidgets/UnitTests/CSliderVertical/Make.defs +++ b/graphics/NxWidgets/UnitTests/CSliderVertical/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CSliderVertical/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CSLIDERVERTICAL) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CSliderVertical +endif diff --git a/graphics/NxWidgets/UnitTests/CSliderVertical/Makefile b/graphics/NxWidgets/UnitTests/CSliderVertical/Makefile index 477bea264..0e217abe1 100644 --- a/graphics/NxWidgets/UnitTests/CSliderVertical/Makefile +++ b/graphics/NxWidgets/UnitTests/CSliderVertical/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CSliderVertical/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CSliderVertical unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = csliderverticaltest.cxx +MAINSRC = cslidervertical_main.cxx -# Hello, World! C++ Example +APPNAME = cslidervertical +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = cslidervertical_main.cxx csliderverticaltest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CSLIDERVERTICAL -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = cslidervertical -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/CTextBox/Make.defs b/graphics/NxWidgets/UnitTests/CTextBox/Make.defs index f16b7841c..914a66ad8 100644 --- a/graphics/NxWidgets/UnitTests/CTextBox/Make.defs +++ b/graphics/NxWidgets/UnitTests/CTextBox/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/CTextBox/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_CTEXTBOX) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/CTextBox +endif diff --git a/graphics/NxWidgets/UnitTests/CTextBox/Makefile b/graphics/NxWidgets/UnitTests/CTextBox/Makefile index e50c01357..7fed7ab4a 100644 --- a/graphics/NxWidgets/UnitTests/CTextBox/Makefile +++ b/graphics/NxWidgets/UnitTests/CTextBox/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/UnitTests/CTextBox/Makefile # -# Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,124 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Get the path to the archiver tool +# CTextBox unit test -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh +ASRCS = +CSRCS = +CXXSRCS = ctextboxtest.cxx +MAINSRC = ctextbox_main.cxx -# Hello, World! C++ Example +APPNAME = ctextbox +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -ASRCS = -CSRCS = -CXXSRCS = ctextbox_main.cxx ctextboxtest.cxx +MODULE = CONFIG_NXWIDGETS_UNITTEST_CTEXTBOX -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) - -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = ctextbox -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: .built -.PHONY: clean depend context disclean chkcxx chklib - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklib: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work. - -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/UnitTests/Kconfig b/graphics/NxWidgets/UnitTests/Kconfig new file mode 100644 index 000000000..3ed4fe165 --- /dev/null +++ b/graphics/NxWidgets/UnitTests/Kconfig @@ -0,0 +1,103 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +menu "Unit Tests" + +config NXWIDGETS_UNITTEST_CBUTTON + tristate "CButton" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CBUTTONARRAY + tristate "CButtonArray" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CCHECKBOX + tristate "CCheckBox" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CGLYPHBUTTON + tristate "CGlyphButton" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CGLYPHSLIDERHORIZONTAL + tristate "CGlyphSliderHorizontal" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CIMAGE + tristate "CImage" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CKEYPAD + tristate "CKeypad" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CLABEL + tristate "CLabel" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CLATCHBUTTON + tristate "CLatchButton" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CLATCHBUTTONARRAY + tristate "CLatchButtonArray" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CLISTBOX + tristate "CListBox" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CPROGRESSBAR + tristate "CProgressBar" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CRADIOBUTTON + tristate "CRadioButton" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CSCROLLBARHORIZONTAL + tristate "CScrollbarHorizontal" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CSCROLLBARVERTICAL + tristate "CScrollbarVertical" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CSLIDERHORIZONAL + tristate "CSliderHorizontal" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CSLIDERVERTICAL + tristate "CSliderVertical" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_CTEXTBOX + tristate "CTextBox" + default n + depends on NXWIDGETS + +config NXWIDGETS_UNITTEST_NXWM + tristate "NxWM" + default n + depends on NXWM + +endmenu # Unit Tests diff --git a/graphics/NxWidgets/UnitTests/nxwm/Make.defs b/graphics/NxWidgets/UnitTests/nxwm/Make.defs index c8f44e07e..784e9c798 100644 --- a/graphics/NxWidgets/UnitTests/nxwm/Make.defs +++ b/graphics/NxWidgets/UnitTests/nxwm/Make.defs @@ -2,7 +2,7 @@ # apps/graphics/NxWidgets/UnitTests/nxwm/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -34,5 +34,6 @@ # ############################################################################ -CONFIGURED_APPS += external - +if ($(CONFIG_NXWIDGETS_UNITTEST_NXWM) +CONFIGURED_APPS += graphics/NxWidgets/UnitTests/nxwm +endif diff --git a/graphics/NxWidgets/UnitTests/nxwm/Makefile b/graphics/NxWidgets/UnitTests/nxwm/Makefile index 4b72ad0b2..e1e51f180 100644 --- a/graphics/NxWidgets/UnitTests/nxwm/Makefile +++ b/graphics/NxWidgets/UnitTests/nxwm/Makefile @@ -1,7 +1,7 @@ ################################################################################# # apps/graphics/NxWidgets/Unitests/nxwm/Makefile # -# Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,20 +33,10 @@ # ################################################################################# -TESTDIR := ${shell pwd | sed -e 's/ /\\ /g'} - -include $(TOPDIR)/Make.defs -OBJEXT ?= .o -DELIM ?= / - -include $(APPDIR)$(DELIM)Make.defs - -# Add the path to the NXWidget include directory to the CFLAGS - -NXWIDGETS_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)libnxwidgets" +NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" -NXWIDGETS_LIB="$(NXWIDGETS_DIR)$(DELIM)libnxwidgets$(LIBEXT)" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} @@ -56,155 +46,17 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif -# Add the path to the NxWM include directory to the CFLAGS - -NXWM_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)nxwm" -NXWM_INC="$(NXWM_DIR)$(DELIM)include" -NXWM_LIB="$(NXWM_DIR)$(DELIM)libnxwm$(LIBEXT)" - -ifeq ($(WINTOOL),y) - CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWM_INC)"} - CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWM_INC)"} -else - CFLAGS += ${shell $(INCDIR) "$(CC)" "$(NXWM_INC)"} - CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWM_INC)"} -endif - -# Get the path to the archiver tool - -TESTTOOL_DIR="$(TESTDIR)$(DELIM)..$(DELIM)..$(DELIM)tools" -ARCHIVER=$(TESTTOOL_DIR)$(DELIM)addobjs.sh - # NxWM unit test -ASRCS = -CSRCS = -CXXSRCS = nxwm_main.cxx +ASRCS = +CSRCS = +CXXSRCS = +MAINSRC = nxwm_main.cxx -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT)) +APPNAME = nxwm +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 -SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) -OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) +MODULE = CONFIG_NXWIDGETS_UNITTEST_NXWM -POSIX_BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" -ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(POSIX_BIN)}" -else - BIN = $(POSIX_BIN) -endif - -ROOTDEPPATH = --dep-path . - -# helloxx built-in application info - -APPNAME = nxwm -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 - -# Common build - -VPATH = - -all: chkcxx chklibnxwidgets chklibnxwm .built -.PHONY: clean depend context disclean chkcxx chklibnxwidgets chklibnxwm - -# Object file creation targets - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -$(CXXOBJS): %$(OBJEXT): %.cxx - $(call COMPILEXX, $<, $@) - -# Verify that the NuttX configuration is setup to support C++ - -chkcxx: -ifneq ($(CONFIG_HAVE_CXX),y) - @echo "" - @echo "In order to use this example, you toolchain must support must" - @echo "" - @echo " (1) Explicitly select CONFIG_HAVE_CXX to build in C++ support" - @echo " (2) Define CXX, CXXFLAGS, and COMPILEXX in the Make.defs file" - @echo " of the configuration that you are using." - @echo "" - @exit 1 -endif - -# Verify that the NXWidget library has been built - -chklibnxwidgets: - $(Q) ( \ - if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ - echo "$(NXWIDGETS_LIB) does not exist."; \ - echo "Please go to $(NXWIDGETS_DIR)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Verify that the NxWM library has been built - -chklibnxwm: - $(Q) ( \ - if [ ! -e "$(NXWM_LIB)" ]; then \ - echo "$(NXWM_LIB) does not exist."; \ - echo "Please go to $(NXWM_LIB)"; \ - echo "and rebuild the library"; \ - exit 1; \ - fi; \ - ) - -# Library creation targets - -$(NXWIDGETS_LIB): # Just to keep make happy. chklibnxwidgets does the work. - -$(NXWM_LIB): # Just to keep make happy. chklibnxwm does the work. - -.built: $(OBJS) $(NXWIDGETS_LIB) - $(call ARCHIVE, $(BIN), $(OBJS)) -ifeq ($(WINTOOL),y) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) - $(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWM_DIR) -else - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) - $(Q) $(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWM_DIR) -endif - $(Q) touch .built - -# Register NSH built-in application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -preconfig: - -# Standard housekeeping targets - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) $(CXX) -- $(CXXFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat) - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep +include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/libnxwidgets/Kconfig b/graphics/NxWidgets/libnxwidgets/Kconfig index 003a92b34..b5ecbc489 100644 --- a/graphics/NxWidgets/libnxwidgets/Kconfig +++ b/graphics/NxWidgets/libnxwidgets/Kconfig @@ -3,7 +3,9 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -menuconfig NXWIDGETS +menu "NxWidgets" + +config NXWIDGETS bool "Enable NxWidgets" default n depends on NX && HAVE_CXX @@ -256,5 +258,6 @@ config NXWIDGET_MEMMONITOR Enable memory usage monitor instrumentation. This feature is only used by the NxWidget/NxWM unit tests. -endmenu # NXWidget Configuration +endmenu # NxWidgets Configuration endif # NxWidgets +endmenu # NxWidgets diff --git a/graphics/NxWidgets/nxwm/Kconfig b/graphics/NxWidgets/nxwm/Kconfig index 1c510d3b7..2918e5d9b 100644 --- a/graphics/NxWidgets/nxwm/Kconfig +++ b/graphics/NxWidgets/nxwm/Kconfig @@ -3,7 +3,9 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -menuconfig NXWM +menu "NxWM" + +config NXWM bool "Enable NxWM" default n depends on NXWIDGETS @@ -963,6 +965,6 @@ config NXWM_MEDIAPLAYER_MINVOLUMEHEIGHT endmenu # Volume Configuration" endif # NXWM_MEDIAPLAYER endmenu # NxWM Media Player Display Settings - endif # NXWM +endmenu # NxWM diff --git a/graphics/NxWidgets/tools/README.txt b/graphics/NxWidgets/tools/README.txt index eeab93ead..b6206c9d3 100755 --- a/graphics/NxWidgets/tools/README.txt +++ b/graphics/NxWidgets/tools/README.txt @@ -1,22 +1,6 @@ NxWidgets/tools README File =========================== -addobjs.sh ----------- - - $0 will add all object (.o) files in directory to an archive. - - Usage: tools/addobjs.sh [OPTIONS] - - Where: - is the full, absolute path to the library to use - is full path to the directory containing the object files to be added - OPTIONS include: - -p Prefix to use. For example, to use arm-elf-ar, add '-p arm-elf-' - -w Use Windows style paths instead of POSIX paths - -d Enable script debug - -h Show this usage information - bitmap_converter.py ------------------- @@ -49,14 +33,3 @@ bitmap_converter.py - Save the image as PNG or other lossless format (NOT jpeg). - Then generate the image. -install.sh ----------- - - Install a unit test in the NuttX source tree" - - USAGE: tools/install.sh - - Where: - is the full, absolute path to the NuttX apps/ directory - is the name of a sub-directory in the UnitTests directory - diff --git a/graphics/NxWidgets/tools/addobjs.sh b/graphics/NxWidgets/tools/addobjs.sh deleted file mode 100755 index f18a21a57..000000000 --- a/graphics/NxWidgets/tools/addobjs.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/bin/bash -################################################################################# -# apps/graphics/NxWidgets/tools/addobjs.sh -# -# Copyright (C) 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX, NxWidgets, nor the names of its contributors -# me be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -################################################################################# - -# set -x - -# Get input parameters - -usage="Usage: $0 [OPTIONS] " -advice="Try '$0 -h' for more information" - -unset prefix -wintool=n - -while [ ! -z "$1" ]; do - case $1 in - -d ) - set -x - ;; - -p ) - shift - prefix=$1 - ;; - -w ) - wintool=y - ;; - -h ) - echo "$0 will add all object (.o) files in directory to an archive." - echo "" - echo $usage - echo "" - echo "Where:" - echo " is the full, absolute path to the library to use" - echo " is full path to the directory containing the object files to be added" - echo "OPTIONS include:" - echo " -p Prefix to use. For example, to use arm-elf-ar, add '-p arm-elf-'" - echo " -w Use Windows style paths instead of POSIX paths" - echo " -d Enable script debug" - echo " -h Show this usage information" - exit 0 - ;; - * ) - break; - ;; - esac - shift -done - -libpath=$1 -objdir=$2 -archiver="${prefix}"ar - -# Verify input parameters - -if [ -z "${libpath}" ]; then - echo "Missing required arguments" - echo "" - echo $usage - echo $advice - exit 1 -fi - -if [ -z "${objdir}" ]; then - echo "Missing required argument " - echo "" - echo $usage - echo $advice - exit 1 -fi - -if [ ! -w ${libpath} ]; then - if [ -e ${libpath} ]; then - echo "${libpath} exists but is not a write-able file" - echo $advice - else - echo "${libpath} does not exist" - echo $advice - fi - exit 1 -fi - -if [ ! -d ${objdir} ]; then - if [ -e ${objdir} ]; then - echo "${objdir} exists but is not a directory" - echo $advice - else - echo "${objdir} does not exist" - echo $advice - fi - exit 1 -fi - -# Add each object file in to the archive at - -for obj in `ls "${objdir}"/*.o`; do - name=`basename "${obj}"` - if [ "X${wintool}" = "Xy" ]; then - objpath=`cygpath -w "${obj}"` - else - objpath=${obj} - fi - echo "AR: ${name}" - ${archiver} rcs ${libpath} ${objpath} || \ - { echo "Failed to archive the object file:"; \ - echo " Archive: ${libpath}"; \ - echo " Object: ${obj}"; \ - exit 1; \ - } -done diff --git a/graphics/NxWidgets/tools/install.sh b/graphics/NxWidgets/tools/install.sh deleted file mode 100755 index 395d6129e..000000000 --- a/graphics/NxWidgets/tools/install.sh +++ /dev/null @@ -1,154 +0,0 @@ -#!/bin/bash -################################################################################# -# apps/graphics/NxWidgets/tools/install.sh -# -# Copyright (C) 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX, NxWidgets, nor the names of its contributors -# me be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -################################################################################# -# -# set -x -# Functions - -function ShowUsage() -{ - echo "" - echo "Install a unit test in the NuttX source tree" - echo "" - echo "USAGE: $0 " - echo "" - echo "Where:" - echo " is the full, absolute path to the NuttX apps/ directory" - echo " is the name of a sub-directory in the UnitTests directory" - echo "" -} - -function ShowTests() -{ - for testdir in ${UNITTEST_DIRPATH}/*; do - subdir=`basename ${testdir}` - if [ -d "${UNITTEST_DIRPATH}/${subdir}" ]; then - if [ -f "${UNITTEST_DIRPATH}/${subdir}/Makefile" ]; then - echo $subdir - fi - fi - done -} - -# Input parameters - -APPS_DIRPATH=$1 -TEST_SUBDIR=$2 - -if [ -z "${APPS_DIRPATH}" ]; then - echo "Missing required arguments" - ShowUsage - exit 1 -fi - -if [ -z "${TEST_SUBDIR}" ]; then - echo "Missing required argument " - ShowUsage - exit 1 -fi - -# Make sure that we know where we are and where we are going - -WD=`pwd` -if [ -x install.sh ]; then - UNITTEST_DIRPATH="${WD}/../UnitTests" - TOOLS_DIRPATH="${WD}" -else - if [ -x tools/install.sh ]; then - UNITTEST_DIRPATH="${WD}/UnitTests" - TOOLS_DIRPATH="${WD}/tools" - else - echo "This script must be executed in the NxWidgets or apps/graphics/NxWidgets/tools directory" - ShowUsage - exit 1 - fi -fi - -if [ ! -d "${APPS_DIRPATH}" ]; then - echo "Directory ${APPS_DIRPATH} does not exist" - ShowUsage - exit 1 -fi - -if [ ! -f "${APPS_DIRPATH}/Makefile" ]; then - echo "Directory ${APPS_DIRPATH} does not look like a NuttX apps directory" - ShowUsage - exit 1 -fi - -TEST_PATH="${UNITTEST_DIRPATH}/${TEST_SUBDIR}" -if [ ! -d "${TEST_PATH}" ]; then - echo "Directory ${TEST_PATH} does not exist" - ShowUsage - ShowTests - exit 1 -fi - -if [ ! -f "${TEST_PATH}/Makefile" ]; then - echo "Directory ${TEST_PATH} does not look like a unit test directory" - ShowUsage - ShowTests - exit 1 -fi - -# Check if the symbolic link "external" exists in the NuttX apps directory - -if [ -e "${APPS_DIRPATH}/external" ]; then - echo "${APPS_DIRPATH}/external already exists..." - if [ -h "${APPS_DIRPATH}/external" ]; then - echo " Removing the old symbolic link." - rm "${APPS_DIRPATH}/external" || \ - { echo " ERROR: Failed to remove old symbolic link"; \ - exit 1; - } - else - echo " ERROR: But it is not a symbolic link!" - echo " Please remove ${APPS_DIRPATH}/external" - echo " and run this script again" - fi -fi - -# Then set up the symbolic link "external" in the NuttX apps to point to the -# UnitTest subdirectory - -echo "Creating symbolic link" -echo " - To ${TEST_PATH}" -echo " - At ${APPS_DIRPATH}/external" - -ln -s "${TEST_PATH}" "${APPS_DIRPATH}/external" || \ - { echo "Failed to create symbollic link"; \ - exit 1; - } -