Ignore:
Timestamp:
Nov 7, 2017, 7:12:46 AM (8 years ago)
Author:
Ben Rietbroek
Message:

Get Vendor and BuildMachine from the environment [v1.1.1-testing]

If 'BLDLVL_VENDOR' and BLDLVL_MCHINE' are not in the environment,
their values will be set to '*UNKNOWN*'. Currently these *must* be
environment variables, passing them on the (w)make cli might not work.
Also, no spaces are allowed in the values.

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/makefile.mif

    r68 r182  
    105105#
    106106%ZVAR=This variable will be placed in the Environment
     107
     108#
     109# Set the '*UNKNOWN*' value for Vendor and BuildMachine if undefined or empty
     110#
     111!if     "$(%BLDLVL_VENDOR)"==""
     112%BLDLVL_VENDOR=*UNKNOWN*
     113!endif
     114!if     "$(%BLDLVL_MACHINE)"==""
     115%BLDLVL_MACHINE=*UNKNOWN*
     116!endif
     117
     118#
     119# Compose JWasm defines to pass on command-line
     120#
     121%JWASM_DEFINES=
     122%JWASM_DEFINES += -DBLDLVL_VENDOR="'$(%BLDLVL_VENDOR)'"
     123%JWASM_DEFINES += -DBLDLVL_MACHINE="'$(%BLDLVL_MACHINE)'"
     124
     125#
     126# Compose C-Compiler defines to pass on command-line
     127#
     128%CC_DEFINES=
     129!ifdef  __LINUX__
     130%CC_DEFINES += -dBLDLVL_VENDOR='"$(%BLDLVL_VENDOR)"'
     131%CC_DEFINES += -dBLDLVL_MACHINE='"$(%BLDLVL_MACHINE)"'
     132!else
     133%CC_DEFINES += -dBLDLVL_VENDOR="$(%BLDLVL_VENDOR)"
     134%CC_DEFINES += -dBLDLVL_MACHINE="$(%BLDLVL_MACHINE)"
     135!endif
    107136
    108137#
Note: See TracChangeset for help on using the changeset viewer.