Check if SKU is defined before running full makefile

This commit is contained in:
Queen Vinyl Da.i'gyu-Kazotetsu 2024-07-24 14:01:23 -07:00
parent ef27ac0eb9
commit 885071e0c0
No known key found for this signature in database
GPG Key ID: 337758D9B8BAC002
2 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,11 @@ TARGET = freedmo
#DEBUG = 1
OPT = -std=c99 -Wall -Os -DDMO_SKU_$(DMO_SKU)
######################################
# Check for SKU variable
######################################
$(if $(DMO_SKU),,$(error DMO_SKU environment variable must be defined))
######################################
# source
######################################

View File

@ -76,7 +76,7 @@ To compile the firmware from source, perform the following steps:
- Windows/macOS/Other Linux:
- https://developer.arm.com/downloads/-/gnu-rm
- Open the Makefile and modify the first line `GCC_PATH` to point to the GNU ARM embedded toolchain `bin` folder (e.g. `GCC_PATH = ../gcc-arm-none-eabi-10.3-2021.07/bin`)
2. Run `make` to compile the firmware
2. Run `make DMO_SKU={Desired SKU to compile}` to compile the firmware
A `freedmo.bin` file will be created in the `build` folder.