diff --git a/Makefile b/Makefile index cf7a57c83da..9d14291ce93 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ ############################################################################ # Makefile # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ -include .config ifeq ($(CONFIG_WINDOWS_NATIVE),y) -include Makefile.win +include tools/Makefile.win else -include Makefile.unix +include tools/Makefile.unix endif diff --git a/Directories.mk b/tools/Directories.mk similarity index 99% rename from Directories.mk rename to tools/Directories.mk index cabca719ab1..974a69c8d3a 100644 --- a/Directories.mk +++ b/tools/Directories.mk @@ -1,5 +1,5 @@ ############################################################################ -# Directories.mk +# tools/Directories.mk # # Copyright (C) 2007-2012, 2014, 2016-2017 Gregory Nutt. All rights # reserved. diff --git a/FlatLibs.mk b/tools/FlatLibs.mk similarity index 99% rename from FlatLibs.mk rename to tools/FlatLibs.mk index 8d77d4283c2..88c015f3c02 100644 --- a/FlatLibs.mk +++ b/tools/FlatLibs.mk @@ -1,5 +1,5 @@ ############################################################################ -# FlatLibs.mk +# tools/FlatLibs.mk # # Copyright (C) 2007-2012, 2014, 2016-2018 Gregory Nutt. All rights # reserved. diff --git a/KernelLibs.mk b/tools/KernelLibs.mk similarity index 99% rename from KernelLibs.mk rename to tools/KernelLibs.mk index 89fb07adb92..50999914d42 100644 --- a/KernelLibs.mk +++ b/tools/KernelLibs.mk @@ -1,5 +1,5 @@ ############################################################################ -# KernelLibs.mk +# tools/KernelLibs.mk # # Copyright (C) 2014, 2016, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/LibTargets.mk b/tools/LibTargets.mk similarity index 99% rename from LibTargets.mk rename to tools/LibTargets.mk index 3324df3a1c7..16098830903 100644 --- a/LibTargets.mk +++ b/tools/LibTargets.mk @@ -1,5 +1,5 @@ ############################################################################ -# LibTargets.mk +# tools/LibTargets.mk # # Copyright (C) 2007-2012, 2014, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/Makefile.unix b/tools/Makefile.unix similarity index 99% rename from Makefile.unix rename to tools/Makefile.unix index 20e28906164..969bbce69d6 100644 --- a/Makefile.unix +++ b/tools/Makefile.unix @@ -1,5 +1,5 @@ ############################################################################ -# Makefile.unix +# tools/Makefile.unix # # Copyright (C) 2007-2012, 2014-2015, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -120,7 +120,7 @@ APPDIR := ${shell if [ -r $(CONFIG_APPS_DIR)/Makefile ]; then echo "$(CONFIG_APP # then this holds only the directories containing user files. If # CONFIG_BUILD_KERNEL is selected, then applications are not build at all. -include Directories.mk +include tools/Directories.mk # # Extra objects used in the final link. @@ -145,12 +145,12 @@ endif # 'make export' is ifeq ($(CONFIG_BUILD_PROTECTED),y) -include ProtectedLibs.mk +include tools/ProtectedLibs.mk else ifeq ($(CONFIG_BUILD_KERNEL),y) -include KernelLibs.mk +include tools/KernelLibs.mk else -include FlatLibs.mk +include tools/FlatLibs.mk endif endif @@ -381,7 +381,7 @@ check_context: # execution will then be built from those libraries. The following targets # build those libraries. -include LibTargets.mk +include tools/LibTargets.mk # pass1 and pass2 # diff --git a/Makefile.win b/tools/Makefile.win similarity index 99% rename from Makefile.win rename to tools/Makefile.win index f02786f5297..4f7493bf6dd 100644 --- a/Makefile.win +++ b/tools/Makefile.win @@ -1,5 +1,5 @@ ############################################################################ -# Makefile.win +# tools/Makefile.win # # Copyright (C) 2012, 2015, 2018 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -113,7 +113,7 @@ APPDIR := ${shell if exist "$(CONFIG_APPS_DIR)\Makefile" echo $(CONFIG_APPS_DIR) # then this holds only the directories containing user files. If # CONFIG_BUILD_KERNEL is selected, then applications are not build at all. -include Directories.mk +include tools\Directories.mk # # Extra objects used in the final link. @@ -138,12 +138,12 @@ endif # 'make export' is ifeq ($(CONFIG_BUILD_PROTECTED),y) -include ProtectedLibs.mk +include tools\ProtectedLibs.mk else ifeq ($(CONFIG_BUILD_KERNEL),y) -include KernelLibs.mk +include tools\KernelLibs.mk else -include FlatLibs.mk +include tools\FlatLibs.mk endif endif @@ -393,7 +393,7 @@ check_context: # execution will then be built from those libraries. The following targets # build those libraries. -include LibTargets.mk +include tools/LibTargets.mk # pass1 and pass2 # diff --git a/ProtectedLibs.mk b/tools/ProtectedLibs.mk similarity index 99% rename from ProtectedLibs.mk rename to tools/ProtectedLibs.mk index 025cc5992dd..91a19d214d8 100644 --- a/ProtectedLibs.mk +++ b/tools/ProtectedLibs.mk @@ -1,5 +1,5 @@ ############################################################################ -# ProtectedLibs.mk +# tools/ProtectedLibs.mk # # Copyright (C) 2007-2012, 2014, 2016-2018 Gregory Nutt. All rights # reserved. diff --git a/tools/README.txt b/tools/README.txt index 61b315a293d..23fcb75d3c3 100644 --- a/tools/README.txt +++ b/tools/README.txt @@ -12,10 +12,19 @@ README.txt This file! -Config.mk +Makefile.* +---------- + + Makefile.unix is the Makefile used when building NuttX in Unix-like + systems. It is selected from the top-level Makefile. + + Makefile.win is the Makefile used when building natively under + Windows. It is selected from the top-level Makefile. + +*.mk --------- - This file contains common definitions used by many configuration files. + Config.mk contains common definitions used by many configuration files. This file (along with /.config) must be included at the top of each configuration-specific Make.defs file like: @@ -25,6 +34,11 @@ Config.mk Subsequent logic within the configuration-specific Make.defs file may then override these default definitions as necessary. + Libraries.mk has the build rules for all NuttX libraries. + + FlatLibs.mk, ProtectedLibs.mk, and KernelLib.mk: These control the + selection of libraries to be built, depending on the selected build mode. + configure.sh configure.bat configure.c, cfgparser.c, and cfgparser.h