Commit graph

48 commits

Author SHA1 Message Date
9217d38964 Everywhere: Rename package "jw-build" to "jw-pkg"

jw-build doesn't stop at building software, packaging it afterwards is also a core feature, so this commit gives the package a better name.

The commit replaces strings s/jw-build/jw-pkg/ in text files and file names. Fallout to the functionality is fixed, variable names are left as they are, though. To be adjusted by later commits.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-28 13:35:56 +01:00
bf16c6714b make, scripts: Re-add files necessary for building ytools

Re-add everthing needed for building and packaging ytools. This is a big commit, 2002 lines of code. It mostly consists of C/C++ machinery, plus some documentation-related stuff.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 15:59:49 +01:00
bc883deed4 Everywhere: Remove everything non-essential for "make clean all"

This commit removes everything not strictly necessary for running "make clean all" inside jw-build.

packaging jw-devtest. This cuts the repo down from 24077 to 4725 lines of code.

The idea is to

1) Further remove bloat from the remaining bits

2) Re-add what's necessary to build and package other essential repos.

The decision should be based on whether or not jw-build can also be useful in a non-janware context.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 15:02:56 +01:00
39d3a9e888 decompress.mk, defs-cpp.mk: Add make/decompress.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
2024-04-21 11:05:55 +00:00
c43fd8d0aa defs-cpp.mk: Add .hh to LOCAL_H
Signed-off-by: Jan Lindemann <jan@janware.com>
2020-12-01 16:24:42 +00:00
7d7a75c389 debugger.mk, defs-cpp.mk: CORE_DUMPER was misdetected for valgrind vgcore files

gdb --core=vgcore.123 doesn't output a usable executable path with "was generated by ...". This commit make make gdb fall back to using $(EXE_PATH) as the executable with valgrind core files.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-07-13 17:14:38 +00:00
cc929baf99 defs-cpp.mk: Add support for SRC_ALL_CPP_IGNORE
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-07-06 14:34:33 +00:00
6c2fa903c7 Fix: Don't set CC, LD, CXX via ?=

CC, LD and CXX are builtin, and they also override ?=, so ?= is pointless.

This solution disallows specifying a compiler from the environment. There should be some solution with $(origin CC), but this seems too clunky for now.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-07-01 15:48:28 +00:00
b2d6e6f554 Everywhere: Rename MODDIR -> JWBDIR

Rename the omnipresent MODDIR variable to JWBDIR, since that's more to the point.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-29 21:34:18 +00:00
1ff63505e7 defs-cpp.mk: Beautify defs-cpp.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-29 19:50:33 +00:00
3365aa3db6 make: Replace BUILD_XXX make flag variables by FINAL_XXX

The following BUILD_XXX variables are renamed to their respective FINAL_XXX counterparts, as that name is more expressive:

BUILD_CFLAGS, BUILD_CPPFLAGS, BUILD_CXXFLAGS, BUILD_EXTRA_DEBUG_FLAGS, BUILD_INCLUDE, BUILD_LDFLAGS, BUILD_LIBFLAGS, BUILD_LPPFLAGS

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-24 12:58:53 +00:00
da09c46fa3 defs-cpp.mk: Defs-cpp.mk performance optimization

Disable most external code for clean targets

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-24 12:45:15 +00:00
2852ca136d defs-cpp.mk: Code beautification
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-10 12:32:17 +00:00
a91420c3d2 defs-cpp.mk: Add support for openocd-st-xxx-jlink.cfg

Add support for openocd-st-nucleo-f103rb-jlink.cfg and openocd-stmqspi-st-stm32f769i-disco-jlink.cfg

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-05-12 18:24:31 +00:00
49f269bdfe make: Modify only BUILD_*FLAGS in jw-build/make/*.mk

Assign only to BUILD_XXXFLAGS in jw-build/make/*.mk, and leave PROJECT_XXXFLAGS and LOCAL_XXXFLAGS alone.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-04-10 06:43:40 +00:00
17a080138c make: Prefix BUILD_ to a couple of makefile variables

Rename variables to avoid collision:

OBJ -> BUILD_OBJ INCLUDE -> BUILD_INCLUDE LIBFLAGS -> BUILD_LIBFLAGS LPPFLAGS -> BUILD_LPPFLAGS

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-04-08 18:26:45 +00:00
3ae0916ff4 defs-cpp.mk, platform.mk: Add support for st-disc1-f429i
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-04-04 14:36:38 +00:00
e7d9cc3701 defs-cpp.mk: Don't use -ldl for MinGW targets

-ldl breaks build on MinGW: cannot find -ldl

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-30 13:20:41 +00:00
c6fa2f3807 defs-cpp.mk, mcu-defs.mk: Do MCU_OPENOCD_CFG_NAME definition from one place

MCU_OPENOCD_CFG_NAME was defined in cfg-cpp.mk and mcu-defs.mk. Not sure which is the best place, but have them compete is clearly the worst idea. This patch puts them into defs-cpp.mk. A future patch should place the whole bunch somewhere else, I guess.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-30 10:17:19 +00:00
5210ba2acf make: Improve dependency tracking for exe targets

- Add wildcarded linker scripts to dependencies - Run flash-push only on current hex file

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-29 16:44:42 +00:00
9c773838c7 make: Improve flash-fetch targets

- Add support MCU_FLASH_BANK_NAME to support multiple banks - Prefix binaries with TARGET_PRODUCT, if defined - Fix flash data for stm32f769i-disco

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-29 13:32:16 +00:00
ed76759a42 defs-cpp.mk, mcu-defs.mk, rules.mk: Code beautification and re-ordering
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-22 21:43:16 +00:00
419d3b2a08 defs-cpp.mk, defs.mk, platform.mk: More cleanup to defs-cpp.mk

- Group more consistently into overall default choices, template cascade and compiler flags - Add definitions for st-nucleo-f103rb (for now)

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-20 15:06:25 +00:00
afffbd2566 defs-cpp.mk: Fix debug / optimize conditions for arm-none-eabi
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-20 13:49:11 +00:00
f09eb174ef defs-cpp.mk, mcu-defs.mk, mcu-tags.mk: Dissolve mcu-tags.mk into defs-cpp.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-19 13:16:53 +00:00
58ab619f0b make: Rename CFLAGS, CXXFLAGS and CPPFLAGS variables

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>
2019-03-19 07:07:00 +00:00
4a5ae9c734 mcu-*.mk: Support arm-none-eabi / modm

This commit adds compiler flags needed for compilation with modm. Cleanup is needed, most notably should mcu-tags.mk be dissolved into defs-cpp.mk. The good part is that it works.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-18 17:35:18 +00:00
714cf468f3 Add more default flags for arm-none-eabi:

LIBTYPE ?= static BUILD_CPPFLAGS += -fno-exceptions -fno-rtti

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-18 11:20:50 +00:00
2a9cdc5540 debugger.mk, defs-cpp.mk: More consistent compiler flags

Implement more consistent handling of flags -std=xx, -gdb, -gdwarf-x.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-18 10:31:15 +00:00
594becf931 Fix: CREATE_DEVEL wasn't set to true when it should

Fix a situation in which no devel RPM package was built

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-17 15:02:33 +00:00
275d33d78b Fix: Libdl was statically linked by default
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-13 16:38:32 +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
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
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
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
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
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
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
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
2c749020d1 defs-cpp.mk: Some indentation cleanup
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 09:03:13 +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
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
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