diff options
Diffstat (limited to 'nuttx/tools/Config.mk')
-rw-r--r-- | nuttx/tools/Config.mk | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/nuttx/tools/Config.mk b/nuttx/tools/Config.mk index 4cdda113c..aafb58f35 100644 --- a/nuttx/tools/Config.mk +++ b/nuttx/tools/Config.mk @@ -2,7 +2,9 @@ # Config.mk # Global build rules and macros. # +# Copyright (C) 2011 Gregory Nutt. All rights reserved. # Author: Richard Cochran +# Gregory Nutt <gnutt@nuttx.org> # # This file (along with $(TOPDIR)/.config) must be included by every # configuration-specific Make.defs file. @@ -43,6 +45,12 @@ CONFIG_ARCH := $(patsubst "%",%,$(strip $(CONFIG_ARCH))) CONFIG_ARCH_CHIP := $(patsubst "%",%,$(strip $(CONFIG_ARCH_CHIP))) CONFIG_ARCH_BOARD := $(patsubst "%",%,$(strip $(CONFIG_ARCH_BOARD))) +# Some defaults just to prohibit some bad behavior if for some reason they +# are not defined + +OBJEXT ?= .o +LIBEXT ?= .a + # DELIM - Path segment delimiter character # # Depends on this settings defined in board-specific defconfig file installed @@ -167,12 +175,30 @@ define ARCHIVE endef endif +# DELFILE - Delete one file + +ifeq ($(CONFIG_WINDOWS_NATIVE),y) +define DELFILE + $(Q) if exist $1 (del /f /q $1) +endef +else +define CLEAN + $(Q) rm -f $1 +endef +endif + +# CLEAN - Default clean target + ifeq ($(CONFIG_WINDOWS_NATIVE),y) define CLEAN - $(Q) rm -f *.o *.a + $(Q) if exist *$(OBJEXT) (del /f /q *$(OBJEXT)) + $(Q) if exist *$(LIBEXT) (del /f /q *$(LIBEXT)) + $(Q) if exist *~ (del /f /q *~) + $(Q) if exist (del /f /q .*.swp) endef else define CLEAN - $(Q) rm -f *.o *.a *~ .*.swp + $(Q) rm -f *$(OBJEXT) *$(LIBEXT) *~ .*.swp endef endif +
\ No newline at end of file |