From 3b582371e46e180065120cadf0b5c618777be2a6 Mon Sep 17 00:00:00 2001 From: Rahix Date: Sat, 11 May 2019 22:26:49 +0200 Subject: [PATCH] make: Add targets for individual chips Signed-off-by: Rahix --- Makefile | 7 +++++-- README.md | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index df1f418..8a4a46f 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,13 @@ CHIPS := atmega8 atmega328p atmega32u4 attiny85 PATCHES := $(foreach chip, $(CHIPS), $(wildcard patch/$(chip).yaml)) DEPS := $(foreach patch, $(PATCHES), $(patsubst patch/%.yaml, .deps/%.d, $(patch))) -.PHONY: chips deps -chips: $(foreach chip, $(CHIPS), src/devices/$(chip)/mod.rs) +.PHONY: chips deps $(CHIPS) +chips: $(CHIPS) deps: $(DEPS) +$(foreach chip, $(CHIPS), $(eval $(chip): src/devices/$(chip)/mod.rs)) + +.SECONDARY: svd/%.bare.svd: vendor/%.atdf @mkdir -p svd @echo -e "\tATDF2SVD\t$*" diff --git a/README.md b/README.md index 4258a8d..b947885 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ git clone https://github.com/Rahix/avr-device cd avr-device make # You can build for just one specific chip using -make src/devices//mod.rs +# make atmega32u4 # I suggest building documentation as well cargo +nightly doc --features --open ``` -- 2.49.0