Commit Graph

58 Commits

Author SHA1 Message Date
Stuart Ianna
44ae5cc14a import/mk: Update ELF flags to represent build configuration type.
Allows board configuration to select the output ELF format for application built using the `make import` target.
2023-06-30 02:17:10 +08:00
Stuart Ianna
0ed95bbe97 tools/mkimport: Allow additions LDELFFLAGS from exported Nuttx builds. 2023-03-24 15:03:53 -03:00
yinshengkai
ee4d8b738f Makefile: replace INCDIR to INCDIR_PREFIX
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-10 02:38:58 +08:00
Ville Juven
f844db5194 libapps.a: Add the static application library always to the target libraries
This error was made by me a long time ago, not understanding how the kernel
mode build is expected to work. So partially revert PR#946.
2022-10-18 22:58:13 +08:00
Xiang Xiao
1d216fde99 import/Make.defs: Add -noincstd++
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-22 18:12:27 +03:00
Ville Juven
c1453b589d BUILD_KERNEL: Include CPP libraries only if configured to do so
Otherwise build without HAVE_CXX flag fails
2022-02-23 19:47:32 +08:00
Xiang Xiao
bc5d1165aa Replace cygpath with CONVERT_PATH
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 16:08:10 +01:00
Masayuki Ishikawa
cecc83d6b9 import: Make.defs: Fix 'make import' for CONFIG_BUILD_KERNEL=y
Summary:
- I noticed that 'make import' failed due to recent changes in nuttx
- This commit fixes this issue by adding logic for -lm
- Also applies the same style for -lgcc

Impact:
- CONFIG_BUILD_KERNEL=y only

Testing:
- Build (mkimport, make import) with sama5d4-ek:knsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-01-30 18:00:21 +08:00
Masayuki Ishikawa
7d4b2a517b Makefile, import/Make.defs: Fix undefined symbols for CONFIG_BUILD_KERNEL=y
Summary:
- I noticed that applications made by 'make import' contain
  undefined symbols such as printf for CONFIG_BUILD_KERNEL=y
- This commit fixes this issue by adding user libraries.
- Also, this commit generates libapps.a which is used for init

Impact:
- CONFIG_BUILD_KERNEL=y only

Testing:
- Build (mkimport, make import) with sama5d4-ek:knsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-01-27 11:07:20 +08:00
Alin Jerpelea
ec339bc49a Makefiles: Gregory Nutt: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
ligd
3c4089ef30 apps/MAKE: Add register staging to context
context -> context
           register

Change-Id: Ief13064cd2faac31fbaf7140ae2e144d0881b2a1
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-19 10:44:17 -03:00
chao.an
1b9c307ecc make/import: lost ARCHCPUFLAGS in cxx command line
Change-Id: I90ba64852b9d06ad713a4696c451f72029da1cf3
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 01:10:52 -07:00
Xiang Xiao
deaa6c5b7b 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>
2020-07-09 15:17:37 -03:00
chao.an
fde8f24f2a make/import: add post build support
support post processing after binary install

Change-Id: Ifc587f6a8a29372298261c99a4510b680cbb8ec1
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-03 23:48:00 -05:00
chao.an
aaa61346c9 make/import: move the binary install to the top Makefile
move the binary install to the main Makefile to support
link extra libraries

Change-Id: I6db8a244ec9975163ea0c21fec6468e215c5aedb
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-03 23:48:00 -05:00
chao.an
989d1aef13 import: add hex/raw binary support
Generate raw binary file

Change-Id: I3af0d9be3fccec99dc0079f745530aa5028723df
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-01 07:18:32 -05:00
chao.an
7650a3c71c make/import: override the ld group if undeclared
Change-Id: I8f2fde21dcaac7c9a88915d585fda0ab30ce1d56
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-30 00:52:07 +01:00
chao.an
c81a1f9711 make/import: support install nuttx binary in flat build
Change-Id: Iaffa86ee9ebd77380424e6d4a0777262685c989f
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-30 00:52:07 +01:00
chao.an
10d596cb8e make/import: remove LDLIBS declare
which already exported in scripts/Make.defs

Change-Id: I74858632f779fc2a409c9f4afb114db14003686d
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-30 00:52:07 +01:00
Xiang Xiao
69f013e74e build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 15:56:35 +01:00
Xiang Xiao
ea135b89c6 build: Replace all -I to INCDIR
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
Xiang Xiao
ead498a788 build: Remove the workaround for the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
Xiang Xiao
36bce2959a build: Remove the duplicated definition
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 14:53:21 -06:00
Xiang Xiao
d232823e63 build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig
so the correct value can be determinated by Kconfig system automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:37:24 -06:00
Xiang Xiao
1511403fdf Revert "Don't generate .depend anymore"
This reverts commit cc5ad09caa.
2020-03-22 23:09:40 -05:00
Xiang Xiao
cc5ad09caa
Don't generate .depend anymore 2020-03-22 18:15:21 +00:00
YAMAMOTO Takashi
b2e9b46fb1 import/Make.defs: Avoid flock errors
Sync with tools/Config.mk
2020-02-26 01:07:31 -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
cf0365ea92 Clean up Makefile under apps folder no functional changes. 2019-10-04 08:35:46 -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
5d6681dc9f Remove the duplicated build script files from apps/impor/tools. These will now be copied from nuttx/tools when the export package is created. 2019-10-01 07:51:01 -06:00
Xiang Xiao
420a8f0794 import/Makefile's: Remove symbol table generation from imports/Makefile to avoid the confusion with the official method. 2019-10-01 07:28:58 -06:00
Gregory Nutt
367093e65c apps/examples/module: Fix some chaos in conditional compilation. 2018-08-07 10:51:04 -06:00
Gregory Nutt
296f5839ab apps/tools: Forgot to include a file with last commit. 2018-07-17 11:26:47 -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
2ecc94f5ce apps/import/Makefile: Eliminate a MAKE sytax error that occurs in some (but not environments) when symtab.c has not been generated. 2018-07-16 08:27:44 -06:00
Gregory Nutt
878fa8afd5 Squashed commit of the following:
cosmetic

    import/:  Add Makefile.symtab which can be used to compile the dynamically created symbol table C file.

    Add tools/mksymtab.sh
2018-07-15 11:21:53 -06:00
Gregory Nutt
6aa3e57004 Triva typo fixed. Also modify weird definition in import/Makefile. Still weird, but at least the directory exists. 2018-05-31 15:31:31 -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
4cdfdaf70c ELF build reuires -fno-common in CFLAGS 2014-09-08 07:57:05 -06:00
Gregory Nutt
1597617001 libapps.a needs to be added to the list of libraries to link against. 2014-09-07 10:45:41 -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
69081d6665 For the kernel build, there is no reason for ELF flags to be different 2014-09-06 10:31:17 -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
783342c423 Add ELF linker script for import build 2014-09-05 16:20:45 -06:00
Gregory Nutt
95679676a1 Need to add CRT0 to every Makefile in apps/examples/tests 2014-09-05 16:05:29 -06:00
Gregory Nutt
a03bd2f1e7 Add libgcc to the set of libraries to link against 2014-09-05 15:35:41 -06:00
Gregory Nutt
5cd3325f7e Provide library names and paths in apps/import/Make.defs 2014-09-05 13:59:20 -06:00