diff --git a/Makefile.top b/Makefile.top index 22f61e682e3da20e41faeea1b47a7ab1006e3c18..f78eb246896f541c3952b1f030d7d57b21aac3b2 100644 --- a/Makefile.top +++ b/Makefile.top @@ -60,7 +60,7 @@ endif define COMMON_REGISTER -$(1): $$(patsubst %,$(O)/.objs/$(3)%.o,$$($(2)_MODULES)) +$(1): $$(patsubst %,$(O)/.objs/$(3)%.o,$$($(2)_MODULES) $$($(2)_MODULES_3RDPARTY)) $(1): CFLAGS_ALL += $$($(2)_CFLAGS) $$(foreach CONFIG,$$($(2)_PKG_CONFIGS),$$(shell pkg-config --cflags $$(CONFIG))) $$(foreach CONFIG,$$($(2)_EXE_CONFIGS),$$(shell $$(CONFIG)-config --cflags)) $(1): LDFLAGS_ALL += $$($(2)_LDFLAGS) $$(foreach CONFIG,$$($(2)_PKG_CONFIGS),$$(shell pkg-config --libs $$(CONFIG))) $$(foreach CONFIG,$$($(2)_EXE_CONFIGS),$$(shell $$(CONFIG)-config --libs)) ifdef STATIC_GLOBAL diff --git a/buildsystem.txt b/buildsystem.txt index 61e800a367f9b477885f87e143fee74603db6802..d2e08f34b87020c622506d0ac1e830f7441b83a9 100644 --- a/buildsystem.txt +++ b/buildsystem.txt @@ -60,7 +60,7 @@ following code: # List sources. Without the .c at the end or path. The input files # don't need to be unique, so there can be another main.c in other # directory. You don't list the headers. - hello_world_SOURCES := \ + hello_world_MODULES := \ main \ hello \ world @@ -77,12 +77,17 @@ following code: # the dependencies against the local libraries can be tracked. hello_world_LOCAL_LIBS := libworld -Only the `_SOURCES` variable is mandatory. You can create a shared +Only the `_MODULES` variable is mandatory. You can create a shared library the same way, it is only appended to `LIBRARIES` instead to `BINARIES`. Also, if you want to let the build system know about a binary, but not build it by default (needed for the `check` target, for example), you can use `BINARIES_NOTARGET`. +The variable `_MODULES_3RDPARTY` is similar to `_MODULES`, but is +excluded from some checks (like `cppcheck`). The idea is that +third-party software may be included in the compilation, but nobody +wants to fix their style. + You can also generate documentation (`html` from the `txt` by asciidoc). It has no variables to influence it and you append them to the `DOCS` variable.