Commit Graph

98 Commits

Author SHA1 Message Date
Xiang Xiao
7f653a87f7 Makefile: Fix warning: jobserver unavailable: using -j1. Add '+' to parent make rule. 2019-10-29 07:55:02 -06:00
Xiang Xiao
75cd1dfd74 apps/: Move the common variable definitions from other build-related files into apps/Make.defs. 2019-10-17 11:40:39 -06:00
Gregory Nutt
3a23523147 Makefiles: This reverts part of commit cf0365ea9. It restores 'conditional' inclusion of TOPDIR/Make.defs. Otherwise all make targets fail if the board has not been configured. That is okay most of the time, but not for things like clean and distclean which should not depend on being configured. 2019-10-15 09:25:48 +08:00
Xiang Xiao
c901181a39 Makefile, Application.mk: Clean up cygpath usage
1.Remove cygpath from the related path since the conversion isn't necessary
2.Call cygpath inplace for the absolute path to avoid the confusion
2019-10-07 02:55:44 -06:00
Xiang Xiao
cf0365ea92 Clean up Makefile under apps folder no functional changes. 2019-10-04 08:35:46 -06:00
Xiang Xiao
4b49362719 apps/Makefile: Make libapps overwritable. 2019-10-03 14:07:17 -06:00
Xiang Xiao
e73ca15c99 Makefiles: Change ${shell pwd} to $(CURDIR) since pwd doesn't exist on Windows 2019-10-02 07:06:50 -06:00
Xiang Xiao
18bd9acd3d apps/Makefile: Move APPDIR set to the first and remove APPDIR from command line but ensure TOPDIR/BINDIR are always set in command line. 2019-10-01 11:46:38 -06:00
Xiang Xiao
c73af9c3c8 apps/Makefile: Change BIN_DIR to BINDIR to follow nuttx style. 2019-10-01 11:43:40 -06:00
Xiang Xiao
031a5270d0 apps/Makefile: Remove EXE_DIR and put binary into bin folder like nuttx 2019-10-01 11:42:18 -06:00
Pavel Pisa
aa6d5106e7 Makefile: Added support for application-specific export target. Used by nuttx/tools/mkexport.sh. 2019-08-30 07:27:34 -06:00
Anatol Ivanov
3512c3aa5e apps/Makefile: Fix Windows native build patch extension. 2018-11-05 16:09:03 -06:00
Gregory Nutt
c24703e243 Makefile: 'make distclean' should remvoe the exe subdirectory That target must return the directory back to the state is was in when freshly cloned. Appliation.mk: Add logic to strip unnecessary symbols after installing a module. But then I commented it out. Wouldn't we want to keep the symbols if we planned to debug the module? In apps/examples/elf, there is configuration option to determine if the symbols should be stripped or not. Perhaps that is needed here too? 2018-09-04 17:17:41 -06:00
Gregory Nutt
6f6bc758cc Application.mk: Add module install logic. Possibly only needed in KERNEL build mode? Makefile: Simplify import target for KERNEL build. A symbol table is not needed because the KERNEL-mode programs are completely linked. Also fix missing deletion in clean and distclean targets. tools/mksymtab.sh: Fix a typo introduced in previous commit. 2018-09-04 16:04:25 -06:00
Gregory Nutt
3921bbad79 Makefile: In the make import target for kernel build, we must make all objects and populate libapps.a. Application.mk: the PROGIST must be executed unconditionally to support the kernel build. 2018-09-04 12:18:33 -06:00
Gregory Nutt
0d7067936a Makefile: Fix more places where attempts to use Unix-style paths with native Windows toolchain. tools/mksymtab.sh: Add a check just to prevent 'cat' of an empty file list from failing. Right not the root problem is that the are not executables being built or installed in the exe/ directory. That needs to be done by 'make import' but is not happening. 2018-09-04 11:20:19 -06:00
Gregory Nutt
5ac037e4f6 Makefile: platform/Makefile must have BIN_DIR defined on command line even though it is not used. This is because in the Cygwin build, the value of 'BIN_DIR' is passed to 'cygpath'. 'cygpath will fail if BIN_DIR is not defined. 2018-09-04 10:05:55 -06:00
anchao
b5cfd93444 apps/: Modification to build system: Unified application compilation rules 2018-09-03 09:29:56 -06:00
anchao
220653f21c Squashed commit of the following:
Author: anchao <anchao@pinecone.net>

     apps/, most main() function: Correct CONFIG_BUILD_LOADABLE usage
     Loadable apps/: Correct loadable symbol table generate
     apps/system/ubloxmodem:  Fix build break
     apps/examples/ostest: start restart/waitpid/user test from main loop
     apps/nshlib:  Expand reboot and poweroff commands to include a second, optional mode argument

    Author: Gregory Nutt <gnutt@nuttx.org>

     An attempt to fix build issues.  Does not work.
     apps/examples/ostest:  Fix some inappropriate renaming of static functions introduced with recent patches.
     apps/builtin/exec_builtin.c:  Fix a error introduced by recent comments.  Found in build testing.

    Author: anchao <anchao@pinecone.net>

     apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
     apps/Application.mk: introduce MODULE config to simplify tristate(m)
     apps/nsh:  Change the nuttx shell module type to tristate
     apps:  Add loadable application support
     script/mksymtab:  Generate symbol table name by default
     apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-23 11:06:15 -06:00
Gregory Nutt
2f982e9c77 Revert "Squashed commit of the following:"
This reverts commit 25b92edd9f.
2018-08-22 12:06:32 -06:00
anchao
25b92edd9f Squashed commit of the following:
apps/builtin/exec_builtin.c:  Try posix_spawn if builtin apps do not have have an entry point.
    apps/Application.mk: introduce MODULE config to simplify tristate(m)
    apps/nsh:  Change the nuttx shell module type to tristate
    apps:  Add loadable application support
    script/mksymtab:  Generate symbol table name by default
    apps/builtin:  Allow loadable applications can register with apps/builtin.
2018-08-22 09:30:38 -06:00
Gregory Nutt
8e249eb25f apps/Makefile: Fix one missing instance of CONFIG_EXAMPLES_NSH* that was not changes to CONFIG_SYSTEM_NSH*. 2018-08-18 13:34:44 -06:00
Gregory Nutt
922283ee5d Squashed commit of the following:
Merged in masayuki2009/nuttx.apps/loadable_app (pull request #148)

    loadable app support

    * apps: Introduce a build system for loadable apps for nsh.

        This PR consits of following changes. (NOTE: Changes to each
        application will be provided separately)

        apps/nshlib/Kconfig:
        Add 'option modules' to NSH_FILE_APPS so that a user can change
        an application configuration to tristate (y/n/m)

        apps/Make.defs:
        Override COMPILE and COMPILEXX macros to compile loadable apps.
        To make loadable apps, -DLOADABLE_APP is added to the flags.
        Also, introduce ELFLD to link a lodable app.
        Please note that the variable 'LOADABLE' must be defined in
        each application Makefile if you want to make a loadable app.

        apps/Application.mk:
        Add .build target in case of 'LOADABLE=y' which is used to
        link a final loadable application and install the app to
        apps/bin.

        apps/Makefile:
        Add SYMTABSRC and SYMTABOBJ variables for loadable apps which
        will be generated under the apps directory.
        Add make_symbols target which will be called when all applications
        are installed to generate symtab_app.c which is used for
        nsh to inform symbol information to the NuttX kernel.

        Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

    * apps/examples/hello: Apply changes to support a lodable app.

        Kconfig:
        Change the application state from bool to tristate

        Make.defs:
        Change the condition to build. By default, the application is
        not selected (i.e. 'n'), so if other states (i.e. y/m) are
        selected, the application will be compiled.

        Makefile:
        If the application is specified to 'm', the variable 'LOADABLE'
        must be defined here. Also note that other variables (PRIORITY
        and STACKSIZE) can only be used for built-in apps.

        hello_main.c
        Add LOADABLE_APP condition to main().

        Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

    * apps/examples/helloxx: Apply changes to support a lodable app.

        Kconfig:
        Change the application state from bool to tristate

        Make.defs:
        Change the condition to build. By default, the application is
        not selected (i.e. 'n'), so if other states (i.e. y/m) are
        selected, the application will be compiled.

        Makefile:
        If the application is specified to 'm', the variable 'LOADABLE'
        must be defined here. Also note that other variables (PRIORITY
        and STACKSIZE) can only be used for built-in apps.

        helloxx_main.c
        Add LOADABLE_APP condition to main().

        Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

    Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-03 12:05:01 -06:00
Gregory Nutt
cb9e9510d9 apps/Make.defs: Improve the symtab target. tools/mksymtab.sh: Fix a typo. 2018-07-17 11:42:23 -06:00
Gregory Nutt
272bdc0d6e apps Makesystem: Fix an error when building apps/ withtout nuttx/, using only the NuttX export package only and assuming that the nuttx/ directory in not even present. In this case, the problem fixed where the apps/Make.defs file was selecting tools from the /tools directory which does not exist because TOPDIR=apps/import. Instead, for this build case, I have not thought of any option but to duplicate scripts as necessary in the apps/tools directory. Also added a top-level target to compile the symbol table. Misc fixes: quoting in scripts, some errors in script syntax. 2018-07-17 10:42:15 -06:00
Gregory Nutt
401687c04b apps/Makefile and platform/Makefile: At clean_context targets that are now invoked from the main nuttx/Makefile. 2018-05-31 14:48:00 -06:00
Gregory Nutt
634dd7709b apps/, Various Makefiles: Fix mixed references to nuttx/lib. These need to be changed to nuttx/staging. 2018-05-30 11:08:13 -06:00
Gregory Nutt
7a8561728c The last change added .PRECIOUS: $(BIN) to everyway Makefile in hopes the libapps.a will not be deleted on Control-C (unproven so far). However, $(BIN) may contain back slashes in some build platforms and that causes problems for make: It can't handle the backslashes in the .PRECIOUS dependency list. $(BIN) replaced with ../../libapp.a, where the number of ../ depends on the depth of the Makefile in the apps/ source tree. 2017-08-13 11:03:17 -06:00
Gregory Nutt
a66da34f18 All Makefiles: Add .PRECIOUS: apps/libapps.a to every Makefile. Hopefully this will end awkward problems when you Control-C out of a build and libapps.a is deleted. 2017-08-13 09:35:14 -06:00
Gregory Nutt
f5dd9811dc Bitbucket Issue 5, apps build system: The previous patch wasn't complete, it was just idea how to resolve issue. Please, find attached issue5.patch to resolve it. It can be applied on top current apps/master. From Artur Mądrzak. 2017-05-12 07:50:03 -06:00
Gregory Nutt
28c397b3ce Add the dirlinks target to some Makefiles. This plugs some wholes open by last chicken-and-egg build fix 2016-07-28 12:00:03 -06:00
Gregory Nutt
c8d718b211 Makefile: remove dependency on .config 2016-06-08 08:56:20 -06:00
Gregory Nutt
33b876306d preconfig target only executes if .config file changes 2016-06-07 08:58:48 -06:00
Gregory Nutt
8de50dc0cf Add a default value for DELIM 2016-06-07 08:43:21 -06:00
Gregory Nutt
807e51ad05 Update tools/mkkconfig.bat; silence some Makefile output 2016-06-06 12:30:01 -06:00
Sebastien Lorquet
a9aa753fa4 Recursive Kconfig autogeneration 2016-06-02 16:34:00 +02:00
Gregory Nutt
74801cf38e apps/tools/mkkconfig.sh: The top-level Kconfig file is not auto-generated. The autogenerated Kconfig file will be constructed so that every second level directory that contains a Kconfig file will automatically be sourced 2015-08-11 17:49:10 -06:00
Gregory Nutt
c9e0baeb52 Remove all hardcoded directories from Makefile 2015-08-11 16:26:15 -06:00
Gregory Nutt
7b925ccb4c apps/builtin: better fix for building with parallel make
Build-server sometimes fails 'make -j24' with:

 In file included from builtin_list.c:62:0:
 builtin_list.h:1:46: error: 'ts_engine_main' undeclared here (not in a function)
  { "ts_engine", SCHED_PRIORITY_DEFAULT, 2048, ts_engine_main },

or sometimes silently succeeds but generates builds that contain
a random subset of configured NuttX applications. There are two
root causes for this:

1) Recipes for building builtin_list.h and builtin_proto.h are not
   linearizable.
2) Nothing ensures that 'make context' is run first for apps/builtin

This patch addresses both issues.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2015-02-03 08:24:24 -06:00
Gregory Nutt
1c0635604a apps/bin should be removed on clean 2014-09-06 13:42:34 -06:00
Gregory Nutt
b9a650ae8c apps/ make-related fixes. Now builds kernel mode file system 2014-09-06 12:28:30 -06:00
Gregory Nutt
38ecd36a61 Fix clean and distclean targets. Back out a few too many changes made by sed 2014-09-06 08:28:24 -06:00
Gregory Nutt
b77b0b5385 Add support for an installation directory: 2014-09-06 08:13:45 -06:00
Gregory Nutt
d6bcd1a93a Add an install target to all makefiles. For the import build, the top-level Makefile now does two passes: (1) builds libapp.a, then (2) installs the programs (not yet finished) 2014-09-06 08:00:47 -06:00
Gregory Nutt
c38a108343 Copy more logic from nuttx/tools/Config.mk into the Make.defs file. Plus trivial related changes 2014-09-05 11:25:34 -06:00
Gregory Nutt
e8ab24001d Flesh out apps/import/Make.defs a little 2014-09-05 09:16:08 -06:00
Gregory Nutt
03572e6a9d Add a 'make import' target 2014-09-05 07:38:25 -06:00
Gregory Nutt
002cfbe348 Beginning of logic that will, hopefully, all me to build applications against a NuttX export package (vs. the nuttx/ source tree). 2014-09-04 15:54:51 -06:00
Gregory Nutt
66f1722ff7 Add a Sudoku game 2014-08-11 19:27:48 -06:00
Gregory Nutt
b9cf7acb1a More trailing whilespace removal 2014-04-13 16:24:28 -06:00