build: Replace all -I to INCDIR

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-05-20 16:29:35 +08:00 committed by Abdelatif Guettouche
parent ead498a788
commit ea135b89c6
15 changed files with 27 additions and 34 deletions

View File

@ -48,7 +48,8 @@ LIBCANARD_DRVDIR = $(LIBCANARD_SRCDIR)$(DELIM)drivers$(DELIM)nuttx
APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)canutils
CFLAGS += -std=c99 -I$(APPS_INCDIR) -DCANARD_ASSERT=DEBUGASSERT
CFLAGS += -std=c99 -DCANARD_ASSERT=DEBUGASSERT
CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPS_INCDIR)}
CSRCS = $(LIBCANARD_SRCDIR)$(DELIM)canard.c $(LIBCANARD_DRVDIR)$(DELIM)canard_nuttx.c

View File

@ -40,7 +40,7 @@ PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = $(CONFIG_EXAMPLES_LIBCANARD_STACKSIZE)
MODULE = $(CONFIG_EXAMPLES_LIBCANARD)
CFLAGS += -I$(APPDIR)/include/canutils
CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/include/canutils}
MAINSRC = canard_main.c
include $(APPDIR)/Application.mk

View File

@ -35,8 +35,6 @@
include $(TOPDIR)/Make.defs
CELFFLAGS += -I.
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else

View File

@ -45,6 +45,5 @@ MODULE = $(CONFIG_EXAMPLES_EMBEDLOG)
# embedlog Example
MAINSRC = embedlog_main.c
CFLAGS += -I$(APPDIR)/include/system
include $(APPDIR)/Application.mk

View File

@ -37,7 +37,7 @@
* Included Files
****************************************************************************/
#include <embedlog.h>
#include <system/embedlog.h>
#include <errno.h>
#include <nuttx/config.h>
#include <stdio.h>
@ -80,7 +80,7 @@ static struct el_options g_el;
*
* Description:
* Presents how to use options and how it's rendered. This assumes all
* options are enabled in compile time. If any of the options is not enabled
* options are enabled in compile time. If any of the options isn't enabled
* in compile time, setting it will have no effect and logs will vary.
*
* Input Parameters:
@ -284,7 +284,7 @@ static void el_print_file(const char *workdir)
{
if (errno == ENAMETOOLONG || errno == EINVAL)
{
/* These are the only unrecoverable errors that embedlog may return,
/* These are the only unrecoverable errors embedlog may return,
* any other error it actually a warning, telling user that file
* could not have been opened now, but every el_print function with
* output to file enabled, will try to reopen file. This of course
@ -305,9 +305,9 @@ static void el_print_file(const char *workdir)
el_oprint(OELI, "Now we enabled log rotation");
el_oprint(OELI, "If log cannot fit in current file");
el_oprint(OELI, "it will be stored in new file");
el_oprint(OELI, "and if library creates EL_FROTATE_NUMBER files");
el_oprint(OELI, "oldest file will be deleted and new file will be created");
el_oprint(OELI, "it will be stored in new file and");
el_oprint(OELI, "if library creates EL_FROTATE_NUMBER files oldest");
el_oprint(OELI, "file will be deleted and new file will be created");
el_oprint(OELI, "run this program multiple times and see how it works");
}
@ -331,8 +331,8 @@ int main(int argc, FAR char *argv[])
el_oinit(&g_el);
el_oprint(OELI, "Right after init, embedlog will print to stderr with just "
"log level information - these are default settings.");
el_oprint(OELI, "Right after init, embedlog will print to stderr with "
"just log level information - these are default settings.");
el_print_options();
el_print_memory();

View File

@ -45,7 +45,6 @@ MODULE = $(CONFIG_EXAMPLES_INI_DUMPER)
# ini_dumper Example
MAINSRC = ini_dumper_main.c
CFLAGS += -I$(APPDIR)/include/fsutils
# needed to make compiler happy about wrong function pointers
# different function pointer is used depending on that define

View File

@ -41,7 +41,7 @@
#include <stdio.h>
#include "fsutils/ini.h"
#include <fsutils/ini.h>
/****************************************************************************
* Private Functions
@ -83,12 +83,12 @@ int main(int argc, FAR char *argv[])
return 1;
}
printf("\n------ --------------- ------------- ---------------------------\n");
printf("------ --------------- ------------- -------------------------\n");
printf(" line section key value\n");
printf("------ --------------- ------------- ---------------------------\n");
printf("------ --------------- ------------- -------------------------\n");
ret = ini_parse(argv[1], ini_dump, NULL);
printf("------ --------------- ------------- ---------------------------\n");
printf("------ --------------- ------------- -------------------------\n");
fprintf(stderr, "ini_parse() exited with %d\n", ret);
return 0;
}

View File

@ -35,8 +35,6 @@
include $(TOPDIR)/Make.defs
CFLAGS += -I.
BIN = struct
R1SRCS = struct_main.c struct_dummy.c

View File

@ -41,6 +41,4 @@ MODULE = $(CONFIG_EXAMPLES_POWERMONITOR)
MAINSRC = powermonitor_main.c
CFLAGS += -I../../../nuttx/arch/arm/src -I../../../nuttx/arch/arm/src/common
include $(APPDIR)/Application.mk

View File

@ -44,7 +44,6 @@ MODULE = $(CONFIG_EXAMPLES_PTYTEST)
# PTY Test! Example
CFLAGS += -I$(APPDIR)/include
MAINSRC = pty_test.c
include $(APPDIR)/Application.mk

View File

@ -41,17 +41,16 @@ include $(TOPDIR)/scripts/Make.defs
# Compiler
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
# Windows-native toolchains
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}" -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include$(DELIM)cxx}"
ARCHCRT0OBJ = "${shell cygpath -w $(TOPDIR)$(DELIM)startup$(DELIM)crt0$(OBJEXT)}"
else
# Linux/Cygwin-native toolchain
ARCHINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include -isystem $(TOPDIR)$(DELIM)include$(DELIM)cxx
ARCHCRT0OBJ = $(TOPDIR)$(DELIM)startup$(DELIM)crt0$(OBJEXT)
endif
ARCHINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include$(DELIM)cxx}
ARCHCFLAGS += -fno-common -pipe
ARCHCXXFLAGS += -fno-common -pipe

View File

@ -56,7 +56,8 @@ CJSON_SRCDIR = $(CJSON_UNPACKNAME)
APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)netutils
CFLAGS += -I$(APPS_INCDIR) -DCJSON_INCLUDE_CONFIG_H
CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPS_INCDIR)}
CFLAGS += -DCJSON_INCLUDE_CONFIG_H
CSRCS = $(CJSON_SRCDIR)$(DELIM)cJSON.c
CSRCS += $(CJSON_SRCDIR)$(DELIM)cJSON_Utils.c

View File

@ -48,7 +48,7 @@ EMBEDLOG_EXT = tar.gz
EMBEDLOG_SOURCES = embedlog-$(EMBEDLOG_VERSION)
EMBEDLOG_TARBALL = $(EMBEDLOG_SOURCES).$(EMBEDLOG_EXT)
CFLAGS += -I$(APPDIR)/include/system
CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)system}
CSRCS = embedlog/src/el-options.c \
embedlog/src/el-perror.c \

View File

@ -48,8 +48,8 @@ PSMQ_EXT = tar.gz
PSMQ_SOURCES = psmq-$(PSMQ_VERSION)
PSMQ_TARBALL = $(PSMQ_SOURCES).$(PSMQ_EXT)
CFLAGS += -I$(APPDIR)/include/system
CFLAGS += -I$(APPDIR)/system/psmq/$(PSMQ_SOURCES)
CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)system}
CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)$(DELIM)system$(DELIM)psmq$(DELIM)$(PSMQ_SOURCES)}
# mandatory source files to compile
CSRCS = $(PSMQ_SOURCES)/lib/psmq.c \

View File

@ -56,7 +56,8 @@ UNITY_SRCDIR = $(UNITY_UNPACKNAME)$(DELIM)src
APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)testing
CFLAGS += -I$(APPS_INCDIR) -DUNITY_INCLUDE_CONFIG_H
CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPS_INCDIR)}
CFLAGS += -DUNITY_INCLUDE_CONFIG_H
CSRCS = $(UNITY_SRCDIR)$(DELIM)unity.c