Commit graph

3,497 commits

Author SHA1 Message Date
7eca86c5a1 defs.mk, mcu-defs.mk: Search for openocd config in search path
Add variables around MCU_OPENOCD_CFG_SEARCH_PATH and go search
config there

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-13 10:48:15 +00:00
ea7cb92324 defs-cpp.mk, rules.mk: New variables REAL_(CPP|C|LD)FLAGS
These variables denote the flags used in compiler and linker rules.
They are defined as REAL_(CPP|C|LD)FLAGS ?= BUILD_(CPP|C|LD)FLAGS
and provide a means to override the flags assembled cumulatively.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-13 08:59:20 +00:00
5aee508df9 defs-*.mk: Add USE_DISABLE_COMPILER_OPTIMISATION_OPTS
USE_DISABLE_COMPILER_OPTIMISATION_OPTS = true disables options targeted
at disabling optimization features, which were introduced to facilitate
debugging in the first place, but make the commandline harder to compare
to others while troubleshooting the compile process

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-13 08:53:56 +00:00
a65a1df971 defs-cpp.mk: Treat *.sx as valid extension for assembly sources
Now *.sx and *.S are treated as assembly source files.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-13 08:50:18 +00:00
3b75db2867 defs-cpp.mk: Some improvements for LIBTYPE=static
Still doesn't compile valdi statically against regular glibc

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-12 12:47:49 +00:00
74d53f9fb3 defs-cpp.mk: Add support for empty LIB_SO
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-12 12:10:16 +00:00
92d3d9c36d topdir.mk: Remove target list-files et al
These are now in dev-utils.mk (which isn't included from topdir.mk)

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-12 11:52:39 +00:00
72e44f330c dev-utils.mk: Allow calling process-text-files.mk from within tree
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-12 11:43:19 +00:00
4216943215 mcu-defs.mk, mcu-flash.mk: Ongoing improvements
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-12 11:38:19 +00:00
cd6b2d6778 defs-cpp.mk: Add CPP_FILT, OBJCOPY, OBJDUMP
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-12 11:37:44 +00:00
d79e8eee34 bin.mk: Allow for removal of subdirectories in clean target
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-12 11:36:34 +00:00
fe161ff4d6 py-defs.mk, py-mod.mk: Add support for Python3's __pycache__
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-12 11:35:49 +00:00
367dfb90c2 Fix: Basestring missing from python 3
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-10 15:34:08 +00:00
1e3d0f2c60 projects.py: Fix python3 glitches
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-10 15:23:23 +00:00
6c0c3af50f projects.py: Remove reference to deprecated sets module
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-10 14:58:16 +00:00
e0adaa815d projects.py: Remove bogus tabs
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-10 14:53:32 +00:00
c5f5a3bb41 git-submod.mk: Fix wrong GIT_REPO_URL
Fix wrong GIT_REPO_URL and allow repos without a master while
we're at it.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-09 12:29:32 +00:00
e66aa18e3f defs.mk: Code beautification
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-09 11:49:40 +00:00
4e04a1aa07 mcu-exe.mk: Remove map file with clean target
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-09 11:38:29 +00:00
493be57057 projects-dir.mk Fix: JANWARE_USER from local.mk wasn't exported
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-09 11:03:45 +00:00
685d642b9e topdir.mk: Topdir.mk add subdir exe as an alias for utils
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-06 12:48:28 +00:00
aa85417a17 Everywhere: Purge spaces in text files
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-06 12:38:20 +00:00
f424f2cb5f defs-cpp.mk: Don't add TC_SYS_ROOT/(lib|include) to cross compilations
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>
2019-03-06 12:27:08 +00:00
df6c1ef9a1 make, tmpl/tagged: Add basic microcontroller support
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>
2019-03-06 12:19:42 +00:00
7e03b8c90a dev-utils.mk: Add new targets
Add targets list-files, list-text-files and cleanup-spaces.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-04 20:20:51 +00:00
5e9dba6d15 platform.mk: Add support for explicit TARGET = linux
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 19:49:54 +00:00
0eaef0c326 conf/jcs, make, tmpl/doxygen: Align equal signs in makefiles to column 30
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 18:12:28 +00:00
e3142c9624 dev-utils.mk: Add target indent-makefiles
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 16:13:24 +00:00
857c7d2c6c make/Makefile, defs-dev.mk: Futher reduced calls to shell from Makefiles
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 14:50:44 +00:00
cb87d2b278 defs.mk, defs-cpp.mk: Some more reordering of compiler flags
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 14:50:05 +00:00
be6a2792d4 platform.mk fix: Predefined HOST_TUPLE wasn't evaluated
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 14:48:46 +00:00
691bf17057 rules.mk: Add target echo-compilers (still incomplete)
Add target echo-compilers, currently only supports GCC

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 14:47:41 +00:00
bf9bb79246 make/Makefile, defs-cpp.mk, platform.mk: Generalize MinGW build machinery (a bit)
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>
2019-03-03 10:45:08 +00:00
59da607e12 defs.mk, platform.mk: Include pre-local.mk and cache.mk from platform.mk
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>
2019-03-03 09:56:11 +00:00
ce2c6b0190 defs-cpp.mk, platform.mk: Rename variable MINGW_SYS_ROOT -> TC_SYS_ROOT
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 09:31:38 +00:00
f1eafaa234 platform.mk: Consistently define TARGET_TUPLE|TRIPLE_WORDS
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 09:07:35 +00:00
f80c64c548 rules.mk: Add target echo-target
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 09:07:04 +00:00
2c749020d1 defs-cpp.mk: Some indentation cleanup
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 09:03:13 +00:00
22d89ef234 projects-dir.mk: Make clean target less aggressive
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>
2019-03-03 08:36:31 +00:00
094f04d02e defs.mk: Include platform.mk from projects.mk
This is needed for MOD_SCRIPT_DIR

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-02 19:59:53 +00:00
f9d398d219 make: Fix MinGW build machinery machinery
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>
2019-03-02 17:21:48 +00:00
ac2f4f6cc7 Fix: JANWARE_WiKI for client jw needs a conditional
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-02 09:50:58 +00:00
f9f437496d defs.mk: Somewhat more consistent indentation of conditionals
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-01 11:08:34 +00:00
8bb94c6f57 defs.mk / defs-cpp.mk: Some reordering of variables
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>
2019-03-01 11:03:23 +00:00
f40356cf59 make/*.mk: More performance tweaks
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-28 16:12:58 +00:00
ab872fe334 git-submod.mk: Add support for USE_USER_URL
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-28 16:12:31 +00:00
3dd55cf067 Further improve build time: Try to avoid calling projects.py
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>
2019-02-28 14:48:57 +00:00
9e245c986e make: Further improve build time
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>
2019-02-28 13:22:12 +00:00
316435bb78 $(MODDIR)/make/defs.mk: Split off defs-cpp.mk with C++ definitions
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>
2019-02-27 20:46:54 +00:00
54d5790167 $(MODDIR)/make/defs.mk: Set HDRDIR_SCOPE_PREFIX = $(PROJECT)
Set HDRDIR_SCOPE_PREFIX = $(PROJECT) by default.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 17:29:59 +00:00