Re: Improving build system

Liste des GroupesRevenir à ca embedded 
Sujet : Re: Improving build system
De : pozzugno (at) *nospam* gmail.com (pozz)
Groupes : comp.arch.embedded
Date : 17. May 2025, 09:56:49
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <1009j0h$afm6$1@dont-email.me>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
Il 16/05/2025 17:20, David Brown ha scritto:
On 16/05/2025 15:45, pozz wrote:
Il 14/05/2025 11:03, David Brown ha scritto:
On 13/05/2025 17:57, pozz wrote:
[...]
3.
>
Makefiles can be split up.  Use "include" - and remember that you can do so using macros.  In my makefile setups, I have a file "host.mk" that is used to identify the build host, then pull in a file that is specific to the host:
>
# This is is for identifying host computer to get the paths right
>
ifeq ($(OS),Windows_NT)
   # We are on a Windows machine
   host_os := windows
   host := $(COMPUTERNAME)
else
   # Linux machine
   host_os := linux
   host := $(shell hostname)
endif
>
ifeq "$(call file-exists,makes/host_$(host).mk)" "1"
   include makes/host_$(host).mk
else
   $(error No host makefile host_$(host).mk found)
endif
>
Then I have files like "host_xxx.mk" for a computer named "xxx", containing things like :
>
toolchain_path := /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/
>
or
>
toolchain_path := c:/micros/gcc-arm-none-eabi-10_2020-q4-major/bin/
>
>
All paths to compilers and other build-related programs are specified in these files.  The only things that are taken from the OS path are standard and common programs that do not affect the resulting binary files.
>
Regarding this point, I tried to set
>
    toolchain_path := c:\msys64\mingw64\bin
>
 What happens when you use the correct path?
 toolchain_path := c:/msys64/mingw64/bin/
 (Note the trailing slash - or you can add it when you use the macro.)
   Strive to get rid of all the Windows idiosyncrasies here.
 make, gcc and all the other relevant tools here are from a *nix background.  Use them with that in mind and it will all be smoother.
The problem is not in Makefile/make, but directly in the CMD.exe.  If at the prompt I write:
   c:/msys64/mingw64/bin/gcc -o main.exe main.c
I receive some error popups regarding some dlls that arent' found (for example libmpc-3.dll, libgcc_s_seh-1.dll)

Date Sujet#  Auteur
13 May 25 * Improving build system19pozz
13 May 25 +- Re: Improving build system1Nicolas Paul Colin de Glocester
14 May 25 +* Re: Improving build system16David Brown
14 May 25 i+* Re: Improving build system11pozz
15 May 25 ii+* Re: Improving build system4Nicolas Paul Colin de Glocester
15 May 25 iii`* Re: Improving build system3David Brown
16 May 25 iii `* Re: Improving build system2Nicolas Paul Colin de Glocester
16 May 25 iii  `- Re: Improving build system1David Brown
15 May 25 ii`* Re: Improving build system6David Brown
15 May 25 ii `* Re: Improving build system5pozz
16 May 25 ii  `* Re: Improving build system4David Brown
16 May 25 ii   `* Re: Improving build system3pozz
16 May 25 ii    `* Re: Improving build system2David Brown
16 May 25 ii     `- Re: Improving build system1pozz
15 May 25 i+- Re: Improving build system1David Brown
16 May 25 i`* Re: Improving build system3pozz
16 May 25 i `* Re: Improving build system2David Brown
17 May 25 i  `- Re: Improving build system1pozz
14 May 25 `- Re: Improving build system1Stefan Reuther

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal