Skip to content

Commit

Permalink
native: remove non required NATIVEINCLUDES
Browse files Browse the repository at this point in the history
Some modules used a 'NATIVEINCLUDES' with different include path and no other
included directories.
It was defining basic 'include' in a different order and not using other things
defined in INCLUDES.
After doing some checks with the given include path and possible conflicting
files, there should be no conflict when using the default one.

* No common headers between all the NATIVEINCLUDES directories
* No common headers files between board/native/include, cpu/native/include and
  other files in the repository (except other boards/cpus of course).
  • Loading branch information
cladmi committed Mar 20, 2018
1 parent b5554bc commit 93a521c
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 23 deletions.
2 changes: 0 additions & 2 deletions boards/native/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ MODULE = board
DIRS = drivers

include $(RIOTBASE)/Makefile.base

INCLUDES = $(NATIVEINCLUDES)
12 changes: 4 additions & 8 deletions boards/native/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
export NATIVEINCLUDES += -DNATIVE_INCLUDES
export NATIVEINCLUDES += -I$(RIOTBOARD)/$(BOARD)/include/
export NATIVEINCLUDES += -I$(RIOTBASE)/core/include/
export NATIVEINCLUDES += -I$(RIOTBASE)/drivers/include/

export CPU = native

# Configuration for core/include/kernel_types.h
CFLAGS += -DNATIVE_INCLUDES

USEMODULE += native-drivers

# toolchain:
Expand Down Expand Up @@ -117,7 +115,7 @@ debug-valgrind-server: export VALGRIND_FLAGS ?= --vgdb=yes --vgdb-error=0 -v \
term-cachegrind: export CACHEGRIND_FLAGS += --tool=cachegrind
term-gprof: export TERMPROG = GMON_OUT_PREFIX=gmon.out $(ELFFILE)
all-valgrind: export CFLAGS += -DHAVE_VALGRIND_H -g
all-valgrind: export NATIVEINCLUDES += $(shell pkg-config valgrind --cflags)
all-valgrind: export CFLAGS += $(shell pkg-config valgrind --cflags)
all-debug: export CFLAGS += -g
all-cachegrind: export CFLAGS += -g
all-gprof: export CFLAGS += -pg
Expand All @@ -126,8 +124,6 @@ all-asan: export CFLAGS += -fsanitize=address -fno-omit-frame-pointer -g
all-asan: export CFLAGS += -DNATIVE_IN_CALLOC
all-asan: export LINKFLAGS += -fsanitize=address -fno-omit-frame-pointer -g

export INCLUDES += $(NATIVEINCLUDES)

export CFLAGS += -DDEBUG_ASSERT_VERBOSE

# workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624
Expand Down
2 changes: 0 additions & 2 deletions boards/native/drivers/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
MODULE = native-drivers

include $(RIOTBASE)/Makefile.base

INCLUDES = $(NATIVEINCLUDES)
2 changes: 0 additions & 2 deletions cpu/native/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@ ifneq (,$(filter can_linux,$(USEMODULE)))
endif

include $(RIOTBASE)/Makefile.base

INCLUDES = $(NATIVEINCLUDES)
4 changes: 1 addition & 3 deletions cpu/native/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export NATIVEINCLUDES += -I$(RIOTCPU)/native/include -I$(RIOTBASE)/sys/include

# Local include for OSX
ifeq ($(BUILDOSXNATIVE),1)
export NATIVEINCLUDES += -I$(RIOTCPU)/native/osx-libc-extra
INCLUDES += -I$(RIOTCPU)/native/osx-libc-extra
endif

USEMODULE += periph
Expand Down
2 changes: 0 additions & 2 deletions cpu/native/mtd/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
MODULE := mtd_native

include $(RIOTBASE)/Makefile.base

INCLUDES = $(NATIVEINCLUDES)
2 changes: 0 additions & 2 deletions cpu/native/netdev_tap/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
include $(RIOTBASE)/Makefile.base

INCLUDES = $(NATIVEINCLUDES)
2 changes: 0 additions & 2 deletions cpu/native/socket_zep/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
include $(RIOTBASE)/Makefile.base

INCLUDES = $(NATIVEINCLUDES)

0 comments on commit 93a521c

Please sign in to comment.