build: Replace $(TOPDIR)/Make.defs with $(APPDIR)/Make.defs

and move NUTTXLIB defintion to the common place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-05-20 12:35:03 +08:00 committed by Alan Carvalho de Assis
parent 6daab509ca
commit deaa6c5b7b
316 changed files with 332 additions and 401 deletions

View File

@ -35,8 +35,6 @@
#
############################################################################
include $(APPDIR)/Make.defs
# If this is an executable program (with MAINSRC), we must build it as a
# loadable module for the KERNEL build (always) or if the tristate module
# has the value "m"
@ -61,6 +59,12 @@ else
CWD = $(CURDIR)
endif
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
LDLIBS += "${shell cygpath -w $(BIN)}"
else
LDLIBS += $(BIN)
endif
SUFFIX = $(subst $(DELIM),.,$(CWD))
PROGNAME := $(shell echo $(PROGNAME))

View File

@ -33,7 +33,6 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Sub-directories

View File

@ -34,6 +34,19 @@
#
############################################################################
TOPDIR ?= $(APPDIR)/import
include $(TOPDIR)/Make.defs
# The GNU make CURDIR will always be a POSIX-like path with forward slashes
# as path segment separators. This is fine for the above inclusions but
# will cause problems later for the native build. If we know that this is
# a native build, then we need to fix up the APPDIR path for subsequent
# use
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
APPDIR := ${shell echo %CD%}
endif
# Application Directories
# BUILDIRS is the list of top-level directories containing Make.defs files
@ -103,7 +116,7 @@ CFLAGS += ${shell $(INCDIR) "$(CC)" "$(APPDIR)$(DELIM)include"}
CXXFLAGS += ${shell $(INCDIR) "$(CC)" "$(APPDIR)$(DELIM)include"}
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
LDLIBS ?= "${shell cygpath -w $(BIN)}"
NUTTXLIB ?= "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else
LDLIBS ?= $(BIN)
NUTTXLIB ?= "$(TOPDIR)$(DELIM)staging"
endif

View File

@ -36,20 +36,8 @@
############################################################################
APPDIR = $(CURDIR)
TOPDIR ?= $(APPDIR)/import
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# The GNU make CURDIR will always be a POSIX-like path with forward slashes
# as path segment separators. This is fine for the above inclusions but
# will cause problems later for the native build. If we know that this is
# a native build, then we need to fix up the APPDIR path for subsequent
# use
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
APPDIR := ${shell echo %CD%}
endif
# Symbol table for loadable apps.
SYMTABSRC = symtab_apps.c

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Source and object files

View File

@ -18,7 +18,7 @@
#
############################################################################/
-include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# SocketCAN userspace utilities and tools candump tool
# https://github.com/linux-can/can-utils/blob/master/candump.c

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# CAN utility library

View File

@ -18,7 +18,7 @@
#
############################################################################/
-include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# SocketCAN userspace utilities and tools cansend tool
# https://github.com/linux-can/can-utils/blob/master/cansend.c

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
WGET = wget
UNPACK = unzip

View File

@ -18,7 +18,7 @@
#
############################################################################/
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# SocketCAN userspace utilities and tools library
# https://github.com/linux-can/can-utils

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# CAN utility library

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# ABNTCODI built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# ADC example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
PROGNAME = $(CONFIG_EXAMPLES_ADXL372_TEST_PROGNAME)
PRIORITY = $(CONFIG_EXAMPLES_ADXL372_TEST_PRIORITY)

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Hello, World! Example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# RTC driver alarm test built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# APA102 built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Hello, World! built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
-include $(SDKDIR)/Make.defs
# Audio application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# BAS test volume mounter

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Battery built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
-include $(SDKDIR)/Make.defs
# sixaxis built-in application info

View File

@ -35,7 +35,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# BMP180 Barometer sensor example built-in application info

View File

@ -34,7 +34,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Discover built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# LED driver test built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# camera built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# NuttX NX Graphics Example.

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
PROGNAME = canard
PRIORITY = SCHED_PRIORITY_DEFAULT

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# cctype verification

View File

@ -1,5 +1,5 @@
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
-include $(SDKDIR)/Make.defs
PROGNAME = $(CONFIG_EXAMPLES_CHARGER_PROGNAME)

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
MAINSRC = chat_main.c

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Chronometer built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# CONFIGDATA Unit Test

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# do nothing loop to use up cpu time

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# CROMFS Example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# DAC tool

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# DHCP Daemon Example

View File

@ -35,7 +35,7 @@
# TOPDIR must be defined on the make command line
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
OBJS = host.hobj dhcpd.hobj
BIN = dhcpd

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Dhtxx, World! built-in application info

View File

@ -36,7 +36,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Discover built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Hello, World! Example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# dsptest built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# ELF Example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
ALL_SUBDIRS = errno hello helloxx longjmp mutex pthread signal task struct
BUILD_SUBDIRS = errno hello struct signal

View File

@ -33,13 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else
NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
endif
include $(APPDIR)/Make.defs
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic

View File

@ -33,13 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else
NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
endif
include $(APPDIR)/Make.defs
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic

View File

@ -33,13 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else
NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
endif
include $(APPDIR)/Make.defs
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic

View File

@ -33,13 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else
NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
endif
include $(APPDIR)/Make.defs
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic

View File

@ -33,13 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else
NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
endif
include $(APPDIR)/Make.defs
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic

View File

@ -33,13 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else
NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
endif
include $(APPDIR)/Make.defs
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic

View File

@ -33,13 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else
NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
endif
include $(APPDIR)/Make.defs
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic

View File

@ -33,13 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else
NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
endif
include $(APPDIR)/Make.defs
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic

View File

@ -33,13 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else
NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
endif
include $(APPDIR)/Make.defs
ifeq ($(CONFIG_EXAMPLES_ELF_SYSCALL),y)
LDELFFLAGS += -Bstatic

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# embedlog example built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# FB, World! built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# fboverlay built-in application info

View File

@ -34,7 +34,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# SMART FLASH block device test

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# FLOWC Test

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# FT80X example built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# FTPC Client Application

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
MAINSRC = ftpd_main.c

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# GPIO, World! built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# GPS built-in application info

View File

@ -18,7 +18,7 @@
#
############################################################################/
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# hdc1008 example built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Hello, World! built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Hello, World! C++ Example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# USB Host HID keyboard Example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# hts221_reader example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# I2S character driver test

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# I2S character driver test

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
PROGNAME = igmp
PRIORITY = SCHED_PRIORITY_DEFAULT

View File

@ -35,7 +35,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Hello, World! built-in application info

View File

@ -35,7 +35,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# INA226 built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# ini_dumper example built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Hello, World! built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# cJSON built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# LED driver test built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
PROGNAME = $(CONFIG_EXAMPLES_LIS3DSH_READER_PROGNAME)
PRIORITY = SCHED_PRIORITY_DEFAULT

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# lsm303_reader example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
PROGNAME = $(CONFIG_EXAMPLES_LSM330SPI_TEST_PROGNAME)
PRIORITY = $(CONFIG_EXAMPLES_LSM330SPI_TEST_PRIORITY)

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# lsm6dsl_reader example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# LittleVGL demo built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# max31855 built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Media test application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# MLD Networking Example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# MLX90614 built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# FreeModBus demo built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Modbus Master built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Module example built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
ALL_SUBDIRS = chardev
BUILD_SUBDIRS = chardev

View File

@ -33,13 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
NUTTXLIB = "${shell cygpath -w $(TOPDIR)$(DELIM)staging}"
else
NUTTXLIB = "$(TOPDIR)$(DELIM)staging"
endif
include $(APPDIR)/Make.defs
CMODULEFLAGS += $(KDEFINE)

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# mount() test

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# MTD Partition Example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# MTD R/W buffer test Example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Netlink NETLINK_ROUTE built-in application info

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Network loopback Example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Network packet socket example

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Basic TCP networking test

View File

@ -33,7 +33,7 @@
#
############################################################################
include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
# Basic nRF24L01+ terminal demonstration

Some files were not shown because too many files have changed in this diff Show More