Rename CFLAGS and friends to follow the conventions of the implicit rules
defined by GNU Make:
- $(CPPFLAGS) is passed to both C++ and C compiler
- $(CXXFLAGS) is passed to C++ compiler only
- $(CFLAGS) is passed to C compiler only
- C++ compiler is in $(CXX)
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit makes it possible to successfully run "make all" against ytools'
again, with TARGET_TUPLE set to i686-ms-w64-mingw. Lots of minor and major
tweaks here and there.
The biggest diff is a move of the architecture-related definitions into
platform.mk. The are needed pretty early on, so that seems reasonable.
Making this work again is part of the larger effort to support cross
buildchains in a more concise way, i.e. without so many if ($(TARGET),mingw))
all over the place. TARGET's relevance should dwindle, until it's finally taken
over by the TARGET_XXX variables extracted from TARGET_TUPLE or TARGET_TRIPLET.
Signed-off-by: Jan Lindemann <jan@janware.com>
Reordered some variables in defs.mk and defs-cpp.mk for clarity. Most notably
FULL_NAME was moved back into defs.mk, which amounts to a bugfix.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit tries to remove the necessity to call projects.py from $(TOPDIR) to
speed up recursive builds over all projects yet again. This is a major
undertaking. There are two variables which are filled py projects.py in
$(TOPDIR): PREREQ and PREREQ_DIRS. Sadly, the latter is a path relative to
$(TOPDIR)/make, so this is kind of pointless. Unless the cache is maintained in
$(TOPDIR), a thing I tried to avoid. So this commit is only able to cache
$(PREREQ), not $(PREREQ_DIRS), which still is a hassle. Introduced defs-dirs.mk
for that, to make it accessible to make.mk, and modified all the other parts of
the machinery, too.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit sees several improvements to the build performance:
- Introduce cache.mk, which creates makefiles caching often used
variables, per tree and per project.
- Define more variables with := enclosed in condistions, instead of
defining them with ?=, because the RHS of ?= is expanded deferredly.
- Add more definitions for executables.
- Move some more specialized definitions out into specialized makefiles,
notably htdocs.mk and tmpl.mk
Signed-off-by: Jan Lindemann <jan@janware.com>