diff --git a/Makefile.include b/Makefile.include index 1acfa4ebb..d257eeabb 100644 --- a/Makefile.include +++ b/Makefile.include @@ -228,10 +228,10 @@ ifndef CUSTOM_RULE_LINK endif %.ramprof: %.$(TARGET) - nm -S -td --size-sort $< | grep -i " [abdrw] " | cut -d' ' -f2,4 + $(NM) -S -td --size-sort $< | grep -i " [abdrw] " | cut -d' ' -f2,4 %.flashprof: %.$(TARGET) - nm -S -td --size-sort $< | grep -i " [t] " | cut -d' ' -f2,4 + $(NM) -S -td --size-sort $< | grep -i " [t] " | cut -d' ' -f2,4 # Don't treat %.$(TARGET) as an intermediate file because it is # in fact the primary target. diff --git a/cpu/native/Makefile.native b/cpu/native/Makefile.native index 56fb6688b..9f0ce13fb 100644 --- a/cpu/native/Makefile.native +++ b/cpu/native/Makefile.native @@ -3,21 +3,21 @@ CONTIKI_CPU_DIRS = . net CONTIKI_SOURCEFILES += mtarch.c rtimer-arch.c elfloader-stub.c watchdog.c ### Compiler definitions -CC = gcc -LD = gcc -AS = as -NM = nm -OBJCOPY = objcopy -STRIP = strip +CC ?= gcc +LD ?= gcc +AS ?= as +NM ?= nm +OBJCOPY ?= objcopy +STRIP ?= strip ifdef WERROR CFLAGSWERROR=-Werror -pedantic -std=c99 -Werror endif CFLAGSNO = -Wall -g -I/usr/local/include $(CFLAGSWERROR) CFLAGS += $(CFLAGSNO) -O ifeq ($(HOST_OS),Linux) - LDFLAGS = -Wl,-Map=contiki-$(TARGET).map,-export-dynamic + LDFLAGS += -Wl,-Map=contiki-$(TARGET).map,-export-dynamic else - LDFLAGS = -Wl + LDFLAGS += -Wl endif ### Compilation rules