Add support for building on OSX

This commit is contained in:
Daniel de Cloet 2022-05-04 08:50:48 +02:00
parent 904fc2029e
commit e5611cac57
2 changed files with 12 additions and 5 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
qmk_firmware/
mdloader
mdloader-Linux.zip
mdloader.zip

View File

@ -8,6 +8,8 @@ BUILD_TARGET_LAYOUTS := $(addsuffix .bin, $(addprefix builds/, $(notdir $(TARGET
WRITE_TARGET?=undefined-target
UNAME_S := $(shell uname -s)
.DEFAULT_GOAL := help
.PHONY: help
@ -39,11 +41,16 @@ qmk_firmware/patches_applied: qmk_patches.diff
@git -C qmk_firmware apply ../qmk_patches.diff
@touch qmk_firmware/patches_applied
mdloader-Linux.zip:
@curl -LOs https://github.com/Massdrop/mdloader/releases/download/$(MDLOADER_VERSION)/mdloader-Linux.zip
mdloader.zip:
ifeq ($(UNAME_S),Linux)
@curl -Ls -o mdloader.zip https://github.com/Massdrop/mdloader/releases/download/$(MDLOADER_VERSION)/mdloader-Linux.zip
endif
ifeq ($(UNAME_S),Darwin)
@curl -Ls -o mdloader.zip https://github.com/Massdrop/mdloader/releases/download/$(MDLOADER_VERSION)/mdloader-macOS.zip
endif
mdloader: mdloader-Linux.zip
@unzip mdloader-Linux.zip
mdloader: mdloader.zip
@unzip mdloader.zip
@[ -e mdloader ] && touch mdloader
builds/%.bin: qmk_firmware/.git/HEAD | qmk_firmware