Skip to content

Commit

Permalink
Merge pull request #40 from errordeveloper/cross-native
Browse files Browse the repository at this point in the history
Enable `native` target for cross-compiling
  • Loading branch information
adamdunkels committed Nov 21, 2012
2 parents 9f6689e + d0f18e5 commit 135ae83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile.include
Expand Up @@ -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.
Expand Down
16 changes: 8 additions & 8 deletions cpu/native/Makefile.native
Expand Up @@ -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
Expand Down

0 comments on commit 135ae83

Please sign in to comment.