diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-27 20:45:36 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-27 20:45:36 -0600 |
commit | fa357459f88bb8f0170d1a68df66e7d068d59996 (patch) | |
tree | 8585b5755ae224c6609f982d973141f1f6bad97b /Makefile | |
parent | d54ddec236bf9bdb8c032cd5fbdb0aa46ffebe86 (diff) |
fixes
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -28,11 +28,15 @@ libusb/include/libusb/tusb_helpers.h 3rd-party/MS-LCID.pdf 3rd-party/MS-LCID.txt ################################################################################ -build: build/Makefile $(generate/files) +commands := $(patsubst cmd/%/CMakeLists.txt,%,$(wildcard cmd/*/CMakeLists.txt)) +build: $(foreach c,$(commands),cmd/$c/build) .PHONY: build -build/Makefile: - mkdir -p build && cd build && cmake .. +cmd/%/build: build/%/Makefile $(generate/files) + $(MAKE) -C $(<D) +.PHONY: cmd/%/build +build/%/Makefile: cmd/%/CMakeLists.txt + mkdir -p $(@D) && cd $(@D) && cmake -DCMAKE_BUILD_TYPE=Debug -D_UBUILD_CMD=$* $(shell if grep -q pico_sdk_init $<; then echo ' -D_UBUILD_USE_PICO_SDK=1 '; fi) ../.. generate: $(generate/files) .PHONY: generate |