Cleanup of global Makefiles
This commit is contained in:
parent
7cf843f601
commit
3ac27dc7c9
@ -39,16 +39,10 @@ ifdef CI
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Prevent Make from remaking any makefiles. This was particularly an
|
|
||||||
# issue when you had a Makefile with a suffix equal to that of $(TARGET),
|
|
||||||
# as it managed to match with the %.$(TARGET) rule, which in turn screwed
|
|
||||||
# everything up.
|
|
||||||
Makefile.%: ;
|
|
||||||
|
|
||||||
OBJECTDIR := obj_$(TARGET)
|
OBJECTDIR := obj_$(TARGET)
|
||||||
|
|
||||||
LOWERCASE := -abcdefghijklmnopqrstuvwxyz/
|
LOWERCASE = -abcdefghijklmnopqrstuvwxyz/
|
||||||
UPPERCASE := _ABCDEFGHIJKLMNOPQRSTUVWXYZ_
|
UPPERCASE = _ABCDEFGHIJKLMNOPQRSTUVWXYZ_
|
||||||
TARGET_UPPERCASE := ${strip ${shell echo $(TARGET) | sed y!$(LOWERCASE)!$(UPPERCASE)!}}
|
TARGET_UPPERCASE := ${strip ${shell echo $(TARGET) | sed y!$(LOWERCASE)!$(UPPERCASE)!}}
|
||||||
CFLAGS += -DCONTIKI=1
|
CFLAGS += -DCONTIKI=1
|
||||||
CFLAGS += -DCONTIKI_TARGET_$(TARGET_UPPERCASE)=1
|
CFLAGS += -DCONTIKI_TARGET_$(TARGET_UPPERCASE)=1
|
||||||
@ -270,7 +264,7 @@ CONTIKI_CPU_DIRS_CONCAT = ${addprefix $(CONTIKI_CPU)/, \
|
|||||||
$(CONTIKI_CPU_DIRS)}
|
$(CONTIKI_CPU_DIRS)}
|
||||||
CONTIKI_ARCH_DIRS = ${addprefix $(CONTIKI)/, arch}
|
CONTIKI_ARCH_DIRS = ${addprefix $(CONTIKI)/, arch}
|
||||||
|
|
||||||
SOURCEDIRS = $(CONTIKI) $(PROJECTDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) \
|
SOURCEDIRS = . $(PROJECTDIRS) $(CONTIKI_TARGET_DIRS_CONCAT) \
|
||||||
$(CONTIKI_ARCH_DIRS) $(CONTIKI_CPU_DIRS_CONCAT) \
|
$(CONTIKI_ARCH_DIRS) $(CONTIKI_CPU_DIRS_CONCAT) \
|
||||||
$(CONTIKIDIRS) $(MODULEDIRS) $(EXTERNALDIRS) \
|
$(CONTIKIDIRS) $(MODULEDIRS) $(EXTERNALDIRS) \
|
||||||
$(dir $(target_makefile))
|
$(dir $(target_makefile))
|
||||||
@ -494,6 +488,12 @@ endif
|
|||||||
# the match-anything rule below instead.
|
# the match-anything rule below instead.
|
||||||
%: %.c
|
%: %.c
|
||||||
|
|
||||||
|
# Prevent Make from remaking any makefiles. This was particularly an
|
||||||
|
# issue when you had a Makefile with a suffix equal to that of $(TARGET),
|
||||||
|
# as it managed to match with the %.$(TARGET) rule, which in turn screwed
|
||||||
|
# everything up.
|
||||||
|
Makefile.%: ;
|
||||||
|
|
||||||
ifeq ($(PLATFORM_ACTION),skip)
|
ifeq ($(PLATFORM_ACTION),skip)
|
||||||
# Skip this target.
|
# Skip this target.
|
||||||
$(CONTIKI_PROJECT):
|
$(CONTIKI_PROJECT):
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
MAKEFILE := $(lastword $(MAKEFILE_LIST))
|
|
||||||
BASE_DIR := $(realpath $(dir $(MAKEFILE)))
|
|
||||||
|
|
||||||
CC = arm-none-eabi-gcc
|
CC = arm-none-eabi-gcc
|
||||||
CPP = arm-none-eabi-cpp
|
CPP = arm-none-eabi-cpp
|
||||||
LD = arm-none-eabi-gcc
|
LD = arm-none-eabi-gcc
|
||||||
@ -36,9 +33,8 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
### Use CMSIS and the existing dbg-io from arch/cpu/arm/common
|
### Use CMSIS and the existing dbg-io from arch/cpu/arm/common
|
||||||
CONTIKI_ARM_DIRS += .
|
CONTIKI_ARM_DIRS += . common/dbg-io
|
||||||
CONTIKI_ARM_DIRS += ../common/dbg-io
|
CONTIKI_CPU_DIRS += $(addprefix ../arm/, $(CONTIKI_ARM_DIRS))
|
||||||
CONTIKI_CPU_DIRS += $(realpath $(addprefix $(BASE_DIR)/, $(CONTIKI_ARM_DIRS)))
|
|
||||||
|
|
||||||
### CPU-dependent cleanup files
|
### CPU-dependent cleanup files
|
||||||
CLEAN += *.elf *.bin *.lst *.hex *.i16hex
|
CLEAN += *.elf *.bin *.lst *.hex *.i16hex
|
||||||
|
Loading…
Reference in New Issue
Block a user