mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-08-16 07:28:57 +00:00
This patch adds the helpers.h. This file should contain only x86-related helper functions and macros. For now, we define the BIT macro and halt() helpers which will be used in upcoming patches. Additionally, this patch also changes loader.S to call the halt().
34 lines
688 B
Makefile
34 lines
688 B
Makefile
CONTIKI_CPU_DIRS = .
|
|
|
|
CONTIKI_SOURCEFILES += mtarch.c gdt.c helpers.S
|
|
|
|
### Compiler definitions
|
|
CC = gcc
|
|
LD = gcc
|
|
AS = as
|
|
OBJCOPY = objcopy
|
|
SIZE = size
|
|
STRIP = strip
|
|
CFLAGSNO = -Wall -g -I/usr/local/include
|
|
CFLAGS += $(CFLAGSNO)
|
|
ifeq ($(HOST_OS),Linux)
|
|
LDFLAGS = -Wl,-Map=contiki-$(TARGET).map,-export-dynamic
|
|
else
|
|
LDFLAGS = -Wl
|
|
endif
|
|
|
|
### Compilation rules
|
|
|
|
%.so: $(OBJECTDIR)/%.o
|
|
$(LD) -shared -o $@ $^
|
|
|
|
ifdef CORE
|
|
.PHONY: symbols.c symbols.h
|
|
symbols.c symbols.h:
|
|
$(NM) $(CORE) | awk -f $(CONTIKI)/tools/mknmlist > symbols.c
|
|
else
|
|
symbols.c symbols.h:
|
|
cp ${CONTIKI}/tools/empty-symbols.c symbols.c
|
|
cp ${CONTIKI}/tools/empty-symbols.h symbols.h
|
|
endif
|