Commit Graph

34 Commits

Author SHA1 Message Date
Xiang Xiao
1b2880ba46 apps/Application.mk: Fix main redefine warning by using per file CFLAGS/CXXFLAGS. 2019-10-19 12:49:56 -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
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
e806097c70 Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard. 2019-10-06 06:14:56 -06:00
Gregory Nutt
ddd5a18b0c Application.mk: Correct an error in PATH usage. Use of toolchain path causes make errors. 2019-10-04 09:53:53 -06:00
Xiang Xiao
4b49362719 apps/Makefile: Make libapps overwritable. 2019-10-03 14:07:17 -06:00
Xiang Xiao
1342426431 Application.mk: Support the ability to change the CFLAGS for the compilation of a single file. Set special compiler options as follows the rule:
sourcefile + fixed suffix "_[A|C|CPP|CXX]FLAGS"

apps/examples/hello/Makefile:
  $(SRCDIR)/hello_main.c_CFLAGS = -DTEST
2019-10-03 06:52:25 -06:00
Xiang Xiao
c73af9c3c8 apps/Makefile: Change BIN_DIR to BINDIR to follow nuttx style. 2019-10-01 11:43:40 -06:00
Chao An
c64ede319c apps/Applicatin.mk: Fixe some build issues. (1) Unable to found target 'context' when CONFIG_NSH_BUILTIN_APPS disabled. (2) Unable to generate multiple programs. 2018-09-12 06:09:20 -06:00
Gregory Nutt
49f2d90dcf Merge branch 'master' of bitbucket.org:nuttx/apps 2018-09-07 05:26:54 -06:00
Masayuki Ishikawa
ef60f7f697 Merged in masayuki2009/nuttx.apps/fix_builtin_apps (pull request #155)
Application.mk: Fix to not register a builtin app when BUILD_MODULE=y

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-09-07 11:25:09 +00:00
Gregory Nutt
f3413df508 Update ChangeLog in preparation for 7.26 release. 2018-09-06 15:08:12 -06:00
anchao
1632ec917e Application.mk: Generate temporary name for linker object 2018-09-05 06:43:46 -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
305278d1ae Application.mk: Fix some issues when building directories such as fsutils/mkfatfs that have not mainobj. In this case, the MAINSRC is undefined and it would generate a bad linker command line. 2018-09-04 13:00:03 -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
3221072535 Application.mk: Ooops, forgot to remove some debug hacks before last commit. 2018-09-04 09:43:12 -06:00
Gregory Nutt
66948fe525 Appliation.mk: Even on Cygwin, GNU make insists that targets use Unix style paths. System/progmem: Rename the install application to progmem. This generates a target install: which collides with the install:: target in Application.mk. 2018-09-04 09:38:26 -06:00
anchao
057b68cd07 apps/: Resolve some make dependency failures. 2018-09-03 10:38:37 -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
08263367bc apps/Application.mk: If a loadable module is generated the we need to add logic to remove the loadable module in the 'make clean' logic. 2018-08-17 16:31:35 -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
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
4e5a2ad18c Application.mk: Add the .PRECIOUS target to prevent libapps.a from being deleted when the make is interrupted. 2017-08-12 12:21:37 -06:00
Sebastien Lorquet
a9aa753fa4 Recursive Kconfig autogeneration 2016-06-02 16:34:00 +02:00
Paul A. Patience
6fded1a8e1 Simplify some Makefiles 2016-05-12 14:17:40 -04:00
Paul A. Patience
a7cd308658 UAVCAN: Add platform-specific code 2015-09-30 18:39:37 -04:00
Paul A. Patience
298a72c71e Add UAVCAN library 2015-09-23 13:48:35 -04:00
Paul A. Patience
85a2cecb99 Simplify apps/ Makefiles by combining common logic into the Makefile fragment Application.mk 2015-09-05 15:13:03 -04:00