2017-09-27 13:07:20 +02:00
|
|
|
|
DEPMAKER
|
|
|
|
|
========
|
2017-09-27 12:03:10 +02:00
|
|
|
|
|
|
|
|
|
A GNU MAKE Helper for building binaries with automatic dependency handling.
|
2017-09-27 13:07:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEPMAKER uses a simple directory structure for finding sources, every module may
|
|
|
|
|
contain the following directories and/or files:
|
|
|
|
|
|
|
|
|
|
| ./include | Include files here, Directory will automatically be added to Compilers Search Path |
|
|
|
|
|
|-------------|-------------------------------------------------------------------------------------------------|
|
|
|
|
|
| ./src | Source files here |
|
|
|
|
|
| Makefile | Simple makefile (optional), may use DEPENDS=… to inform about other modules, needed to compile |
|
|
|
|
|
| global.make | Global flags for Compilers can go here |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEPMAKER will first build a list of needed dependencies by walking over the
|
|
|
|
|
DEPEND=… vars to find all needed modules and setup the correct compiler flags
|
|
|
|
|
and prefixes (e.g. COMPILER_PREFIX=„avr-„).
|
|
|
|
|
|
|
|
|
|
Dependency modules are built first and static libraries are composed, which will
|
|
|
|
|
then be linked to the start module.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Usage
|
|
|
|
|
-----
|
|
|
|
|
|
|
|
|
|
- Place in project subdirectory, e.g. depmaker
|
|
|
|
|
|
|
|
|
|
- Create Makefile in your Project directory like this example:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`CFLAGS+=-DF_CPU=16000000`
|
|
|
|
|
|
|
|
|
|
`DEPENDS=module1 ../some_extern_code lib/libmoda lib/libmodc`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`%:`
|
|
|
|
|
|
|
|
|
|
`$(MAKE) -f depmaker/Makefile $@`
|
|
|
|
|
|
|
|
|
|
|
2017-11-15 22:14:51 +01:00
|
|
|
|
use: *make depend* to manually check dependencies
|
|
|
|
|
use: *make build* to build the executable
|
2017-09-27 13:07:20 +02:00
|
|
|
|
|
|
|
|
|
|