48 lines
1.9 KiB
Makefile
48 lines
1.9 KiB
Makefile
set positional-arguments
|
|
|
|
default:
|
|
@just --list --justfile {{justfile()}}
|
|
|
|
# Specifying apps and watchfaces: see doc/code/Apps.md
|
|
# defaults: see src/displayapp/apps/CMakeLists.txt
|
|
USERAPPS_DEFAULT := "StopWatch Alarm Timer Steps HeartRate Music Paint Paddle Twos Metronome Navigation" # Weather Motion
|
|
|
|
export USERAPPS := "Steps Motion HeartRate StopWatch Alarm Timer Metronome Music Paint Paddle" # Calculator
|
|
export WATCHFACES := "Analog Digital Terminal"
|
|
|
|
build-all: (build-app)
|
|
|
|
build-app \
|
|
ot="PineTime" ots="pine64" \
|
|
u=`python3 -c "print(','.join(['Apps::'+x for x in '${USERAPPS}'.split()]))"` \
|
|
w=`python3 -c "print(','.join(['WatchFace::'+x for x in '${WATCHFACES}'.split()]))"` \
|
|
: (build 'pinetime-mcuboot-app' '-DOWNER_TEXT='+ot '-DOWNER_TEXT_SHORT='+ots '-DENABLE_USERAPPS='+u '-DENABLE_WATCHFACES='+w)
|
|
|
|
test1: (build "pinetime-mcuboot-app" "-D`just get-userapps-arg '${USERAPPS}'`" "-D`just get-watchfaces-arg '${WATCHFACES}'`")
|
|
|
|
build *TARGET_AND_CMAKE_ARGS:
|
|
docker run --rm -it -v ${PWD}:/sources --user $(id -u):$(id -g) ${MY_REGISTRY}/infinitime-build /opt/build.sh "$@"
|
|
|
|
builder:
|
|
docker build -t ${MY_REGISTRY}/infinitime-build ./docker
|
|
#docker push
|
|
|
|
list-userapps-default:
|
|
sed -n -e 's/^ *\(#*\)set(DEFAULT_USER_APP_TYPES .*\(Apps::[^"]*\).*/\1\2/;T;p' < ./src/displayapp/apps/CMakeLists.txt
|
|
|
|
list-watchfaces-default:
|
|
sed -n -e 's/^ *\(#*\)set(DEFAULT_WATCHFACE_TYPES .*\(WatchFace::[^"]*\).*/\1\2/;T;p' < ./src/displayapp/apps/CMakeLists.txt
|
|
|
|
list-userapps-all:
|
|
sed -n -e '/enum class \<Apps\>.*{/,/}/p' < ./src/displayapp/apps/Apps.h.in
|
|
|
|
list-watchfaces-all:
|
|
sed -n -e '/enum class \<WatchFace\>.*{/,/}/p' < ./src/displayapp/apps/Apps.h.in
|
|
|
|
get-userapps-arg apps:
|
|
#!/usr/bin/env python3
|
|
print('ENABLE_USERAPPS=' + ','.join(['Apps::'+x for x in "{{apps}}".split()]), end='')
|
|
|
|
get-watchfaces-arg faces:
|
|
#!/usr/bin/env python3
|
|
print('ENABLE_WATCHFACES=' + ','.join(['WatchFace::'+x for x in "{{faces}}".split()]), end='')
|