1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

64 Commits

Author SHA1 Message Date
cladmi
238e37bdee
Makefile.base: define 'clean' as .PHONY 2018-08-22 16:25:37 +02:00
61f1b941ce make: replace curly braces with parenthesis 2018-03-22 20:43:15 +01:00
Gaëtan Harter
7c85e6e0e9 Makefile.base: fix AR keeping removed source files objects
AR incrementally adds file without removing files.
If a c file is deleted or disabled(submodule removal) it is not removed from
archive and still ends up in the final elf file.

This fix removes the need to do 'make clean' for this case.

However it will break cases where an APPLICATION and a MODULE or two modules
have the same name and only worked because source files names where different.
2018-03-14 12:29:10 +01:00
Joakim Nohlgård
7e3482eea0
Merge pull request #7933 from cladmi/pr/asssmobj_depends_to_header
Makefile.base: Add missing dep to RIOTBUILD_CONFIG_HEADER_C
2017-11-04 23:20:21 +01:00
Gaëtan Harter
1a6b492438 Makefile.base: Fix indentation to two spaces 2017-11-03 13:51:51 +01:00
Gaëtan Harter
3d2ed681e3 Makefile.base: Add missing dep to RIOTBUILD_CONFIG_HEADER_C
Assembly files '.S' are compiled with a subset of CFLAGS.
This means also `-include '$(RIOTBUILD_CONFIG_HEADER_C)'` so they should be
recompiled when it updates.
2017-11-03 13:46:49 +01:00
3711a6d406 Merge pull request #6780 from kaspar030/add_submodules
make: add submodule support
2017-03-29 07:27:20 +02:00
933a7a3efe make: add submodule support 2017-03-28 20:50:47 +02:00
c442cbcc23 make: Makefile.base: don't collect wildcard sources if NO_AUTO_SRC is nonempty 2017-03-22 22:22:06 +01:00
Joakim Nohlgård
d90f33e654 make: Add support for specifying a different compiler for assembler 2017-03-01 14:46:59 +01:00
47f6ff3056 Merge pull request #6237 from kaspar030/rename_AD_to_Q
make: rename AD to Q
2017-01-17 16:16:02 +01:00
fd07b5fd27 make: introduce QQ, use when doing CI build 2016-12-22 23:53:51 +01:00
f44763f346 make: adapt Makefiles to AD -> Q rename 2016-12-22 12:12:38 +01:00
Joakim Nohlgård
e2dc99f464 make: Place C++ includes before C includes when compiling C++
Fixes some errors when specifying system C++ include directories where
the C++ headers need to #include_next related C headers.
2016-12-21 13:05:15 +01:00
560a509036 make: remove trailing slash from BINDIR variable 2016-10-18 23:27:59 +02:00
1f9a87972b make: allow per-file conditional LTO compile 2016-08-29 13:30:17 +02:00
Joakim Nohlgård
77a15e7886 make: Place most configuration macros in a separate file instead of on the command line 2016-07-05 11:22:58 +02:00
Joakim Nohlgård
275b366825 Makefile.base: Add separate CXXINCLUDES for C++ specific header directories 2016-05-31 22:03:04 +02:00
3c56b49df6 make: use ccache if environment variable is set 2015-05-29 09:45:40 +02:00
aed4be332e make: introduce RIOT_FILE_NOPATH and RIOT_FILE_RELATIVE 2015-05-26 19:40:27 +02:00
Joakim Gebart
8d68afa6e6 Makefile: Add ARFLAGS for overriding command line options to ar
- Makefile.base: Respect ARFLAGS when building static archives.
 - Makefile.cflags: Add default ARFLAGS.
 - Makefile.vars: Add description for ARFLAGS.
2015-02-08 20:08:19 +01:00
René Kijewski
9a15a6def5 make: easify {sys,drivers}/Makefile
Currently you need to add every new sys and driver module into the
respective Makefile. This requires rebasing if another module was merged
in the meantime.

This PR allows you to omit the entry to {sys,drivers}/Makefile, if the
subfolder has the same name as the module name, which should be sensible
in most cases.
2014-11-11 09:26:37 +01:00
Ludwig Ortmann
7e123c797d make: optimize archive creation/modification
Only add/replace changed members to the archive.
2014-09-28 11:28:42 +02:00
Ludwig Ortmann
182b603a01 make: 1571 fixup: dont create existing directories
This fixes an error which was introduced by commit
346313bf07

The timestamp of directories is updated when a file inside a directory
is changed.
Therefore, make decides a target needs to be rebuilt, whenever that
target depends on its parent directory, because the directory is
always newer than the file inside.

http://www.gnu.org/savannah-checkouts/gnu/make/manual/html_node/Prerequisite-Types.html

    Occasionally, however, you have a situation where you want to
    impose a specific ordering on the rules to be invoked without
    forcing the target to be updated if one of those rules is
    executed. In that case, you want to define order-only
    prerequisites. Order-only prerequisites can be specified by
    placing a pipe symbol (|) in the prerequisites list: any
    prerequisites to the left of the pipe symbol are normal; any
    prerequisites to the right are order-only:

         targets : normal-prerequisites | order-only-prerequisites
2014-09-28 11:26:51 +02:00
René Kijewski
2d336ed8c8 make: easier to read object targets 2014-08-13 20:52:41 +02:00
René Kijewski
9b408fda9c make: don't invoke wildcard repeatedly 2014-08-13 20:51:50 +02:00
René Kijewski
01f6bdf789 make: call ranlib 2014-08-13 20:51:50 +02:00
René Kijewski
aa2ee4084d make: use $@ and $< 2014-08-13 20:51:29 +02:00
René Kijewski
346313bf07 make: don't call mkdir -p a lot 2014-08-13 20:23:08 +02:00
Pham Huu Dang Nhat
f7398f61ff Changed RIOT/Makefile.include, Makefile.base, Makefile.cflags, and native/Makefile.include to compile C and C++ files. 2014-06-25 22:26:10 +07:00
René Kijewski
2ae0c1b149 make: use abspath for better error messages 2014-06-23 15:50:10 +02:00
René Kijewski
a9a76cb2c2 make: create dependencies as side effect 2014-06-23 15:50:10 +02:00
René Kijewski
d19fc447ed make: make DIRS usable for applications 2014-06-23 15:50:10 +02:00
René Kijewski
35e74ad725 make: refactor make system (parallelism, deduplication)
Almost everything was build sequentially in RIOT, because we employed
explicit for-loops to build directories (DIRS). This PR makes our make
system use normal dependencies to build directories.

All our compiling rules were duplicated, once for the application, once
for modules. This PR makes the application a normal module, removing
this duplication.
2014-06-23 15:49:55 +02:00
René Kijewski
1d34522703 make: evaluate the Git SHA only once 2014-06-21 18:29:16 +02:00
René Kijewski
467b41ad49 make: easifier usage of module subdirectories
Many modules have subdirectories. Often these subdirectories should only
be included under certain circumstances. Modules that use submodules
currently need to use this pattern:

```make
DIRS = …

all: $(BINDIR)$(MODULE).a
   @for i in $(DIRS) ; do $(MAKE) -C $$i ; done ;

include $(RIOTBASE)/Makefile.base

clean::
   @for i in $(DIRS) ; do $(MAKE) -C $$i clean ; done ;
```

This PR moves the `all:` and `clean::` boilerplate into `Makefile.base`.
2014-06-17 15:49:32 +02:00
René Kijewski
840c0f0a57 make: detect their module name automatically
For many modules the `Makefile` contains a line like
```
MODULE:=$(shell basename $(CURDIR))
```
This conclusively shows that we do not have to set the module name
manually.

This PR removes the need to set the module name manually, if it is the
same as the basename. E.g. for `…/sys/vtimer/Makefile` the variable
make `MODULE` will still be `vtimer`, because it is the basename of the
Makefile.
2014-06-17 15:49:32 +02:00
René Kijewski
e189064171 make: print error if make was executed in the root
Fixes #1104, alternative to #1178.
2014-05-15 20:07:32 +02:00
René Kijewski
542a2e5d9d Merge pull request #995 from Kijewski/issue-993
Make: exterminate 'clean' buildtarget clutter
2014-04-18 16:11:15 +02:00
René Kijewski
300d6b3e35 Make: exterminate 'clean' buildtarget
Closes #993.

We do not need to descend into the modules to know what to do on
`make clean BOARD=blub`. We can just invoke `rm -rf bin/blub`.

This PR only keeps the descending into the USEPKGs, since they might
want to delete cached/downloaded/extracted data.
2014-04-09 23:07:52 +02:00
René Kijewski
21af9f11f9 Make: do not spam error messages on shallow clones
> `--always`: Show uniquely abbreviated commit object as fallback.
2014-04-09 16:52:05 +02:00
René Kijewski
3f59eefbaf Use subfolders in bin dir
Creating all object files in one directory is bound to produce name
clashes. RIOT developers may take care to use unique file names, but
external packages surely don't.

With this change all the objects of a module (e.g. `shell`) will be
created in `bin/$(BOARD)/$(MODULE)`.

I compared the final linker command before and after the change. The
`.o` files (e.g. `startup.o`, `syscall.o` ...) are included in the same
order. Neglecting the changed path name where the `.o` files reside, the
linker command stays exactly the same.

A major problem could be third party boards, because the location of the
`startup.o` needs to the specified now in
`boards/$(BOARD)/Makefile.include`, e.g.
```Makefile
export UNDEF += $(BINDIR)msp430_common/startup.o
```
2014-04-09 00:28:14 +02:00
Ludwig Ortmann
1bd3f7bb86 pipe through sed instead
addresses: https://github.com/RIOT-OS/RIOT/pull/778#discussion_r10041955
2014-04-01 10:44:10 +02:00
Ludwig Ortmann
7229287e47 Prepend path to dependency info files with sed
The old way was error prone due to it's use of a fixed path file and
confusing.

closes #775
2014-04-01 10:44:10 +02:00
Ludwig Ortmann
2525920426 remove trailing whitespace and newlines 2014-02-11 18:45:06 +01:00
Oleg Hahm
9df07f9238 muting compiler and binutils optionally
Instead of muting all compiler and other binutils output by default,
introduce a variable to make this behaviour configurable.
2014-01-05 16:11:08 +01:00
Oleg Hahm
c7d985d371 removed redundant include pathes from Makefiles 2014-01-05 16:11:08 +01:00
Oleg Hahm
26c50522d5 simplified and unified cpu build structure 2014-01-05 16:11:07 +01:00
Oleg Hahm
55f31a4829 simplify include structure for boards
* do not overwrite CFLAGS in boards Makefile
2014-01-05 16:11:07 +01:00
Ludwig Ortmann
4c612f6d08 use $(CC) for *.S files 2013-12-18 18:05:49 +01:00