diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-01 20:36:19 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-01 20:36:19 +0000 |
commit | fd4dd86fe8de2ddda1e8723973e8b5774528ebb7 (patch) | |
tree | 076f03852cb6bcd7a34d313558f7529143337e6d /NxWidgets/UnitTests/nxwm/Makefile | |
parent | 990276740afafeb69f64b01050a99f113bb89fa6 (diff) | |
download | nuttx-fd4dd86fe8de2ddda1e8723973e8b5774528ebb7.tar.gz nuttx-fd4dd86fe8de2ddda1e8723973e8b5774528ebb7.tar.bz2 nuttx-fd4dd86fe8de2ddda1e8723973e8b5774528ebb7.zip |
More NxWM support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4682 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/UnitTests/nxwm/Makefile')
-rw-r--r-- | NxWidgets/UnitTests/nxwm/Makefile | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/NxWidgets/UnitTests/nxwm/Makefile b/NxWidgets/UnitTests/nxwm/Makefile index d9cf2d051..9648ad807 100644 --- a/NxWidgets/UnitTests/nxwm/Makefile +++ b/NxWidgets/UnitTests/nxwm/Makefile @@ -54,12 +54,26 @@ else CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} endif +# Add the path to the NxWM include directory to the CFLAGS + +NXWM_DIR="$(TESTDIR)/../../nxwm" +NXWM_INC="$(NXWM_DIR)/include" +NXWM_LIB="$(NXWM_DIR)/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)/../../tools" ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh -# Hello, World! C++ Example +# NxWM unit test ASRCS = CSRCS = @@ -92,7 +106,7 @@ STACKSIZE = 2048 VPATH = all: .built -.PHONY: clean depend context disclean chkcxx chklib +.PHONY: clean depend context disclean chkcxx chklibnxwidgets chklibnxwm # Object file creation targets @@ -121,7 +135,7 @@ endif # Verify that the NXWidget library has been built -chklib: +chklibnxwidgets: @( \ if [ ! -e "$(NXWIDGETS_LIB)" ]; then \ echo "$(NXWIDGETS_LIB) does not exist."; \ @@ -131,18 +145,34 @@ chklib: fi; \ ) +# Verify that the NxWM library has been built + +chklibnxwm: + @( \ + 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. chklib does the work. +$(NXWIDGETS_LIB): # Just to keep make happy. chklibnxwidgets does the work. + +$(NXWM_LIB): # Just to keep make happy. chklibnxwm does the work. -.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB) +.built: chkcxx chklibnxwidgets chklibnxwm $(OBJS) $(NXWIDGETS_LIB) @( for obj in $(OBJS) ; do \ $(call ARCHIVE, $(BIN), $${obj}); \ done ; ) ifeq ($(WINTOOL),y) @$(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) + @$(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWM_DIR) else @$(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR) + @$(ARCHIVER) -p "$(CROSSDEV)" $(BIN) $(NXWM_DIR) endif @touch .built |