Most of the changes needed to support Windows native clean; distclean is has a problem

git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5367 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-11-17 18:54:53 +00:00
parent cc099195b8
commit d4dca58d93
142 changed files with 861 additions and 616 deletions
+29 -3
View File
@@ -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 CLEAN
$(Q) rm -f *.o *.a
define DELFILE
$(Q) if exist $1 (del /f /q $1)
endef
else
define CLEAN
$(Q) rm -f *.o *.a *~ .*.swp
$(Q) rm -f $1
endef
endif
# CLEAN - Default clean target
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
define CLEAN
$(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 *$(OBJEXT) *$(LIBEXT) *~ .*.swp
endef
endif
+14 -4
View File
@@ -122,8 +122,18 @@ mkdeps: mkdeps$(HOSTEXEEXT)
endif
clean:
$(Q) rm -f *.o *.a *~ .*.swp
$(Q) rm -f mkdeps mkconfig mksyscall mkversion bdf-converter
$(Q) rm -f mkdeps.exe mkconfig.exe mksyscall.exe mkversion.exe bdf-converter.exe
$(call DELFILE mkdeps)
$(call DELFILE mkdeps.exe)
$(call DELFILE mkconfig)
$(call DELFILE mkconfig.exe)
$(call DELFILE Make.dep)
$(call DELFILE mksyscall)
$(call DELFILE mksyscall.exe)
$(call DELFILE mkversion)
$(call DELFILE mkversion.exe)
$(call DELFILE bdf-converter)
$(call DELFILE bdf-converter.exe)
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
$(Q) rm -rf *.dSYM
endif
$(call CLEAN)