Commit Graph

14 Commits

Author SHA1 Message Date
Girts
3972b18697 [make] [lib/version] remove a misplaced .PHONY (#170)
When lib/version was included, a rule depended on .PHONY.  This would
unexpectedly invoke other rules defined as dependent on .PHONY (standard
phony-ness signal).

As a side effect, this used to generate srcfiles.txt and
include_paths.txt in build dir. Since they are useful, we might always
build those anyway, and not make them phony at all.
2016-10-07 11:24:29 -07:00
Travis Geiselbrecht
8a57db12ee [make] output a text file with all the source files and include paths used in the build 2015-11-20 21:00:44 -08:00
Travis Geiselbrecht
0e1ce411ba [make] add ability to set EXTRA_LINKER_SCRIPTS in modules
This allows for individual modules to extend the main linker script,
primarily to add their own sections to interate over.
Remove the main shared_* linker scripts.
2015-10-26 16:47:18 -07:00
Travis Geiselbrecht
c0ba79fe4f [make] also output the size of any extra objects included in the final link 2015-10-14 13:06:21 -07:00
Michael Ryleev
6d352765a1 [make] Add support for EXTRA_BUILDRULES
All makefiles added to EXTRA_BUILDRULES variable
will be included right before processing bulk of build.mk

Change-Id: Ic37e37ea7469ee57e6f6543f378c5d0c1510824b
2015-03-19 18:01:10 -07:00
Travis Geiselbrecht
f21ad5d749 [make] miscellaneous make system tweaks
-Have arch set the default optimization level. Most will use
 O2, but arm-m sets to Os.
-Make the link time garbage collection be optional. Only set
 for arm-m.
2014-03-22 21:03:03 -07:00
Travis Geiselbrecht
e36bb92d7d [make] also generate lk.elf.sym.sorted 2014-01-26 22:51:51 -08:00
Travis Geiselbrecht
e002c58b59 [make] rename INCLUDES -> GLOBAL_INCLUDES
To be more consistent, rename make variable INCLUDES to GLOBAL_INCLUDES.
Also remove the need to put -I in front of each field, the make system
will do that for you.

To fix your module makefiles:
-Change INCLUDES -> GLOBAL_INCLUDES
-Remove -I prefix
2013-06-07 22:26:06 -07:00
Travis Geiselbrecht
eaa673169e [make] add feature to allow multiple parallel build dirs
Using environment variables LKROOT and LKINC you can specify multiple
parallel top level directories (outside of the lk root) that are overlayed
on top of the build system. This allows for a structure like

lk/
testproject/
someotherfirmware/

Where each of these subdirs has an entire overlayed tree of libraries, platforms,
targets, and projects.

To accomplish this, copy makefile into the root dir and build a lk_inc.mk that
sets LKROOT and LKINC.
2013-03-12 03:12:24 -07:00
Travis Geiselbrecht
5f6b2a955d [make] fix a typo that was causing some build lines to echo 2012-11-11 14:00:34 -08:00
Travis Geiselbrecht
0e0c77c04f [make] also output .hex files in intel hex format 2012-11-02 11:48:17 -07:00
Travis Geiselbrecht
6830dfe447 [make] add options to add extra .o files to the link line at the module and global scope 2012-09-23 18:29:34 -07:00
Travis Geiselbrecht
734f32b143 [make] better modularize the build system
-Each module's rules.mk defines a seperate linkage unit. Each
module can have a private set of CFLAGS, DEFINES, INCLUDES, and so
forth.
-Files to be compiled are now added by source, not object.

Most rules.mk files can be converted easily by following these steps:

1) add 'MODULE := $(LOCAL_DIR)' near the top of the file
2) change OBJS += to MODULE_SRCS += and list source files instead of .os
3) add 'include make/module.mk' at the bottom of the file

See make/module.mk for directions.
2012-08-31 15:52:24 -07:00
Travis Geiselbrecht
5bcbd9d68e move the stray .mk files from the root dir into a make/ subdir 2009-01-24 20:15:32 -08:00