Code generated for Cortex M3 stopped working after adding -L$(TC_SYS_ROOT)/lib.
The problem is that libc et al have to be taken from $(TC_SYS_ROOT)/lib/thumb,
which is correctly taken if explicit -L is left out.
Probably breaks mingw, to be tested and fixed in the next iteration.
Signed-off-by: Jan Lindemann <jan@janware.com>
Add support for building the firmware of the Cortex M3 ST-NUCLEO-F103RB
development board with an STM32 microcontroller. This commit add some hooks,
notably support for tagged templates, but adds lots of crap, too, notably
makefiles and variables that should have different names and / or
functionality.
New makefiles are: Mcu-defs.mk mcu-exe.mk mcu-flash.mk mcu-tags.mk
mcu-topdir.mk tagged-tmpl.mk, a new directory is tmpl/tagged.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit takes the MinGW cross compilation further into the direction of
being a more general framework for cross compilation. Changed some variable
names that are too specialized, notably MinGW tool chain directories,
compilers, utilities.
Signed-off-by: Jan Lindemann <jan@janware.com>
platform.mk is sometimes included before defs.mk, e.g. from
$(TOPDIR)/make/proj.mk, then these definitions are necessary
Signed-off-by: Jan Lindemann <jan@janware.com>
The clean target now doesn't remove meta files which enforce a new pull if
absent. distclean is the new clean.
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>
C++ definitions are numerous, and they shouldn't pollute variable space and
performance outside of directories containing C++ files. This commit pushes
them into a defs-cpp.mk file.
Signed-off-by: Jan Lindemann <jan@janware.com>
Many external commands are called unnecessarily often, because either there's a
GNU Make internal alternative, or because they are invoked from within a
recursively defined variable. This patch adresses that and lessens make
invocation time per directory by factor 3.
Signed-off-by: Jan Lindemann <jan@janware.com>
proj_query based commands run projects.py, which needs $(TOPDIR), which in turn
is undefined, notably for standalone-exe.mk. This commit avoids related
warnings.
Signed-off-by: Jan Lindemann <jan@janware.com>
Shared libraries were detected as executables, which is true in a way, but
still the log-install target shouldn't wrap them into scripts.
Signed-off-by: Jan Lindemann <jan@janware.com>
Order is now: $(LOCAL_CFLAGS) $(PROJECT_CFLAGS) $(COMPLILER_CFLAGS)
which resulted in header files specified in $(LOCAL_CFLAGS) found
after those of $(PROJECT_CFLAGS).
Still not optimal, as this way other general flags, e.g. optimization
flags, override more specialized ones. Maybe use INCLUDES instead.
Signed-off-by: Jan Lindemann <jan@janware.com>
The attempt to have local include directory with HDRDIR_SCOPE_SUFFIX
pointing to the working directory failed the last time around. This
commit tries to fix that.
Signed-off-by: Jan Lindemann <jan@janware.com>