mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-02-25 10:29:00 +00:00
Merge pull request #40 from errordeveloper/cross-native
Enable `native` target for cross-compiling
This commit is contained in:
commit
135ae838de
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user