apps/graphics/NxWidgets/UnitTests: Add Unit Test configuration and build logic.
This commit is contained in:
parent
52ac68da04
commit
07709a11c8
@ -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 <gnutt@nuttx.org>
|
||||
After Nuttx-7.26, the NxWidgets repository was merged into the apps/
|
||||
repository. See the apps/ChangeLot.txt for changes since that time.
|
||||
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
103
graphics/NxWidgets/UnitTests/Kconfig
Normal file
103
graphics/NxWidgets/UnitTests/Kconfig
Normal file
@ -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
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
#
|
||||
# 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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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] <lib-path> <obj-dir>
|
||||
|
||||
Where:
|
||||
<lib-path> is the full, absolute path to the library to use
|
||||
<obj-dir> 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 <apps-directory-path> <test-sub-directory>
|
||||
|
||||
Where:
|
||||
<apps-directory-path> is the full, absolute path to the NuttX apps/ directory
|
||||
<test-sub-directory> is the name of a sub-directory in the UnitTests directory
|
||||
|
||||
|
@ -1,141 +0,0 @@
|
||||
#!/bin/bash
|
||||
#################################################################################
|
||||
# apps/graphics/NxWidgets/tools/addobjs.sh
|
||||
#
|
||||
# Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# 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] <lib-path> <obj-dir>"
|
||||
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 " <lib-path> is the full, absolute path to the library to use"
|
||||
echo " <obj-dir> 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 <obj-dir>"
|
||||
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 <obj-dir> to the archive at <lib-path>
|
||||
|
||||
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
|
@ -1,154 +0,0 @@
|
||||
#!/bin/bash
|
||||
#################################################################################
|
||||
# apps/graphics/NxWidgets/tools/install.sh
|
||||
#
|
||||
# Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# 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 <apps-directory-path> <test-sub-directory>"
|
||||
echo ""
|
||||
echo "Where:"
|
||||
echo " <apps-directory-path> is the full, absolute path to the NuttX apps/ directory"
|
||||
echo " <test-sub-directory> 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 <test-sub-directory>"
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user